This article explains how to pass the metadata when a new request comes from a Chat widget from an external website.
...
Here metadata should be between <chat-widget> </chat-widget> tags.
Here, the name indicates the field name, the value indicates the field value, and the render indicates whether to show the field/value. Render has only two values, true/false.
...