What the Leaders say!


So here is what our leaders say about Chat Bots. I am pretty sure that down the line every site with an online support will soon start harnessing the power of Chat Bots.

What’s all the fuss about Einstein Bots ?

So in simple words – Einstein Bot is nothing but a Chat Bot. It’s designed to take care of customers when an Agent couldn’t make it. You know what we don’t really require a Human Agent for simple use cases like Tracking the Status of an Order or may be Cancelling an Order. The Agent should really focus on more complex queries. This is where Chat Bots comes into play. They are built to support the Human Agents so that by the time the Agent takes over the case, s/he already has a good context of the situation. And most importantly, Einstein Bots are powered by Salesforce’s very own AI.

What are my pre-requisites ?

Now how can I build an Einstein Bot in one of my Orgs. First thing first – you need to be on the Summer’18. We all know that Summer’18 has already been released on Sandboxes and on our Developer Editions. Then the next most important thing is – Service Cloud License. It’s important to remember that Einstein Bots are a part of the Service Cloud. It’s an extension of the LiveAgent feature. Last but not the least – you can build Bots ONLY in Lightning Experience.

Dialogs, Entities & Slots

What is a Dialog ?

Let’s look at Dialog. I am certain you all might have guessed what a Dialog is. Yes, a basic unit of conversation. Think of it like a contextual talk happening between you and the Bot. It can be a Message, a Question, an Action or a Rule. Let’s look at each of these.


An example of a Message is say = “Hello! I am the Uber Bot here. How may I help you ?” It could be a greeting or a plain text conveying a message to the User.


An example of a Question is say = Assume that you are talking to Weather Bot which can tell you the Weather in Cities. So the first thing that the Bot would need to know would be – “Which City are you from ?” So that’s a question.


Alright. Let’s see what Actions are used for? In this same example of a Weather Bot, after you receive the City from the User, you would need to look into a database or may be query a bunch of records or may be even do an API call to get the weather in that city. This is where an Action comes into picture. It’s used when you want to invoke a piece of Apex code. I absolutely loved this part of it!


And the last – Rules. What if you wanted to ensure that the User isn’t making a fool out of you ? What if s/he wrote “Burger” when the Bot asked for a City ? This is where you can use Rules to validate your inputs.

What is Slot ?

Let’s get down deeper.

The next integral part of a Bot is a Slot. In simple words – it’s a variable to store the answers to the Questions that the Bot had asked. In the previous slide we saw a Question – “Which City are you from ?”. So we use a slot to store the answer from the User.

Not only can slots be used to store data, but you can use your familiar merge syntax {!slotName} in messages to interpolate slot data.

What is an Entity ?

Think of an Entity as a ‘bucket’ of slots. I mean to group all the Slots together!

A slot gets assigned to an entity, so that the system knows how to handle the slot in-/output.

Use Case – The Edesia Bot

So our use case is a foodie bot called Edesia Bot.

Using this Bot, you can find a restaurant of your own choice, track an order or even route to an agent.

Now this is very important – this is a pretty basic bot without any Apex Actions since it’s not GA yet but an example to show you the Bot.


Okay! Now let us get to the fun part folks – the hands-on demo.

Now in Summer’18, we have two kinds of Setup – a setup with just the Service Cloud features and our old setup with everything. Remember Einstein Bots is a part of the Service Cloud so let us click Service Setup.


Now, search for the word Bots and you will see Einstein Bots. So in your case, you will see this isn’t enabled. However, for me it has been enabled because I have been playing around it for a while. In addition to that, it is very important to have the LiveAgent setup too. I would like to repeat Einstein Bots is an extension of the LiveAgent feature. So since LiveAgent is outside the scope of this blog, I am NOT getting into its details but feel free to ask your questions around it. So let us click on our Bot – Edesia.




Now you can see some Audit Information about your bot. Let us look at the Menu. So you can see we have – Dialogs, Slots, Entities and Performance. Performance is more or less like a Dashboard. You can see your Bot Performance here. There are various attributes like Escalation Rate, Drop Rate etc. It is important to keep in mind that the Escalation Rate should be minimum to ensure your Bot is successful.



Let us look at Dialogs. So what is a Dialog ? Yes, Unit of Conversation. You can see I have a couple of Dialogs created already. So there is this Welcome Dialog, Find a Restaurant Dialog, Track the Order Dialog etc. These are which I created while I was playing around with the Bots. So let us take a peek at the Welcome Dialog.

Welcome Dialog.png

Like I mentioned before, a Dialog can be a Message, Action, Rule or Question. So in my Welcome Dialog, I am using a Message to give a greeting to my User. Now, it is very important to reveal that it is a Bot to your end users.

Now, what if we created a Dialog right now? So let me recreate my Find a Restaurant Dialog as Spot a Restaurant Dialog. So first – click on this little drop down and click New Dialog. Name it as Spot a Restaurant. Perfect!

New Dialog.png



Now the first thing we have to ask is the City. So let me add a Question. Which City are you from? Now, I am going to create a Slot called ahCity and I am going to group this slot under an Entity called Apex Hours.


Now what is next? We need to get the Cuisine of choice. So let us ask another Question – What is the Cuisine of your choice? This time my slot will be ahCuisine. But wait, let’s make it easy for the our dear users. Let us give them some options/choices. So I am adding Chinese and Pizza.


There you go! Now let us ask if he or she wants a Home Delivery. So that will be another question. Let us ask – Do you want to opt for Home Delivery? Let us create slot called ahHomeDelivery. Let us give some choices – Yes and No.


What next? Well let us create another question about Price Range? So I am adding a Question – What is your desired price range? Let us give some options – Within 300, Within 600 and Within 900. That is it.


Now ideally, I would have added an Action that would invoke some Apex to get me the desired results by looking at some records. But this version of Einstein Bot isn’t ready yet! Sorry instead we will use some Rules and show the Users some hard-coded restaurants.

So let me add a rule if my User opted for Chinese as the cuisine. So I click on Rules. Then let me click Add Condition. I would write ahCuisne equals Chinese. Now this is the best part. You can use the slots just like variables across the entire Bot Builder. Now if it is Chinese I am routing to another pre-defined Dialog.


Let me do for Pizza also. So I click on Rules. Then let me click Add Condition. I would write ahCuisne equals Pizza. If it is Chinese I am routing to another pre-defined Dialog.


Great! We are all set. Awesome! Let us Activate and run it.

Now, I have actually setup a Force.com Site with a LiveAgent enabled. So let me click Sites. I will open my Site. You can see the Start Chat. So there is our Bot in action. So let me click Find Restaurant. I will provide my City. Then my choice of Cuisine, then the mode of delivery and finally my price range. There you go. So that’s Einstein Bot in Action!




Don’t worry, you can see this in live in my Demo video which I had done for Apex Hours 🙂 . Here is the link to it –

Things to Remember

Bots will never replace Human Agents. It’s to help the Human Agents.

Also this is very important – you cannot use bots outside of Service Cloud like say in Visualforce Pages or Lightning ComponentsNO! It ties itself to the LiveAgent feature.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s