You are here:
Start Chatting with Customers
Connect the messaging channel to your website and embed your bot on your website.
Required Editions
| Available in: Lightning Experience |
| Available with Sales in Performance and Unlimited Editions |
| Available with Sales Engagement, which is available in Performance and Unlimited Editions, and for an extra cost in Professional and Enterprise Editions |
| User Permissions Needed | |
|---|---|
| To manage Messaging experiences: | Messaging for In-App and Web Agent |
-
To connect the messaging channel to your website, create and publish an embedded service
deployment.
- Click New Deployment and then select the Enhanced Chat conversation type.
- For the deployment destination, select Web. Then enter a unique name for the deployment.
- Enter the top-level domain name of the website, for example, yourcompany.com.
- Select the Buyer Assistant Messaging Channel and save your changes. Then create and publish the deployment.
After your deployment is created, you can edit your messaging settings, branding, and pre-chat form fields. Always publish the deployment after making edits. -
To let the bot see whether your sales team can receive incoming chats, create an online presence status with Messaging in the
Selected Channels list. Optionally, create more statuses, such as one that indicates a user is
busy.
- To give your team access to presence statuses, create a permission set. Click Service Presence Statuses Access and edit it. Select the presence statuses that you want to associate with the permission set. Then save your changes and assign the permission set to your team.
- Users with a presence status are assigned to the default presence configuration. Optionally, create custom presence configurations to limit how much work each team member can take on.
- Before adding your buyer assistant to your website, make sure that your sales team has the Messaging for In-App and Web User permission set. To embed your Buyer Assistant bot on your website, copy your bot’s code snippet from the Embedded Service Deployment Settings page. Then go to your website and paste the snippet before the closing body tag on each web page where you want a chat button to appear.
-
To collect and send pre-chat data from your website to Salesforce, pass the pre-chat values
programmatically.
Add this code snippet to your website’s <head> element. Replace customerLocale and customerTimeZone with your hidden pre-chat field API names. If you have an Experience Builder website, add the code snippet to the Head Markup.
<script type='text/javascript'> window.addEventListener("onEmbeddedMessagingReady", () => { console.log("Received the onEmbeddedMessagingReady event…"); const customerLocale = navigator.language; console.log("locale:" + customerLocale); const customerTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; console.log("timezone:" + customerTimeZone); // Send data to Salesforce embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields( { "Locale": customerLocale, "Timezone": customerTimeZone } ); }); </script> -
After you add your buyer assistant to your website, test it. If you have a large team,
consider gathering a small group of users to test out the buyer assistant
- To test your Buyer Assistant bot from a team member’s perspective, go to App Launcher and then open the Lightning Sales Console app. From the utility bar, select Omni-Channel and then change your status to Online. After you click the chat button in the next step, verify that you receive a chat request in Sales Console.
- To test your bot from your customer’s perspective, open another window or tab and navigate to your website. To start the chat, click the chat button. From the menu, select Connect with Sales and then enter the requested information.
- Gather Customer Information Using Pre-Chat
Add custom fields to your pre-chat form to store your chatting customer’s local and time zone information. Then you can auto-fill these hidden pre-chat fields when the conversation begins.
Did this article solve your issue?
Let us know so we can improve!

