How to add new fields from userData to Interaction Details

How do I have the custom fields from my web chat configuration (including userData and form data) show up in the Interaction Details on my call center associates' views?

See below for my web chat configuration. Fields like first and last name, phone number, email, and customer address are being passed into my call center associates' views correctly and show up in their Interaction Details:

These details are coming from the webchat configuration userData object (below) and the form data entered by the customer (which includes "Subject" field)

window._genesys = {
		widgets : {
			main : {
				theme : 'light',
				preload: ['webchat'],
			},
			webchat : {
				actionsMenu : true,
				confirmFormCloseEnabled : true,
				transport : {
					type : 'purecloud-v2-sockets',
					dataURL : 'https://api.mypurecloud.com',
					deploymentKey : '########-####-####-####-############',
					orgGuid : '########-####-####-####-############',
					interactionData : {
						routing : {
							targetType : 'QUEUE',
							targetAddress : 'My Chat Queue',
							priority : 2
						}
					}
				},
				userData : {
					addressStreet : '1725 HOPLEY AVE.',
					addressCity : 'BUCYRUS',
					addressPostalCode : '44820',
					addressState : 'OH',
					phoneNumber : '8006862848 Ext: ',
					phoneType : 'Work',
					userId : 'UserName112',
					// These fields should be provided via advanced
					// configuration
					// firstName: first,
					// lastName: last,
					// email: email,
					// subject: 'Chat subject'
				},
				form : {
					wrapper : "<table></table>",
					inputs : [

						{
							id : "cx_webchat_form_firstname",
							name : "firstname",
							maxlength : "100",
							placeholder : "@i18n:webchat.ChatFormPlaceholderFirstName",
							label : "@i18n:webchat.ChatFormFirstName",
						},

						{
							id : "cx_webchat_form_lastname",
							name : "lastname",
							maxlength : "100",
							placeholder : "@i18n:webchat.ChatFormPlaceholderLastName",
							label : "@i18n:webchat.ChatFormLastName",
						},

						{
							id : "cx_webchat_form_email",
							name : "email",
							maxlength : "100",
							placeholder : "@i18n:webchat.ChatFormPlaceholderEmail",
							label : "@i18n:webchat.ChatFormEmail",
						},

						{
							id : "cx_webchat_form_subject",
							name : "subject",
							maxlength : "100",
							placeholder : "@i18n:webchat.ChatFormPlaceholderSubject",
							label : "@i18n:webchat.ChatFormSubject",
						} ]
				},
			}
		}
};

However, other details like the subject (entered by the customer), and userId field (populated in my configuration file) are not showing in the Interaction Details.

Please help, thanks!

Hello,

You can have a look at this blog: https://developer.mypurecloud.com/blog/2021-03-08-accessing-collected-chat-v2-information/#chat_data_in_the_interaction_details_panel
And this other post where there is also some explanations

As the blog explains, if you want to display some data which is not part of the one displayed natively by the Interaction Details panel, you will have to leverage the customFields (customField1 and customField1Label, customField2 and customField2Label, customField3 and customField3Label).

Regards,

1 Like

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