You need to sign in to do that
Don't have an account?
Praful_Gupta
Live agent deployment code passing parameter issue
Hi,
I am trying to pass a paramter into live agent deployment code like
liveagent.init('https://XXXX.salesforceliveagent.com/chat', '572b0000000xxxs&lang=en&country=international_Support_EN', 'xxxxxxxxxxxxx');
passing parameter like "&lang=en&country=international_Support_EN" works fine in production environment however when im adding parameters in deployement code of sandbox its not working.
Is anyone else also facing same issue and anyone knows a workaround for it ?
Thanks
I am trying to pass a paramter into live agent deployment code like
liveagent.init('https://XXXX.salesforceliveagent.com/chat', '572b0000000xxxs&lang=en&country=international_Support_EN', 'xxxxxxxxxxxxx');
passing parameter like "&lang=en&country=international_Support_EN" works fine in production environment however when im adding parameters in deployement code of sandbox its not working.
Is anyone else also facing same issue and anyone knows a workaround for it ?
Thanks
[1] https://resources.docs.salesforce.com/sfdc/pdf/live_agent_dev_guide.pdf
Thanks @pcon,
I know we can use addCustomDetail to pass parameters as stated in doc https://resources.docs.salesforce.com/sfdc/pdf/live_agent_dev_guide.pdf
but in our current functionnality in production, we are already using an option of passing parameters from deployment api like this liveagent.init('https://XXXX.salesforceliveagent.com/chat', '572b0000000xxxs&lang=en&country=international_Support_EN', 'xxxxxxxxxxxxx');
and its working fine there however its not working for sandbox deployment API
We have the same issue. It stopped working in Production and all Sandboxes. If you find a solution, please post it.
@joe Bohon,
What I know Salesforce in its recent release stop allowing passing paramters with liveagent deployment id and thats causing this problem.
Solution for is to use "addCustomDetail" to pass parameters from pre-chat form.
u = [SELECT Name, AccountID, Email FROM User WHERE Id = :Userinfo.getUserId()];
...
//nameOfUser = userInfoMap.get('userName'); <this code no longer works
//emailOfUser = userInfoMap.get('userEmail');
nameOfUser = u.Name;
emailOfUser = u.Email;
I also noticed that our custom chat page with the buttons and the pre-chat page were different URLs. For example, our button page is https://mycompany-name.force.com/support/apex/ChatPage and our pre chat page was opening as https://mycompanyname.force.com/support/apex/PreChat
To overcome the issue where it was returning the guest user info (instead of the actual user logged in) into the Name and Email fields on the prechat page, I removed the Pre-Chat Form Page setting and added the Pre-Chat Form URL of https://mycompany-name.force.com/support/apex/PreChat. These are the settings in the Custom Buttons and Automated Invitations section under Live Agent.
This forced the prechat page to use the same domain for both pages and the variables passed with no problems.
Hope this helps someone else who has the URL hack in place and it is not working.