Sales force live agent code spinet in web application

Hi Everyone,

Need a help or suggestion from you all,

Ii have implemented the sales force live agent chat in our web application.

From sales force end we got a code snippet, which we need to run while screen rendering.

so, I made the code available on the HTML Weblock from web pattern. and placed in common module.

functionality working fine on Sales force live agent chat, but the old function which is available in a screen(rendering from different web block) is not working.

Little urgent, help me on this.


Please let me know if any clarification required.


Thanks,

Manikandan K

 

Have you checked if there's an error on your browser developer console?

Didn't understand if you have two versions of salesforce live agent on your app, if that's the case it could cause some conflict when both snippets are loading.

Usually this kind of snippets need a target container, that you feed the Id onto the snippet. We need to load the snippet only when the page is rendered so that the snippet can run successfully. Use the snippet enclosed in the JS document.ready() function: https://learn.jquery.com/using-jquery-core/document-ready/