You are here:
Sample Static Resource Files for Channel Menu
Create JavaScript files to upload as static resources and apply them to your Channel Menu website or Experience site. This code sample populates pre-chat settings and adds a company logo.

Use more general search terms.
Select fewer filters to broaden your search.
You are here:
Create JavaScript files to upload as static resources and apply them to your Channel Menu website or Experience site. This code sample populates pre-chat settings and adds a company logo.
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To create and edit static resources: | Customize Application AND Author Apex |
You can use JavaScript static resource files, including strings, arrays, JSON, and JS functions for the Channel Menu. To set up your code file, use this example for reference.
_snapinsSnippetSettingsFile on the Global window object.
window._snapinsSnippetSettingsFile = (function() {})();
embedded_svc.menu.snippetSettingsFile to merge in
Channel Menu.
window._snapinsSnippetSettingsFile = (function() {
console.log("Code settings file loaded");
// Chat menu-item specific settings
embedded_svc.menu.snippetSettingsFile = {
TestChatChannel: {
settings: {
prepopulatedPrechatFields: {"Subject":"Login Issue"},
smallCompanyLogoImgURL: "https://yourwebsite.here/company_logo.png"
}
}
};
})();
In the sample code, TestChatChannel is a placeholder for your
unique Channel Menu item name, so make sure to update it.
When your file is complete, return to Embedded Static Resources for static resource upload instructions.

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.