Push Participant Data at Messaging initialisation

Hi all
Is there a way to pass custom participant data along with the out of box deployment of the Web Messenger?
I would like pass some data when the conversation starts such as customer CRM ID, the URL of the page where the session has been initiating,...

Many thanks for your answer
regards
Paul

Yes, use the Database plugin on the page just after calling the Messenger snippet https://developer.genesys.cloud/commdigital/digital/webmessaging/messengersdk/SDKCommandsEvents/databasePlugin

So, for example, you could do this:

 Genesys("command", "Database.set", {
messaging: {
		customAttributes: {
  				   CRM_ID: "12334",
  				   current_location: window.location.href,
                               browser_language: navigator.language
				   }
	   }
});

You can get anything from the page that can be found and pass it. The key names will be participant data keys that you can use in a Get Participant Data block in Architect

Great, exactly what I'm looking for
many thanks for the quick answer

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