Rich messaging, such as buttons and carousels, are not supported by Salesforce. Therefore, we have created our own scripts for you to add in Salesforce as static resources to enable buttons as rich messages in dialogue flows.
❗ Note that Snap-in chat is required for this. |
- Step 1: Download the scripts
- Step 2: Install the scripts
- Step 3: Edit the snap-in widget in your website's source code
Step 1: Download the scripts
- Download the scripts from https://storage.googleapis.com/ultimateai-public/SF_richMessages_ultimateai_latest.zip
- Unzip the zip file and you'll see two files:
- CustomEvents_AddButtons.js
- CustomEvents_AddButtons_Stylesheet.css
Step 2: Install the scripts
The two files need to be added as static resources. To do so:
-
Go to Setup > Custom Code > Static Resources in Salesforce
-
Click New to add a static resource
-
Set the fields as below:
-
Name: CustomEvents_AddButtons
-
File: CustomEvents_AddButtons.js
-
Cache Control: Public
-
-
Click Save
-
Repeat steps 2-4 for file CustomEvents_AddButtons_Stylesheet.css
Step 3: Edit the snap-in widget in your website's source code
- In your website's source code, locate the snap-in widget snippet
- Add following lines to above
embedded_svc.init()
:
embedded_svc.settings.externalScripts = ["CustomEvents_AddButtons"];
embedded_svc.settings.externalStyles = ["CustomEvents_AddButtons_Stylesheet"];