This is the widget code I have which gives me a company name and subject field in the popup. But neither of these will appear in the chat window for the advisor:
<script src="https://apps.euw2.pure.cloud/widgets/9.0/cxbus.min.js" onload="javascript:CXBus.configure({debug:false,pluginsPath:'https://apps.euw2.pure.cloud/widgets/9.0/plugins/'}); CXBus.loadPlugin('widgets-core');"></script>
<script>
window._genesys = {
"widgets": {
"webchat": {
"transport": {
"type": "purecloud-v2-sockets",
"dataURL": "https://api.euw2.pure.cloud",
"deploymentKey": "mykey",
"orgGuid": "myorg",
"interactionData": {
"routing": {
"targetType": "QUEUE",
"targetAddress": "Test - Chat",
"priority": 2
}
}
},
"userData": {
"addressStreet": "",
"addressCity": "",
"addressPostalCode": "",
"addressState": "",
"phoneNumber": "",
"customField1Label": "Company Name",
"customField1": "",
"customField2Label": "",
"customField2": "",
"customField3Label": "",
"customField3": ""
}
}
}
};
function getAdvancedConfig() {
return {
"form": {
"autoSubmit": false,
"firstname": "",
"lastname": "",
"email": "",
"subject": "",
"company": ""
},
"formJSON": {
"wrapper": "<table></table>",
"inputs": [
{
"id": "cx_webchat_form_firstname",
"name": "firstname",
"maxlength": "100",
"placeholder": "Required",
"label": "First Name"
},
{
"id": "cx_webchat_form_lastname",
"name": "lastname",
"maxlength": "100",
"placeholder": "Required",
"label": "Last Name"
},
{
"id": "cx_webchat_form_email",
"name": "email",
"maxlength": "100",
"placeholder": "Optional",
"label": "Email"
},
{
"id": "cx_webchat_form_subject",
"name": "subject",
"maxlength": "100",
"placeholder": "Optional",
"label": "Subject"
},
{
"id": "cx_webchat_form_company_name",
"name": "company",
"maxlength": "100",
"placeholder": "Optional",
"label": "Company Name"
}
]
}
};
}
const customPlugin = CXBus.registerPlugin('Custom');
</script>
<button type="button" id="chat-button" onclick="customPlugin.command('WebChat.open', getAdvancedConfig());">Start Chat</button>
------------------------------
Mark Elliott
Lemon Business Solutions
------------------------------
Original Message:
Sent: 02-03-2021 13:23
From: Mark Elliott
Subject: Chat Subject Field
I have created a chat widget. Within the widget there are the default fields, including subject. I don't see the subject appear anywhere on screen for the advisor. It does not appear to be a default variable in the scripts. Has anyone managed to get the chat subject to appear for advisors? If so, would you care to share how? It's breaking me :)
#ConnectwithaCustomer(NEW)
#DigitalChannels
#Omni-ChannelDesktop/UserInterface
------------------------------
Mark Elliott
Lemon Business Solutions
------------------------------