Skip to end of banner
Go to start of banner

How to pass metadata from an external website into chat (new widget)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This article explains how to pass the metadata when a new request comes from a chat widget from an external website.

By default, we have a few fields and values in Chat Information when the chat is initiated below is the screenshot for reference which shows what are all the default values.

In addition to this 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.

<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: 'External', 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 name indicates the field name and value indicates the field value and render indicates to show the field/value or not, render has only two values true/false.

Here is the example of metadata:

  • No labels