Passing custom attribute to web messaging

Hi,
I am working on a web Messaging using the publish JS snippet.
I would like to pass our customer's sessionid (dynamic and unique to each session) from to the chat initialization.
In the agent portal we like to utilize this sessionid to identify the customer during chat with a screen pop.
I have added customFilds below but not sure if this is the correct way.
Please let me know if I am on the right track or is there any documentation on passing data via web messaging.

ys = document.createElement('script'); ys.async = 1; ys.src = n; ys.charset = 'utf-8'; document.head.appendChild(ys);
})(window, 'Genesys', 'https://apps.usw2.pure.cloud/genesys-bootstrap/genesys.min.js', {
environment: 'prod-usw2',
deploymentId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
customFields: {
sessionid: {{sessionid}}
}

Hi Richard, you can use a participantData for storing the custom information from the website and then you can get it from architect,...

The code:

Genesys("command", "Database.set", {
messaging: {
customAttributes: {
customFieldKey: 'customFieldValue',
}
}
});

1 Like

Thanks Alberto,
I was able to pass the sessionid with below

Genesys("command", "Database.set", {
messaging: {
customAttributes: {
sessionid: {{sessionid}},
}
}
});

Now in Architect / Inbound Message Flow, I am adding a Get Participant Data to get the sessionid value.
what should I set the Attribute Name to capture the sessionid value?
I have setup below

Flow.test1=sessionid
Flow.test2= context.sessionid

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