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
Yago CeballosYago Ceballos 

Snap ins with Angular

Hi team, 
My customer is having this issue since the last release and nobody has been able to give me a response. Does anyone know how I can help them?


The problem that arises from the private website:
Currently from Liberbank, to be able to embed the chat from your private website, we created an "Integrated Service Implementation" record, called Private Chat Web. This implementation, as you know, generates a standard code to be able to embed in the web you want and thus be able to launch Live Agent from any web page. This code, added to a visualforce or HTML page, works correctly.
We have generated this same service for the public website, called "Public Web Chat", working correctly from the Liberbank public website today.
As for the private website, the script that is generated by default, is invoked from an application with Angular.js and Node.js.
Initially, when developing the project and uploading it to production the first time, everything worked correctly, but since the last Salesforce release, the following invocation fails:
function invokeSnapIns () {
            if (embedded_svc! == 'undefined') {
                embedded_svc.onHelpButtonClick (); -> This function fails because it says that embbeded_svc.onHelpButtonClick (); it is "Undefined", even if we check it.
            }
        }
 
It is that specific function that fails , and reviewing the standard Salesforce js, embeddedservice / 5.0 / esw.min.js, I can't see the error . We would have to check if the error in that specific function is due to something related to permissions or authentication from Salesforce.
I still leave you the script code that we pass to the people of Private Web so that they embed in their web. This code as is in a visualforce or html page works, but it is not so from node.js. "
AbhishekAbhishek (Salesforce Developers) 
Hi Yago,

In this scenario, a complete code review is needed.

I would request you to reach out to your Account Executive they will help to reach a salesforce architect and to proceed further.

Thanks.