Start tracking your progress
Trailhead Home
Trailhead Home

Prep for Einstein Bots

Learning Objectives

In this project, you’ll:

  • Prepare your community and run Chat to enable Einstein Bots.
  • Set up an Einstein Bot.
  • Add prebuilt dialogs and customize the options menu.
  • Create dialogs, a submenu, and a dialog group.
  • Write bot conversations using variables and entities.

Introduction

In this project, you get to build a chatbot for Ursa Major Solar, a supplier of solar energy components. If you completed the Einstein Bots Basics module, you learned all about chatbots, their benefits, their terminology, and how to begin the bot planning process. Here you get hands-on in a Trailhead Playground to see for yourself just how powerful and easy Einstein Bots are to use. We recommend you take the Einstein Bots Basics module first to get a solid foundation, and to learn why Ursa Major Solar added bots as a new customer channel.

Let's get acquainted with Juan Garcia. He’s an experienced customer support agent for Ursa Major Solar. Juan’s been around long enough to know that most Ursa Major Solar customers tend to ask the same questions. They usually want to know their order status or username and password.

Juan is a great problem solver and wants to put his skills to use by adding value in other ways. For example, he created a quick action to help sales reps close opportunities, and he built a macro to help support agents update case statuses and send notification emails to customers. Juan has even been thinking about mastering his reporting skills to help Ursa Major Solar make critical business decisions.

He knows it’s unrealistic, but he wishes he could hire a robot to tackle the repetitive and tedious tasks. Then he could keep customers happy by spending more time with those who need it.

At the same time, one of Juan’s most loyal customers is beginning to lose confidence with Ursa Major Solar. Whenever she needs help with a simple question, it takes a long time to connect with a real-time agent. If there were a way to get her simple questions answered at robotic speed, then she wouldn’t hesitate to recommend Ursa Major Solar to others.

They are both in luck! As a new Salesforce admin at Ursa Major Solar you’ve heard that a robot like this does exist. It’s called Einstein Bots. Want to build one?

Before you can have fun with Einstein Bots, you need to complete a few tasks first.

Launch Your Trailhead Playground

For this project, create a new Trailhead Playground. You can find it at the bottom of this page. Click Launch to open the Trailhead Playground in a new browser tab (login required). It typically takes 3-4 minutes from the time you first sign up for Trailhead to create your Trailhead Playground.

Note

Note

Yes, we really mean a brand new Trailhead playground! If you use an existing org or playground, you can run into problems completing the challenges.

When you're ready to set up Einstein Bots for your production org, you need:

  • A Service Cloud license
  • A Chat license
  • Lightning Experience

Publish a Salesforce Community

Next, let’s turn on communities so that Ursa Major Solar can give customers an easy way to interact with them. Once you enable Communities, you can’t turn it off.

  1. From Setup, enter Communities Settings in the Quick Find box, then select Communities Settings.
  2. Select Enable communities.
  3. Enter a unique domain name and click Check Availability.
Note

Note

Keep in mind that you can’t change your Lightning Platform domain name after you enable your community. To minimize confusion, companies usually use their company name as the domain. Make sure to coordinate with your marketing team and executives to set up a unique name for your business. If you set up more than one community, you can append the community name to the URL to differentiate between them.

  1. Click Save.
  2. Click OK.
  3. Your browser settings may require you to click Open to open in a new browser. You should have been redirected to the All Communities page in Setup, but if not, enter All Communities in the Quick Find box, then select All Communities.
  4. Click New Community.
  5. Select the Customer Service template.
  6. Click Get Started.
  7. Name the community Ursa Major Solar.
  8. Click Create.

It’s that easy—you now have a community! Time to get up and running with live web chat.

Run the Chat Guided Setup Flow

The Chat setup flow is a fast and easy way to get up and running with live web chat. When you complete the flow, you’re ready to start chatting with your Ursa Major Solar customers.

  1. Click Bot setup icon in the top left.
  2. Select Salesforce Setup.
  3. You should be returned to the All Communities page in the Service Setup. If not, enter Communities Settings in the Quick Find box, then select Communities Settings.
  4. Copy the URL associated with the Ursa Major Solar community.
  5. Click Service Setup to go to Service Setup Home. Service Setup in the Setup gear dropdown.
  6. Click View All and then search for and select Chat with Customers. Recommended Setup in Service Setup Home
  7. Click Start.
  8. For Queue Name, enter FAQs.
  9. For Name This Agent Group, enter Ursa Major Solar Chat Agents.
  10. Click the plus sign next to your name, and click Next.
  11. Keep your agents’ chat workload as is, and click Next.
  12. For Website URL, paste the URL you copied from your community.
  13. Click Next.
  14. Click the Service tile, then Next.
  15. Keep Offline Support off, and click Next.
  16. You do not need to copy and paste the Chat code snippet. Your Trailhead Playground already has the Embedded Service Chat code to power chats with your customers on your communities or websites. Click Next, then Done.

Time to add the Chat widget URL to your community’s security settings to allow live web chat.

  1. From Setup, enter Chat in the Quick Find box, then select Chat Settings.
  2. Copy the URL in Chat API EndpointThe Chat API Endpoint field on the Chat Settings page.
  3. From Setup, enter Communities in the Quick Find box, then select All Communities.
  4. Click Builder next to your Ursa Major Solar community.
  5. Click the Settings icon Settings icon in the upper left.
  6. Click Security.
  7. Change the default Content Security Policy (CSP) from Strict CSP: Block Inline Scripts and Script Access to All Third-party Hosts (Recommended) to Relaxed CSP: Permit Access to Inline Scripts and Allowed Hosts
  8. Click Allow in the popup window.
  9. In the Trusted Sites for Scripts below the CSP section, click + Add Trusted Site.
  10. For the Name, enter Chat.
  11. For the URL, enter the URL you copied from Chat API Endpoint in Chat Settings.
  12. Make sure Active is checked.
  13. Click Add Site.

Add Embedded Service Chat to Your Community

Now let’s add Embedded Service Chat to your website so customers can quickly get answers to their questions by chatting with an agent in the browser.

  1. From Setup, enter All Communities in the Quick Find box, then select All Communities.
  2. Next to your community, click Builder.
  3. Click the Components icon Lightning bolt icon in the top-left corner to open Components and scroll to the Support section.
  4. Drag the Embedded Service Chat to the template footer. Scroll down the web page to see the template footer at the bottom of the page. Placing Embedded Service Chat in the template footer allows it to appear on all web pages. Snap-ins Chat component added to the template footer.
  5. Click Publish.