You need to use Headless SDK or Guest Messaging API and include this:
Genesys("command", "Database.set", { messaging: { customAttributes: { myKey: 'value' }}});
Then try to retrieve the myKey attribute with Get Participant Data action and store in local State.MyKey variable.
------------------------------
Robert Wakefield-Carl
ttec Digital
Sr. Director - Innovation Architects
Robert.WC@ttecdigital.comhttps://www.ttecDigital.comhttps://RobertWC.Blogspot.com------------------------------