Site Loader

 “Chatbots will power 85% of all customer service interactions by 2020.”

In this article we will provide an overview of Salesforce Chatbots. You do not need to be a developer to understand this article.

What are Einstein Bots?

Delivered in the Winter ’19 release of Salesforce, Einstein Bots are chatbots (a program that simulates a human conversation mainly asking and answering questions) that can act as agents in a chat. Einstein Bots can provide prospects, clients or external users with fast answers to common questions, reducing the need for human interaction. These bots can access your Salesforce environment and data to obtain custom answers to provide dynamic answers to typical queries, for example, create or solve a customer support case, provide status details on an order or answer queries about a invoice sent.

Why should you consider implementing a Chatbot?

  • Respond to clients more quickly – Avoid the need for a client to wait for an agent to be available to respond.
  • Reduce cases – Einstein bots which have been well designed can solve client problems, reducing the amount of cases which agents need to review and respond to.
  • Complex cases can still be handled by agents – If the bot cannot solve the user’s problem, the bot can pass the conversation to an available agent to resolve (the agent can view the history of the chat and the record of the user in the service console).
  • Agents can focus on the important/difficult topics – The chatbot can focus on the easiest or common questions, leaving agents to focus on the really important or difficult requests.
  • Potential cost reduction – The chatbot can help to reduce costs because agents can attend ‘higher value’ topics and potentially there is scope to reduce agents.
  • Provide extended support to clients – Chatbots can work 24×7 answering queries, even if your agents only work standard working hours.
  • Improve customer satisfaction – Through providing clients with better support services, customer satisfaction can be improved.

What do you need to implement an Einstein Bot?

  • To implement an Einstein Bot, first of all you need to check your Salesforce Licences as you will need Service Cloud and Live Agent Licenses.
  • A simple Einstein Bot can be created and configured using the declarative interface of Salesforce via setup, providing static answers to typical questions.
  • Custom development (and a competent developer) will be required to allow the chatbot to use advanced logic respond with more dynamic answers – such as creating new cases, responding with personalized emails with documents attached, updating salesforce data etc.
  • In Service Cloud, channels and live agents will need to be configured to receive chats when conversation is passed from the chatbot to an agent.
  • The chatbot will to be hosted somewhere, such as a web portal or within a Salesforce community for example.

What is the structure of an Einstein Bot?

Einstein bot uses Salesforce Einstein, which is a collection of AI (Artificial Intelligence) technologies for CRM. This provides the chatbot with advanced capabilities such as the ability to understand human input through Natural Language Understanding (NLU) and learn how to respond to customers.

An Einstein Bot consists of 4 major elements:

  1. Dialog:
    A dialog is a conversation snippet and it’s the main element of a chatbot. A conversation with a user can switch between different dialogs depending on the user’s input. Example dialogs can provide a welcome message, provide status details of an order, switch conversation to an agent etc. A dialog can show messages, ask questions, show menus with options, call a flow, respond with the output of apex code, show another dialog and so on. You can combine different messages and questions in the same dialog and construct a “fluent” conversation.

  2. Intent:
    An intent is what your customer wants to ask to your chatbot, which the chatbot then needs to be able to interpret/understand the request to be able to redirect your user to the most appropriate dialog. For example, a user may want to find out the status of their order. The ‘intent’ can be written in many different ways: “what is the status of my order?”, “when will my order arrive?”, “where is my order?”. The chatbot is configured to associate the intent with an appropriately linked dialog which for example will in response ask the user for the order number.
    It is important to train the chatbot well so that it understands the user’s intent, with the wide variety of ways that a user can ask the same question. Chatbots are “trained” with different ‘utterances’ which are combinations of phrases the user could input. At a minimum 20 utterances should be configured for each intent to provide Salesforce with the minimum amount of language training, although it is best practice to have 100+ utterances configured.

  3. Entity:
    An entity is a type of data we want to collect from a user, for example an order number or an email address. Entity’s can be used to check a data item provided by a user and validate it against a particular expected format.
    You can have for example an entity called “email format” which is associated with a dialog, and checks to make sure an email provided by a user is a valid email address. If the user inputs an email address which does not include ‘@’ and a valid domain suffix such as ‘.com’, the chatbot will reject the input and request the user to input the email address again. Once a valid email address has been provided, email address value will be stored in a variable.

    Salesforce provides several standard entities by default, such as numbers, dates, locations etc. Custom Entities can be created as required.

  4. Variable:
    A variable is a place where the chatbot stores user input which can subsequently be used in a Salesforce flow or in custom apex code. An example variable could be ‘OrderNumber’ which stores the order number provided by a user before it is then used to query the database and obtain the status of that order. Variables have to be associated to an entity and we can use them in a dialog to show dynamic values to the user.

An Example Einstein Bot

Here is a quick example showing a basic flow, where we welcome a user and then provide the status of a particular support case record.

Example Einstein Bot – How is this implemented?

  1. First, an initial dialog is created which is the initial welcome message which is shown when the chat begins.
  2. An intent called ‘Case Status’ is configured with utterances to provide Salesforce with an initial training set of different phrases a users could input to request the status of a case. The chatbot will try to match these words with an intent to understand what the user wants to do. This intent is associated with a dialog called ‘Case Status’ so that once the user’s input is matched with the intent, the dialog shows the user a relevant question in this case ‘What is your Case Number’?
  3. A variable called ‘caseNumber’ is used to store the case number inserted by the user in response to the question. In this example case, case number always have the format co-00000, so the variable is associated with an entity that will validate the user’s input and check that the input starts with ‘co-‘ and is followed by 5 numbers.
  4. The ‘Case Status’ dialog is configured to call a flow in Salesforce or an apex code. This is custom logic implemented in the Salesforce environment which will receive the caseNumber variable as input, and be responsible for obtaining the status of the case. Another variable is used called ‘caseStatus’ to store the output.
  5. Finally, in the same dialog the variable “caseStatus” is included in the response message to the user. The message is configured in the dialog with token references to the variables which are replaced with the contents of the variables at runtime: “The Case with number {!caseNumber} has the status: {!caseStatus}. Can I help you in something else?”. 

There are best practices for conversation design and much more complex scenarios which can be implemented using Einstein Bots.

If you are interested in understanding more about Einstein bots, the possibilities, and how they could be implemented to benefit your company, then do not hesitate to contact us.

Post Author: Daniel Velez

2 Replies to “Salesforce Einstein Bots”

  1. Hey Daniel, great article! Do you know what the considerations are for using utterances within an Intent Set vs. using the Utterances section on the Dialogue admin page?

    1. Hi Joe, thanks for your comment.
      Basically an Intent Set allows you to use your utterances across multiple bots (Examples could be “Hello” and “Contact Agent” intents). If you use the Utterance Section on the dialog of your bot definition you will not be able to share that “knowledge” in other bots.

Leave a Reply

Your email address will not be published. Required fields are marked *