You need to sign in to do that
Don't have an account?
Michael M
How to change code of embedded service code snippet
Hello I want to add the following code to my embedded service code snippet. However I cannot seem to edit that code. I found this webstie https://help.salesforce.com/articleView?id=snapins_chat_customize_code.htm&type=5 but don't understand all the steps. Are there simple steps you can provide so that I can add this code to my embedded service code snippet?
embedded_svc.settings.extraPrechatFormDetails = [{ "label": "URL", "value": window.location.href, "displayToAgent": true, "transcriptFields": ["URL__c"] }];
embedded_svc.settings.extraPrechatFormDetails = [{ "label": "URL", "value": window.location.href, "displayToAgent": true, "transcriptFields": ["URL__c"] }];
Check below link that can help you.
https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_settings.htm
Thanks,
Check below references
https://help.salesforce.com/articleView?id=000319423&type=1&mode=1
https://salesforce.stackexchange.com/questions/228053/is-it-possible-read-write-settings-of-embedded-svc-in-lightning-component-of-pre
Thanks,
Thank you for those references. I am not seeing there how to edit the embedded service code snippet.
I found a similar idea to what I want to do here:
https://salesforce.stackexchange.com/questions/277915/live-agent-users-current-location-url
On that website, they say to add this code to the embedded service:
embedded_svc.settings.extraPrechatFormDetails = [{ "label": "URL", "value": window.location.href, "displayToAgent": true, "transcriptFields": ["URL__c"] }];
However I do not understand how to add to add this code. When I look at my embedded service code snippet, there is no edit button. How can I add that code? And if I cannot, is there any other way to use window.location.href in my einstein bot?