function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yamini Bathula 15Yamini Bathula 15 

Salesforce Embedded service setCustomVariable

Yamini Bathula 15Yamini Bathula 15
Hi Folks,

I am testing if embedded service deployment will suit our chat requirements. 

I would like to know how the custom variable is set in the chat as explained in the liveAgent dev guide https://developer.salesforce.com/docs/atlas.en-us.live_agent_dev.meta/live_agent_dev/live_agent_automated_chat_invitations_code_sample.htm 

they explained how to achieve it using liveagent but not using embedded service. They just mentioned this line 

If you’re using custom variable rules, also use this function:
embedded_svc.inviteAPI.inviteButton.setCustomVariable()


in https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_customize_chat_invitation.htm .

Can anyone help me how to implement this in the javascript code using embedded service deployment. 
Thanks,
Yamini.