Chat (widget v2) custom User Data capture in architect

Hi,

we are doing an chat widget v2 implementation, and we are experiencing some troubles capturing the data in the userData (custom)

As stated in the documentation (https://developer.mypurecloud.com/api/webchat/widget-version2.html)

Custom data can be provided with the chat for access via Conversations APIs and Agent Scripts. Attributes will be added as participant attributes on the customer participant in the conversation. The attribute names will be prepended with context. . This means that a userData key of accountNumber would become a participant attribute named context.accountNumber . These attributes can also be accessed in an Agent Script by creating an input variable with the name of the userData key (without the context. prefix).

So, if I want to retrieve those custom fields in Architect, I assume I can use a "get participant data", and just call the attribute exactly the same than the field within userData. Do I have to prepend "context."? Without "context.", just exact same names, it seems it's not working and architect is not capturing anything.

And what if I want to capture in architect the queue that the website is specifying in the targetAddress field?

Thanks

Hello,

You would use a Get Participant Data action and have the Attribute Name = "context." + name of your userData key (as configured on client/widgets side).

Ex with:
userData {
MyTestKey: 'MyTestValue',
customerType: 'Platinium'
}
In Architect, you would use a Get Participant Data with: context.MyTestKey, context.customerType

The same applies to the fields you have in your Chat Registration Form (standard one or custom one - it leverages the "name" attribute of the corresponding field).
For the built-in fields in the Standard Chat Registration Form, that would be: context.firstName, context.lastName, context.subject, context.email

As of the targetAddress, you can also use a GetParticipantData using context.genesys.legacyRoutingTargetQueueAddress

Regards,

2 Likes

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