Customer chat id not getting overridden

we are passing the customer chat id during chat initialization, but its not getting over ridden in the script screen ({{Chat.Customer Chat ID}}), the script screen still shows something like "5e70bd4d0000012e2f92ad43@guest.orgspan.com" instead of "1664244" that's being passed.
"data": {
"firstName": document.getElementById('first-name').value,
"lastName": document.getElementById('last-name').value,
"addressStreet": "",
"addressCity": "",
"addressPostalCode": "",
"addressState": "",
"phoneNumber": "",
"customField1Label": "History",
"customField1": document.getElementById('history').value,
"customerChatId" : "1664244"
},

You can't change that. What's provided in the data is set as participant attributes.

Tim,

Agree, but the problem is we are not able to get the same value that we set for customerChatId. Ex: We have set customerChatId as "166244" during guest chat initialization but when we retrieve the same in scripts {{Chat.Customer Chat ID}} ,we are getting something else like 5e70bd4d0000012e2f92ad43@guest.orgspan.com"

Regard
Deepak

You're conflating two things. Chat.Customer Chat ID is a built-in variable; it is not related to the custom data you provide when create the chat. Your customerChatId custom data property can be accessed in the script using an input variable of the same name. However, I'd recommend naming it something else since it's easily confused with the built-in variable that has a different meaning.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.