This article explains how to pass the metadata when a new request comes from a chat Chat widget from an external website.
By default, we have Chat Information has a few fields and values in Chat Information when the chat is initiated below . Below is the screenshot for reference, which shows what are all the default values.:
...
In addition to this If , if we want to add custom fields or values, it’s possible by adding metadata code in the HTML. Below is the code that has to be added.:
Code Block | ||
---|---|---|
| ||
<html> <body> <script src="https://chat-api.spartez-software.com/chat-widget.js" defer></script> <chat-widget jira-id="8ad73648-24b8-3d3c-bf91-f75ff508305b" service-desk-id="1" primary-color="#2D60D8" text-color="#FFFFFF" metadata="[ { name: 'ExtExternal', value: 'Yes', render: true, }, { name: 'Website', value: 'https://appfire.com', render: true, }, { name: 'User', value: 'NA', render: false, }, ]" auto-show="true"></chat-widget> <chat-widget auto-show="false"></chat-widget> </body> </html> |
Here metadata should be between <chat-widget> </chat-widget> tags.
Here, the name indicates the field name and , the value indicates the field value, and the render indicates whether to show the field/value or not, render . Render has only two values, true/false.
Here is the an example of metadata:
...