Newer Version Available

This content describes an older version of this product. View Latest

Load Files for Custom Chat Events

Load your own JavaScript and CSS files into Embedded Chat to handle and style custom chat events. Your scripts and styles are loaded only after the agent accepts the chat request.

Upload your files as Static Resources with the cache control set to public. Assign names that are easy to remember and with no spaces. You will reference them by static resource name in Embedded Chat.

Load a JavaScript File

embedded_svc.settings.externalScripts = ["...", “...”]

Specify your resources using the static resource name, not the file name itself. For example, if you upload CustomEvent.js and give it the name CustomEvent, enter CustomEvent.

Load a CSS File

embedded_svc.settings.externalStyles = ["...", “...”]

Specify your resources using the static resource name, not the file name itself. For example, if you upload CustomEvent.css and give it the name CustomEventCSS, enter CustomEventCSS.