Build Einstein Bots: Create dialogs with the Bot Builder and train a sophisticated model

Qualify and resolve routine customer requests automatically.

Chatbot Window

CT DOL

Introduction

Einstein Bots and the Einstein Bot Builder are tools to answer questions and deflect cases. Once the plumbing is complete to enable Einstein Bots, be sure to have a game plan for your implementation. Consider branding, actionable items, and the content that the chatbot outputs to address questions.

    Strategy

  • Procure approved content. Get buy-in from stakeholders that content is final, but things can still evolve. 
  • Map out the user journeys. On paper or a digital whiteboard, draw out different paths a user can take, but keep it short.
  • Aim to resolve requests through self-service. Can the user do something on their own with a little guidance? If not, the organization needs to put in place processes that would allow users to do so.
  • Keep the back and forth chatbot conversations brief. The chat container is a small window.
  • Consider the source of content. Knowledge Articles designed for a chatbot is an option. It is easy to maintain.
  • Sprinkle in some personality. Capture user information, and address them to make the interaction conversational.
Journey Map

Journey map

Einstein Bot Builder

So you now have a game plan, approved content, and the infrastructure in place to start building. Once you navigate to Einstein Bot Builder, you land on the "Dialogs" page, where you can begin building. If it's your first time using the Bot Builder, click on the "Dialogs" drop-down, and navigate to "Overview." High-level information about the chatbot and configuration, such as bot response delay time.

Einstein Bots jargon:

  • Dialogs - Containers that house a chatbot interaction. It is the building block of a chatbot conversation.
  • Intents - Containers that house utterances. Anticipate dialog execution, dependent on user input. You can enable intents for each dialog. You can also import intents sets.
  • Utterances - Phrases captured through user input for a dialog. It is the building block of an intent. After enabling an intent, you can insert utterances so that a user's typed input executes a matched dialog.

To start, build on the Welcome dialog. A simple greeting works, and you can display the Main Menu. The user journey that you mapped out begins.

Hover over the plus sign in the middle of the dialog builder reveals the following tools:

  • Message - Output text, including variables.
  • Question - Capture and respond to user input.
  • Action - Execute Apex, Flow, Send Email, Object Search
  • Rule - Set conditions and actions

Start simple, and then you can elevate your conversation into an elaborate operation.

Welcome dialog

Welcome dialog

Bot Builder Actions

Bot builder actions

Things to consider

  • Just because you can, doesn't mean you should. Review the content that you procured, and focus on the most impactful items. Do not overcomplicate the chatbot experience. Place high volume dialogs on the Main Menu.
  • Label dialogs intuitively, and use them as menu buttons for navigation. Avoid creating utility dialogs. E.g. "Back to Main Menu" instead, use "Main Menu."
  • Not all dialogs need to be a menu option. Consider discreet dialogs and leveraging intents; this declutters navigation menus.
  • Transferring to agent dialog placement - this can be a catch 22. The purpose of the chatbot is to cut down on agent interaction. If a user is already frustrated, try not to make it more challenging to connect with an agent. Place the dialog on the Main Menu.
  • Turn on Einstein - build a model on your intents. A minimum of 20 utterances is required. Ideally, each intent will have a lot more than 20 utterances for a robust model.
  • Test your bot - place the bot in a test Community or generate the embed code snippet and embed the chatbot into a hosted site. Share the site URL with peers to collect feedback. You can find the code snippet in Salesforce Setup> Embedded Service Deployments.
  • Create custom fields on the LiveChatTranscript (Classic) object to give the bot access to customer information.

Einstein

Depending on your chatbot use case, intent sets are available to import. Intent sets is an efficient way to generate a learning model to match customer inputs with dialogs. One of the best ways to capture utterances is to expose the chatbot to your user base in its early form. Sure, the interactions may be rough and raw. However, it a crucial step to the model generation. All sorts of user input are collected, many may be irrelevant, and some may surprise you. Crowdsourcing utterances is one of the most effective ways to train your chatbot into a sophisticated tool.

Model Management

Select the drop-down and click "Model Management." On this page, underneath the "Model" tab highlights the scoring of each intent. It displays the F1 score of a chatbot's model. The F1 score defines its accuracy at predicting intents based on the bot's training data. You can identify areas for improvement by evaluating the F1 score of individual intents. Build a model after bot training.

Click the "Bot Training" tab. Each time you publish a new chatbot, it needs maintenance. It is important to audit utterances collected from real users to classify to intents. Bot training maintenance is a critical step to elevate the accuracy of intents. Evaluate utterances and strip any immaterial text, then classify them to a corresponding intent. Initial bot training is laborious upfront but yields model accuracy and dialog prediction.

Bot Builder dropdown

Bot Builder dropdown

Model Management

Model Management

Bot Training

Bot Training

Analyze Usage

Track bot performance using an Analytics app on the Performance page. You'll need licenses and assign users to the permission sets accompanying them.

You can deliver important metrics to your stakeholders by adding Einstein Analytics to Einstein Bots. These prebuilt reports include key metrics over the last year of data:

  • Total Sessions
  • Average Session Duration
  • Top Last Dialog
  • Escalation Success
  • Einstein Intent Usage
  • Number of Interactions
  • Sessions per Day
  • Average Session Duration per Day
  • Number of Inbound and Outbound Messages
Analytics Studio

Analytics Studio

posted February 4, 2021

Read more: 

Troubleshoot Einstein Bots: Model Build
Salesforce CMS: What it is, what it isn’t

Check the articles below

February 11, 2021

How to resolve a model build error.IntroductionAs you

February 8, 2021

Salesforce CMSSalesforce CMS is a hybrid content management

February 2, 2021

Insert this component into a Salesforce record page

>