Creating an AtBot ChatBot connected to Dynamics 365

Page 1

Dynamics Companions BARE BONES CONFIGURATION GUIDES

TABLE OF CONTENTS

CONFIGURING ATBOT

Building a LUIS language model ................................................................... 3 MODULE 1: CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365 Logging into LUIS ................................................................................... 4 Creating a LUIS Application ................................................................... 7 Creating a LUIS Intent .......................................................................... 13

CONFIGURATION BLUEPRINT

Building an Utterance library............................................................... 18 Creating an Entity ................................................................................ 25 Associating Entities with Utterances ................................................... 29 Training your LUIS Application ............................................................ 34

CONFIGURING ATBOT

Testing your LUIS Application .............................................................. 38 Publishing your LUIS Application ......................................................... 44 Review ................................................................................................. 50

CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot ....................................................................................... 51 Logging into AtBot ............................................................................... 52 Adding Users to AtBot ......................................................................... 56 Creating an AtBot ................................................................................ 63 Creating a new Azure Dashboard ........................................................ 71

Although Internet Explorer and Edge are great browsers, Chrome does have one feature that is really useful for us when we are demonstrating Dynamics 365. Chrome will allow us to have multiple personas up and running within different browser sessions and they keep all of their session information separate. So if we are trying to show how multiple people work through a scenario, we can have them up and running at the same time without having to resort to multiple in private sessions and also multiple browser types to keep the people in check.

Creating an Azure Bot Channel ............................................................ 76 Registering a Direct Line Bot Channel ............................................... 100 Linking the AtBot with the Bot Channel ............................................ 105 Linking the LUIS Intent with the AtBot .............................................. 108 Configuring Intent Vector Entities ..................................................... 118 Creating an AtBot Skill Category........................................................ 126 Adding the Skill Category to the AtBot .............................................. 132 Review ............................................................................................... 137 Creating the AtBot Conversation Flow ..................................................... 138 Creating the AtBot Conversation Flow .............................................. 139 Adding the Skill to the Category ........................................................ 161 Testing the AtBot Conversation......................................................... 167 Extending the Conversation to show data from Dynamics 365 ........ 174

So even though it pains me to say it, it might be a good idea to use Chrome just for this reason.

Review ............................................................................................... 214 Integrating the Bot With Teams ............................................................... 215 Registering the Teams Channel ......................................................... 216 Using the Bot within Teams............................................................... 222 Review ............................................................................................... 230 Conclusion ................................................................................................ 231

www.dynamicscompanions.com Dynamics Companions

-1-

www.blindsquirrelpublishing.com © 2017 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot ChatBot connected to Dynamics 365 Creating Bots that integrate with Dynamics 365 has not been the easiest thing to do in the past for nondevelopers because it has required a lot of coding to be done, and also in order to change the conversation flows you needed to update and redeploy the code for the Bot to make it available to the users. Recently we were introduced to a partner solution called AtBot that allows us to create Bot services through the AtBot portal that links to LUIS and Azure Bot Services, allowing us to build conversation flows and dialogs using Flow as the authoring engine. This allows us to build Bots with zero coding experience that also leverages the power of Flow to connect to other services seamlessly, allowing us to integrate Dynamics 365 using the standard entities. In this walkthrough we will show you how to configure and build an AtBot Bot that connects to Dynamics 365, using LUIS as the engine for discovering the users intent and deploy it out to chat platforms like Microsoft Teams. This is gold I tell you, gold!

Topics Covered •

Building a LUIS language model

Creating an AtBot

Creating the AtBot Conversation Flow

Integrating the Bot With Teams

www.dynamicscompanions.com Dynamics Companions

-2-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building a LUIS language model We will start off by creating a LUIS language model that will be used by the Bot to infer what the intention of our questions are when we ask them.

Topics Covered •

Logging into LUIS

Creating a LUIS Application

Creating a LUIS Intent

Building an Utterance library

Creating an Entity

Associating Entities with Utterances

Training your LUIS Application

Testing your LUIS Application

Publishing your LUIS Application

www.dynamicscompanions.com Dynamics Companions

-3-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into LUIS We will start off by logging into the LUIS.

How to do it… To do this, all you need to do is navigate to the LUIS website by going to http://www.luis.ai and then click on the Login / Sign up link on the page.

And that will take you into the My Apps page within LUIS where you will be able to manage all of the different applications that you have trained within the Language Understanding system.

This will allow you to authenticate with LUIS using your AD account.

www.dynamicscompanions.com Dynamics Companions

-4-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into LUIS How to do it…

To do this, all you need to do is navigate to the LUIS website by going to http://www.luis.ai and then click on the Login / Sign up link on the page.

www.dynamicscompanions.com Dynamics Companions

-5-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into LUIS How to do it…

This will allow you to authenticate with LUIS using your AD account. And that will take you into the My Apps page within LUIS where you will be able to manage all of the different applications that you have trained within the Language Understanding system.

www.dynamicscompanions.com Dynamics Companions

-6-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application Now that we are logged into LUIS, we can create a Language Understanding App that we will be able to train on all of the different ways that we can ask questions to our bot.

How to do it… Start off by clicking on the + Create new app link within the My Apps page.

Description to Supply Chain Language Domain Service.

This will open up the Create new app form where we will be able to set up the details for our LUIS app.

After you have done that just click on the Done button to create the new LUIS app. This will take us into the Intents page which will allow us to create groupings of intents (or general objectives) that we will be able to classify out commands though.

Start off by giving the app a Name. Here we set the Name to Supply Chain Service. And if you want, you can give your app a more detailed Description. Here we set the

www.dynamicscompanions.com Dynamics Companions

-7-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application How to do it…

Start off by clicking on the + Create new app link within the My Apps page.

www.dynamicscompanions.com Dynamics Companions

-8-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application How to do it…

This will open up the Create new app form where we will be able to set up the details for our LUIS app.

www.dynamicscompanions.com Dynamics Companions

-9-

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application How to do it…

Start off by giving the app a Name. Here we set the Name to Supply Chain Service.

www.dynamicscompanions.com Dynamics Companions

- 10 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application How to do it…

And if you want, you can give your app a more detailed Description. Here we set the Description to Supply Chain Language Domain Service. After you have done that just click on the Done button to create the new LUIS app.

www.dynamicscompanions.com Dynamics Companions

- 11 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Application How to do it…

This will take us into the Intents page which will allow us to create groupings of intents (or general objectives) that we will be able to classify out commands though.

www.dynamicscompanions.com Dynamics Companions

- 12 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Intent Now that we have the app we can start building the different types of questions or intents that LUIS will be able to use to classify statements with.

How to do it… All we need to do here is click on the + Create new intent link in the header of the Intents page.

Product Inquiry because all of the sentences that we use to train LUIS will be related to inquiring about a product and also the availability of the product.

This will open up a Create new intent dialog box.

This will take us into the Intents page within LUIS that we will use to describe all of the different ways that we are able to ask the same question.

We just need to give the Intent and Intent name and then click on the Done button. For this example, we set the Intent name to

www.dynamicscompanions.com Dynamics Companions

- 13 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Intent How to do it…

All we need to do here is click on the + Create new intent link in the header of the Intents page.

www.dynamicscompanions.com Dynamics Companions

- 14 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Intent How to do it…

This will open up a Create new intent dialog box.

www.dynamicscompanions.com Dynamics Companions

- 15 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Intent How to do it…

We just need to give the Intent and Intent name and then click on the Done button. For this example, we set the Intent name to Product Inquiry because all of the sentences that we use to train LUIS will be related to inquiring about a product and also the availability of the product.

www.dynamicscompanions.com Dynamics Companions

- 16 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a LUIS Intent How to do it…

This will take us into the Intents page within LUIS that we will use to describe all of the different ways that we are able to ask the same question.

www.dynamicscompanions.com Dynamics Companions

- 17 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library Now that we have the intent defined we can start building the library of different ways that we can ask the same question by defining Utterances within the Intents section of LUIS. These will be the basis of our training model within LUIS that will help the system understand your questions.

How to do it… All we need to do is start typing in the different Utterances that we may use to achieve the intent that we are defining.

We will add another common way of inquiring about products and add how many bricks do we have?

For our first one, we will type in a common way to ask about a product and enter Do we have any bricks?

Next, we will rephrase it and add another variation and also change the name of the product that we are looking for to give us some variation– Do we have any plates in inventory?

When we press return, the sentence will be added to the list of Utterances. We need at least five of these utterance examples in order to start training the LUIS model.

And we will add one last variation of the utterance and add do we have any tiles in stock?

Let’s continue adding more utterances and add Are there any bricks in stock?.

www.dynamicscompanions.com Dynamics Companions

That should give us enough to start training LUIS.

- 18 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

All we need to do is start typing in the different Utterances that we may use to achieve the intent that we are defining. For our first one, we will type in a common way to ask about a product and enter Do we have any bricks?

www.dynamicscompanions.com Dynamics Companions

- 19 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

When we press return, the sentence will be added to the list of Utterances. We need at least five of these utterance examples in order to start training the LUIS model.

www.dynamicscompanions.com Dynamics Companions

- 20 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

Let’s continue adding more utterances and add Are there any bricks in stock?.

www.dynamicscompanions.com Dynamics Companions

- 21 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

We will add another common way of inquiring about products and add how many bricks do we have?

www.dynamicscompanions.com Dynamics Companions

- 22 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

Next, we will rephrase it and add another variation and also change the name of the product that we are looking for to give us some variation– Do we have any plates in inventory?

www.dynamicscompanions.com Dynamics Companions

- 23 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Building an Utterance library How to do it…

And we will add one last variation of the utterance and add do we have any tiles in stock? That should give us enough to start training LUIS.

www.dynamicscompanions.com Dynamics Companions

- 24 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Entity There is another structure that we can use within LUIS called an Entity which is a way that we can mark items within a sentence that common in some way. These entities are then passed through as additional information regarding the intent.

How to do it… To start off, we will switch to the Entities page within LUIS and then click on the + Create new entity link.

entity that we can use to capture the type of product that we are asking about so we will set the Entity name to Product and then click on the Done button.

This will open up the new Entity dialog, and we will need to assign the entity an Entity name. For this example, we will want to create an

www.dynamicscompanions.com Dynamics Companions

Now we have an entity that we can use to embellish our LUIS model with.

- 25 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Entity How to do it…

To start off, we will switch to the Entities page within LUIS and then click on the + Create new entity link.

www.dynamicscompanions.com Dynamics Companions

- 26 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Entity How to do it…

This will open up the new Entity dialog, and we will need to assign the entity an Entity name. For this example, we will want to create an entity that we can use to capture the type of product that we are asking about so we will set the Entity name to Product and then click on the Done button.

www.dynamicscompanions.com Dynamics Companions

- 27 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Entity How to do it…

Now we have an entity that we can use to embellish our LUIS model with.

www.dynamicscompanions.com Dynamics Companions

- 28 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Associating Entities with Utterances Now that we have created our Entity we can start using it within the Intents to identify the parts of the utterances that hold the clues to what the user is asking for.

How to do it… On the Intent page, if we hover over any of the words within the Utterances we will see that the word gets bracketed like this – see the [tiles] on the page.

This will change the utterance to show the tiles work as Product to show the use of that word. We can continue to mark all of the other words that relate to a product name within the other four utterances.

If we right-mouse-click on the word then we get other options, including the option to mark the word as an entity – in this case, we can select the Product Entity.

www.dynamicscompanions.com Dynamics Companions

- 29 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Associating Entities with Utterances How to do it…

On the Intent page, if we hover over any of the words within the Utterances we will see that the word gets bracketed like this – see the [tiles] on the page.

www.dynamicscompanions.com Dynamics Companions

- 30 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Associating Entities with Utterances How to do it…

If we right-mouse-click on the word then we get other options, including the option to mark the word as an entity – in this case, we can select the Product Entity.

www.dynamicscompanions.com Dynamics Companions

- 31 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Associating Entities with Utterances How to do it…

This will change the utterance to show the tiles work as Product to show the use of that word.

www.dynamicscompanions.com Dynamics Companions

- 32 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Associating Entities with Utterances How to do it…

We can continue to mark all of the other words that relate to a product name within the other four utterances.

www.dynamicscompanions.com Dynamics Companions

- 33 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Training your LUIS Application Now that we have configured our model we can start making it usable by training it.

How to do it… To train LUIS on the language statements that we have defined in our LUIS app, all we need to do is click on the Train button.

www.dynamicscompanions.com Dynamics Companions

This will queue the app for training. And within a few seconds, the training will be finished, and we can start using it.

- 34 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Training your LUIS Application How to do it…

To train LUIS on the language statements that we have defined in our LUIS app, all we need to do is click on the Train button.

www.dynamicscompanions.com Dynamics Companions

- 35 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Training your LUIS Application How to do it…

This will queue the app for training.

www.dynamicscompanions.com Dynamics Companions

- 36 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Training your LUIS Application How to do it…

And within a few seconds, the training will be finished, and we can start using it.

www.dynamicscompanions.com Dynamics Companions

- 37 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application Before we publish this to production though we will take a little time to test the model and see if it understands what we are asking when we chat with it.

How to do it… To test the model we just need to click on the Test button in the menu bar.

This will return back the result that this question is probably a Product Inquiry and LUIS is 96% certain of it.

This will open up the Test panel where we can start chatting with LUIS.

If we click on the Inspect link below the result then we can see more detail about the sentence and we can see that it has also identified that the Product that I was interested in was cogs.

All we need to do is type in the statement that we what LUIS to resolve. In this case, we just ask do we have any cogs in stock?

www.dynamicscompanions.com Dynamics Companions

- 38 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application How to do it…

To test the model we just need to click on the Test button in the menu bar.

www.dynamicscompanions.com Dynamics Companions

- 39 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application How to do it…

This will open up the Test panel where we can start chatting with LUIS.

www.dynamicscompanions.com Dynamics Companions

- 40 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application How to do it…

All we need to do is type in the statement that we what LUIS to resolve. In this case, we just ask do we have any cogs in stock?

www.dynamicscompanions.com Dynamics Companions

- 41 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application How to do it…

This will return back the result that this question is probably a Product Inquiry and LUIS is 96% certain of it.

www.dynamicscompanions.com Dynamics Companions

- 42 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing your LUIS Application How to do it…

If we click on the Inspect link below the result, then we can see more detail about the sentence, and we can see that it has also identified that the Product that I was interested in was cogs.

www.dynamicscompanions.com Dynamics Companions

- 43 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application The final step in the process is to publish the LUIS app so that we can use it within our Bot.

How to do it… To do this, all we need to do is click on the Publish button.

Now we can see all of the details about the App by clicking on the Manage button in the header.

This will open up a confirmation dialog box that will allow us to choose where we want to publish the app. In this case, we will leave the environment as the default Production value and then click on the Publish button.

If we click on the Keys and Endpoints option, then we will also see some more information about the app including the endpoints, authoring key and also the password key that we will need later on to link our bot to the LUIS app.

After a few seconds, the LUIS app will publish, and we will get confirmation in the header.

www.dynamicscompanions.com Dynamics Companions

So bookmark this page for one of the later steps.

- 44 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application How to do it…

To do this, all we need to do is click on the Publish button.

www.dynamicscompanions.com Dynamics Companions

- 45 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application How to do it…

This will open up a confirmation dialog box that will allow us to choose where we want to publish the app. In this case, we will leave the environment as the default Production value and then click on the Publish button.

www.dynamicscompanions.com Dynamics Companions

- 46 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application How to do it…

After a few seconds, the LUIS app will publish, and we will get confirmation in the header.

www.dynamicscompanions.com Dynamics Companions

- 47 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application How to do it…

Now we can see all of the details about the App by clicking on the Manage button in the header.

www.dynamicscompanions.com Dynamics Companions

- 48 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Publishing your LUIS Application How to do it…

If we click on the Keys and Endpoints option, then we will also see some more information about the app including the endpoints, authoring key and also the password key that we will need later on to link our bot to the LUIS app. So bookmark this page for one of the later steps.

www.dynamicscompanions.com Dynamics Companions

- 49 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Review How easy was that. We have just created a LUIS model that will allow us to ask questions regarding the products in our inventory. Using LUIS will make the conversation a lot easier with the bot because we don’t have to use precisely formatted phrases and it will extract the information that we need from the commands that we send it.

www.dynamicscompanions.com Dynamics Companions

- 50 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Now that we have created our LUIS model we can start working on the creation of our AtBot which we can then use within Flow to manage our conversations.

Topics Covered •

Logging into AtBot

Adding Users to AtBot

Creating an AtBot

Creating a new Azure Dashboard

Creating an Azure Bot Channel

Registering a Direct Line Bot Channel

Linking the AtBot with the Bot Channel

Linking the LUIS Intent with the AtBot

Configuring Intent Vector Entities

Creating an AtBot Skill Category

Adding the Skill Category to the AtBot

www.dynamicscompanions.com Dynamics Companions

- 51 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into AtBot Let’s start off by going to the AtBot site and logging on.

How to do it… To do this, just navigate to the AtBot site by going to atbot.ai and then click on the Admin Portal button in the header of the page.

This will take us into the AtBot Admin Portal and we will be able to see all of the configuration options that are available for us.

When we see the AtBot Admin page, click on the Log into the Portal tile.

www.dynamicscompanions.com Dynamics Companions

- 52 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into AtBot How to do it…

To do this, just navigate to the AtBot site by going to atbot.ai and then click on the Admin Portal button in the header of the page.

www.dynamicscompanions.com Dynamics Companions

- 53 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into AtBot How to do it…

When we see the AtBot Admin page, click on the Log in to the Portal tile.

www.dynamicscompanions.com Dynamics Companions

- 54 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Logging into AtBot How to do it…

This will take us into the AtBot Admin Portal, and we will be able to see all of the configuration options that are available for us.

www.dynamicscompanions.com Dynamics Companions

- 55 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot Before we start creating the new AtBot configuration we will do one small piece of housekeeping and add our user to AtBot so that we have permissions to use it later on.

How to do it… To do this, expand out the Tenant Management menu item and click on the Licensed Users link.

All we need to do is type in the email address of the user that we are using and then select the email address.

This will open up the list of licensed users and if you are not already in the security list then just click on the Add Single User button.

After we have done that we can click on the Add User button.

This will open up the Add Single User dialog box which will allow us to add our user to the AtBot subscription.

www.dynamicscompanions.com Dynamics Companions

And we will then get a message that tells us that we have successfully added the user and we can click on the OK button.

- 56 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

To do this, expand out the Tenant Management menu item and click on the Licensed Users link.

www.dynamicscompanions.com Dynamics Companions

- 57 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

This will open up the list of licensed users and if you are not already in the security list then just click on the Add Single User button.

www.dynamicscompanions.com Dynamics Companions

- 58 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

This will open up the Add Single User dialog box which will allow us to add our user to the AtBot subscription.

www.dynamicscompanions.com Dynamics Companions

- 59 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

All we need to do is type in the email address of the user that we are using and then select the email address.

www.dynamicscompanions.com Dynamics Companions

- 60 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

After we have done that we can click on the Add User button.

www.dynamicscompanions.com Dynamics Companions

- 61 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding Users to AtBot How to do it…

And we will then get a message that tells us that we have successfully added the user and we can click on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 62 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Now we will want to start creating our AtBot bot which we will be able to train using our LUIS intents and also link to Flow to manage the conversations.

How to do it… Start off by expanding out the Bot Management menu item and then click on the Enterprise Bots. The Enterprise Bots are the ones that we will be able to use within Skype later on, as opposed to the Web Bots which can only be embedded in web pages.

That will create a new Enterprise Bot for us. We can add a more detailed Bot Description if we like to add a little more detail about the Bot. If we scroll down the page a little to the Bot Registration area then we will see that there is still a little more configuration that we need to do.

This will open up the Enterprise Bots maintenance form, and we can create a new AtBot configuration by clicking on the New Enterprise Bot button.

The AtBot uses the Azure Bot Service to manage some of the Bot functions and it required a Bot App ID, Password, and also a communication channel that we can use to send all of the messages through. So we will need to set these up next and return here to fill in the details.

This will open up the dialog box where we can give our new AtBot a Bot Name. For this example, we set the Bot Name to SupplyChainBot and then clicked on the Create Bot button.

www.dynamicscompanions.com Dynamics Companions

- 63 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

Start off by expanding out the Bot Management menu item and then click on the Enterprise Bots. The Enterprise Bots are the ones that we will be able to use within Skype later on, as opposed to the Web Bots which can only be embedded in web pages.

www.dynamicscompanions.com Dynamics Companions

- 64 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

This will open up the Enterprise Bots maintenance form, and we can create a new AtBot configuration by clicking on the New Enterprise Bot button.

www.dynamicscompanions.com Dynamics Companions

- 65 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

This will open up the dialog box where we can give our new AtBot a Bot Name.

www.dynamicscompanions.com Dynamics Companions

- 66 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

For this example, we set the Bot Name to SupplyChainBot and then clicked on the Create Bot button.

www.dynamicscompanions.com Dynamics Companions

- 67 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

That will create a new Enterprise Bot for us.

www.dynamicscompanions.com Dynamics Companions

- 68 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

We can add a more detailed Bot Description if we like to add a little more detail about the Bot.

www.dynamicscompanions.com Dynamics Companions

- 69 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot How to do it…

If we scroll down the page a little to the Bot Registration area, then we will see that there is still a little more configuration that we need to do. The AtBot uses the Azure Bot Service to manage some of the Bot functions, and it required a Bot App ID, Password, and also a communication channel that we can use to send all of the messages through. So we will need to set these up next and return here to fill in the details.

www.dynamicscompanions.com Dynamics Companions

- 70 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a new Azure Dashboard We will do all of this within the Azure portal, but before we start creating new bot services, we will make things a little tidier within Azure by creating a dedicated workspace for all of the Azure resources that we create for this project.

How to do it… To do this, open up the Azure Portal by going to portal.azure.com and then click on the + New Dashboard link in the menu bar.

Set the name of the new dashboard to Supply Chain Bot and then click on the Done customizing button in the menu bar.

This will create a new dashboard template for us.

When we return back to the portal and the new dashboard we will have a clean slate that we can use to organize the project's resources.

www.dynamicscompanions.com Dynamics Companions

- 71 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a new Azure Dashboard How to do it…

To do this, open up the Azure Portal by going to portal.azure.com and then click on the + New Dashboard link in the menu bar.

www.dynamicscompanions.com Dynamics Companions

- 72 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a new Azure Dashboard How to do it…

This will create a new dashboard template for us.

www.dynamicscompanions.com Dynamics Companions

- 73 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a new Azure Dashboard How to do it…

Set the name of the new dashboard to Supply Chain Bot and then click on the Done customizing button in the menu bar.

www.dynamicscompanions.com Dynamics Companions

- 74 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating a new Azure Dashboard How to do it…

When we return back to the portal and the new dashboard we will have a clean slate that we can use to organize the project's resources.

www.dynamicscompanions.com Dynamics Companions

- 75 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel Now we will want to create a new Azure Bot Channel resource that we will be able to link back to the AtBot that we just configured. This will manage the Bot interactions and also the channels that we will be able to publish the Bot on.

How to do it… To do this, just click on the + Create a resource link to open up the New resource browser.

to SupplyChainBot and then clicked on the OK button.

In the search field type in Bot Channels Registration and select the Bot Channels Registration option.

Next, we will click on the Location drop-down and select the Azure region that we want to deploy the service in. For me, I always select the East US region.

This will take us to the new Bot Channels Registration template resource, and all we need to do here is click on the Create button.

Next, we will want to select the Pricing tier that we will use for the Bot Channel. We can select from the dropdown list, or click on the View full pricing details link to see how much we are going to invest in this bot. For this example, we will select the S1 option and then click on the Select button.

This will take us to the configuration page for the Bot Channels Registration service where we will be able to specify the configurations of the Bot. We will start off by giving our service a unique Bot Name. In this case, we set the bot name to MuFifeSupplyChainBot. I prefixed the bot with my user alias which is an easy way to make sure that the name is unique.

Next, we will need to specify the Message endpoint for the Bot Channel. To get this, return back to the AtBot registration page, and we will see that there is a Messaging Endpoint that is associated with the AtBot. Copy this entire URL.

Next, we will want to assign the Bot Service to a Resource Group. I don’t want to just assign it to any of the existing groups because that would intermingle it with other projects so we will click on the Create new link.

And then paste it into the Messaging endpoint field in the Azure Bot Channel Registration service. Now we need to create an App ID and Password for the Bot Channel. To do this click on the Microsoft App ID and password button and then select the + Create New button.

This allows us to create a new Resource group name. Here we set the Resource group Name

www.dynamicscompanions.com Dynamics Companions

- 76 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

When the Create new Microsoft App ID panel is shown click on the Create App ID in the App Registration Portal link.

Paste in the Microsoft App ID and the Password and then click on the OK button. After we have done that we can click on the Create button.

This will take us to the Generate App ID and Password page in the Application Registration Portal. The App will already have a name that matches the Bot Service and also a new App ID to reference it. All we need to a password, and we can get that by clicking on the Generate an app password to continue button.

This will start the process for creating the Bot Channel Registration service. In a few seconds we will get confirmation that the service has been deployed, and to make it easier to access we will click on the Pin to dashboard button.

This will create a new Password for us.

This will add the Bot Channel Registration service to the dashboard for us.

Copy the App ID and the Password to notepad, for now; we will need these later on in the setup.

If we click on the tile then we will be taken into the Bot service details page.

Return back to the Bot Channel Registration configuration panel, and we will see that there are placeholders for the App ID and Password.

www.dynamicscompanions.com Dynamics Companions

- 77 -

www.blindsquirrelpublishing.com Š 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

To do this, just click on the + Create a resource link to open up the New resource browser.

www.dynamicscompanions.com Dynamics Companions

- 78 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

In the search field type in Bot Channels Registration and select the Bot Channels Registration option.

www.dynamicscompanions.com Dynamics Companions

- 79 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will take us to the new Bot Channels Registration template resource, and all we need to do here is click on the Create button.

www.dynamicscompanions.com Dynamics Companions

- 80 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will take us to the configuration page for the Bot Channels Registration service where we will be able to specify the configurations of the Bot.

www.dynamicscompanions.com Dynamics Companions

- 81 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

We will start off by giving our service a unique Bot Name. In this case, we set the bot name to MuFifeSupplyChainBot. I prefixed the bot with my user alias which is an easy way to make sure that the name is unique.

www.dynamicscompanions.com Dynamics Companions

- 82 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Next, we will want to assign the Bot Service to a Resource Group. I don’t want to just assign it to any of the existing groups because that would intermingle it with other projects so we will click on the Create new link.

www.dynamicscompanions.com Dynamics Companions

- 83 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This allows us to create a new Resource group name. Here we set the Resource group Name to SupplyChainBot and then clicked on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 84 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Next, we will click on the Location drop-down and select the Azure region that we want to deploy the service in. For me, I always select the East US region.

www.dynamicscompanions.com Dynamics Companions

- 85 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Next, we will want to select the Pricing tier that we will use for the Bot Channel. We can select from the dropdown list, or click on the View full pricing details link to see how much we are going to invest in this bot. For this example, we will select the S1 option and then click on the Select button.

www.dynamicscompanions.com Dynamics Companions

- 86 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Next, we will need to specify the Message endpoint for the Bot Channel. To get this, return back to the AtBot registration page, and we will see that there is a Messaging Endpoint that is associated with the AtBot. Copy this entire URL.

www.dynamicscompanions.com Dynamics Companions

- 87 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

And then paste it into the Messaging endpoint field in the Azure Bot Channel Registration service.

www.dynamicscompanions.com Dynamics Companions

- 88 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Now we need to create an App ID and Password for the Bot Channel. To do this click on the Microsoft App ID and password button and then select the + Create New button.

www.dynamicscompanions.com Dynamics Companions

- 89 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

When the Create new Microsoft App ID panel is shown click on the Create App ID in the App Registration Portal link.

www.dynamicscompanions.com Dynamics Companions

- 90 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will take us to the Generate App ID and Password page in the Application Registration Portal. The App will already have a name that matches the Bot Service and also a new App ID to reference it. All we need to a password, and we can get that by clicking on the Generate an app password to continue button.

www.dynamicscompanions.com Dynamics Companions

- 91 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will create a new Password for us. Copy the App ID and the Password to notepad, for now; we will need these later on in the setup.

www.dynamicscompanions.com Dynamics Companions

- 92 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Return back to the Bot Channel Registration configuration panel, and we will see that there are placeholders for the App ID and Password.

www.dynamicscompanions.com Dynamics Companions

- 93 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

Paste in the Microsoft App ID and the Password and then click on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 94 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

After we have done that we can click on the Create button.

www.dynamicscompanions.com Dynamics Companions

- 95 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will start the process of creating the Bot Channel Registration service.

www.dynamicscompanions.com Dynamics Companions

- 96 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

In a few seconds we will get confirmation that the service has been deployed, and to make it easier to access we will click on the Pin to dashboard button.

www.dynamicscompanions.com Dynamics Companions

- 97 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

This will add the Bot Channel Registration service to the dashboard for us.

www.dynamicscompanions.com Dynamics Companions

- 98 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an Azure Bot Channel How to do it…

If we click on the tile, then we will be taken into the Bot service details page.

www.dynamicscompanions.com Dynamics Companions

- 99 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering a Direct Line Bot Channel Now that we have the Bot Channel Registration service created we can register a Direct Line channel which is going to be required by the AtBot service.

How to do it… To do this click on the Channels option within our new Bot Channel Registration service and we will see a number of different channel options that we have for the Bot to be published within.

That will open up the Direct Line channel configuration page and it has two Secret Keys that are used for authentication. Click on the Show link for the first key to see the fill key and copy the key details to notepad along with the App ID and Password.

The one that we are interested in right now is the Direct line channel which is the one that looks like a globe, so we just want to click on that icon.

www.dynamicscompanions.com Dynamics Companions

After you have done that, click on the Done button.

- 100 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering a Direct Line Bot Channel How to do it…

To do this click on the Channels option within our new Bot Channel Registration service and we will see a number of different channel options that we have for the Bot to be published within.

www.dynamicscompanions.com Dynamics Companions

- 101 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering a Direct Line Bot Channel How to do it…

The one that we are interested in right now is the Direct line channel which is the one that looks like a globe, so we just want to click on that icon.

www.dynamicscompanions.com Dynamics Companions

- 102 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering a Direct Line Bot Channel How to do it…

That will open up the Direct Line channel configuration page, and it has two Secret Keys that are used for authentication.

www.dynamicscompanions.com Dynamics Companions

- 103 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering a Direct Line Bot Channel How to do it…

Click on the Show link for the first key to see the fill key and copy the key details to notepad along with the App ID and Password. After you have done that, click on the Done button.

www.dynamicscompanions.com Dynamics Companions

- 104 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the AtBot with the Bot Channel Now that we have configured the Bot Channel, we can link our AtBot to the Azure service.

How to do it… To do that, we just return to the AtBot Bot Registration section and paste in the App ID and Password that we created and also the Direct Line Key that we just saved away from the Direct line channel.

www.dynamicscompanions.com Dynamics Companions

After we have done that we can click on the Save Bot button. That will save the bot and we can click on the OK button.

- 105 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the AtBot with the Bot Channel How to do it…

To do that, we just return to the AtBot Bot Registration section and paste in the App ID and Password that we created and also the Direct Line Key that we just saved away from the Direct line channel. After we have done that we can click on the Save Bot button.

www.dynamicscompanions.com Dynamics Companions

- 106 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the AtBot with the Bot Channel How to do it…

That will save the bot, and we can click on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 107 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot Now that we have created our Enterprise AtBot we will link our LUIS model to AtBot so that it is able to consume the LUIS Application configuration.

How to do it… To do this, expand the AI Integrations menu item in the AtBot menu and select the LUIS Intent Vectors menu item.

Then return back to LUIS and copy the Key that was generated by LUIS for the application endpoint.

This will show us all of the connections that we have to LUIS, and we can click on the Create Intent Vector button to add a new Intent connection from LUIS.

And then paste that key into the LUIS API Key field. This will allow us to then click on the LUIS App and select the Supply Chain Service that we created within LUIS.

This will open up the Create LUIS Intent Vector dialog box for us.

And then we can select the Product Inquiry intent that we configured within LUIS as well.

Click on the LUIS App Region dropdown list and select the region that we deployed LUIS in. For this example, it is the West US region.

After we have done that we can click on the Create Intent Vector button. This will add a new Intent Vector to AtBot.

www.dynamicscompanions.com Dynamics Companions

- 108 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

To do this, expand the AI Integrations menu item in the AtBot menu and select the LUIS Intent Vectors menu item. This will show us all of the connections that we have to LUIS, and we can click on the Create Intent Vector button to add a new Intent connection from LUIS.

www.dynamicscompanions.com Dynamics Companions

- 109 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

This will open up the Create LUIS Intent Vector dialog box for us.

www.dynamicscompanions.com Dynamics Companions

- 110 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

Click on the LUIS App Region dropdown list and select the region that we deployed LUIS in. For this example, it is the West US region.

www.dynamicscompanions.com Dynamics Companions

- 111 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

Then return back to LUIS and copy the Key that was generated by LUIS for the application endpoint.

www.dynamicscompanions.com Dynamics Companions

- 112 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

And then paste that key into the LUIS API Key field.

www.dynamicscompanions.com Dynamics Companions

- 113 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

This will allow us to then click on the LUIS App and select the Supply Chain Service that we created within LUIS.

www.dynamicscompanions.com Dynamics Companions

- 114 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

And then we can select the Product Inquiry intent that we configured within LUIS as well.

www.dynamicscompanions.com Dynamics Companions

- 115 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

After we have done that we can click on the Create Intent Vector button.

www.dynamicscompanions.com Dynamics Companions

- 116 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Linking the LUIS Intent with the AtBot How to do it…

This will add a new Intent Vector to AtBot.

www.dynamicscompanions.com Dynamics Companions

- 117 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities We are not quite done yet. We need to also add in the Entity that we defined in the LUIS model for the Product so that it will be passed over to the AtBot.

How to do it… To do that, just select the Product entity and then click on the + button.

And then add a Follow-up Question for the entity. This is the default response if we don’t explicitly define one. For this example we set this to Would you like me to look this product up?

This will open up the Configured Entities panel where we need to add a little more information. Start off by clicking on the Entity Type and selecting the String data type from the list to identify that this is a text field.

After we have done that we can click on the Update Vector button. This will give us a Success response and we can click on the OK button.

Then add a Friendly Description for the entity. In this case, we just set it to Product.

www.dynamicscompanions.com Dynamics Companions

- 118 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

To do that, just select the Product entity and then click on the + button.

www.dynamicscompanions.com Dynamics Companions

- 119 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

This will open up the Configured Entities panel where we need to add a little more information.

www.dynamicscompanions.com Dynamics Companions

- 120 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

Start off by clicking on the Entity Type and selecting the String data type from the list to identify that this is a text field.

www.dynamicscompanions.com Dynamics Companions

- 121 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

Then add a Friendly Description for the entity. In this case, we just set it to Product.

www.dynamicscompanions.com Dynamics Companions

- 122 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

And then add a Follow-up Question for the entity. This is the default response if we don’t explicitly define one. For this example, we set this to Would you like me to look this product up?

www.dynamicscompanions.com Dynamics Companions

- 123 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

After we have done that we can click on the Update Vector button.

www.dynamicscompanions.com Dynamics Companions

- 124 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Configuring Intent Vector Entities How to do it…

This will give us a Success response, and we can click on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 125 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category When we start registering our Flow configurations with the AtBot, they will show up as Skills within AtBot, and in order to use them, we will need to add them to a Skill Category that is linked to the AtBot that we created. So in preparation for this, we will want to create a new Skill Category that we will associate with the AtBot and the skills.

How to do it… To do this, expand the Skill Management menu item and then select the Categories menu item.

All we need to do here is set the Category Name. For this example we set the Category Name to Supply Chain and then clicked on the Create Category button.

This will open up the Categories maintenance form, and we can click on the Create Category button.

That will create our new Category for us.

This will open up the Create Category dialog box for us.

www.dynamicscompanions.com Dynamics Companions

- 126 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category How to do it…

To do this, expand the Skill Management menu item and then select the Categories menu item.

www.dynamicscompanions.com Dynamics Companions

- 127 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category How to do it…

This will open up the Categories maintenance form, and we can click on the Create Category button.

www.dynamicscompanions.com Dynamics Companions

- 128 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category How to do it…

This will open up the Create Category dialog box for us.

www.dynamicscompanions.com Dynamics Companions

- 129 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category How to do it…

All we need to do here is set the Category Name. For this example, we set the Category Name to Supply Chain and then clicked on the Create Category button.

www.dynamicscompanions.com Dynamics Companions

- 130 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating an AtBot Skill Category How to do it…

That will create our new Category for us.

www.dynamicscompanions.com Dynamics Companions

- 131 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill Category to the AtBot There is one final step that we need to do here before we start building our conversation flows and that is to assign the skill Categories that we want to enable for our AtBot.

How to do it… To do this, return back to the Enterprise Bot configuration and scroll down to the bottom of the page. We will see that there is a section there for Categories that are associated with our AtBot.

This will register the Skill Category with the AtBot and now any skills that we add to that category will become enabled on our new AtBot. All that is left to do now is to click on the Save Bot button.

We just need to click on the drop-down list and select the Skill Category that we want to enable on the bot and then click on the Add Category button. In this example, we selected the Supply Chain category that we just created.

www.dynamicscompanions.com Dynamics Companions

If everything is OK then we will get a Success notification and we can click on the OK button.

- 132 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill Category to the AtBot How to do it…

To do this, return back to the Enterprise Bot configuration and scroll down to the bottom of the page. We will see that there is a section there for Categories that are associated with our AtBot.

www.dynamicscompanions.com Dynamics Companions

- 133 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill Category to the AtBot How to do it…

We just need to click on the drop-down list and select the Skill Category that we want to enable on the bot and then click on the Add Category button. In this example, we selected the Supply Chain category that we just created.

www.dynamicscompanions.com Dynamics Companions

- 134 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill Category to the AtBot How to do it…

This will register the Skill Category with the AtBot, and now any skills that we add to that category will become enabled on our new AtBot. All that is left to do now is to click on the Save Bot button.

www.dynamicscompanions.com Dynamics Companions

- 135 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill Category to the AtBot How to do it…

If everything is OK, then we will get a Success notification, and we can click on the OK button.

www.dynamicscompanions.com Dynamics Companions

- 136 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Review How cool is that. We have now set up the framework for our Bot within the AtBot service, linked to back to our LUIS Application and also configured a Bot Channel within Azure that we will use for the Bot communication. Now all that is left for us to do is to add some intelligence to the Bot so that we can start talking to it.

www.dynamicscompanions.com Dynamics Companions

- 137 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow The great thing about AtBot is that it allows us to create our AtBot conversation flow using Microsoft Flow rather than having to hand code the Bot conversation management within something like Visual Studio. So let’s get started and build our Bot conversation.

Topics Covered •

Creating the AtBot Conversation Flow

Adding the Skill to the Category

Testing the AtBot Conversation

Extending the Conversation to show data from Dynamics 365

www.dynamicscompanions.com Dynamics Companions

- 138 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow All we need to do to start making our Bot more useful is to create a Flow that uses the AtBot connector.

How to do it… To do this open up Microsoft Flow by going to flow.microsoft.com and then click on the Create from a blank button in the menu bar.

Leave the Bot Trigger Type as Shared and then click on the LUIS Intent Vector drop-down list and select the LUIS Intent that we configured for this project. For this example, it is the Product Inquiry intent.

When the Create a flow from the blank form is displayed, click o the Create from blank button.

Now we have configured the trigger for our Flow we can start adding some interactions.

This will open up the Flow designer, and we will need to select a trigger that we want to use to initiate the Flow.

To do that click on the + New step button and then click on the Add an action option.

To find the trigger that we want, just filter out the connectors by typing in AtBot and then select the AtBot Logic connector.

This will allow us to search through the available connectors, filter out the connectors just to the AtBot connectors and select the AtBot Logic connector.

This will show us the available triggers and select the AtBot Logic – When a registered intent is used trigger.

When the list of available actions is shown, select the AtBot Logic – Send reply action which we can use just to send a message back into the Bot chat.

This will create a trigger event for the AtBot for us. Before we move on, we just need to click on the Sign In button and sign Flow into AtBot.

This will add the action to the flow.

After we have done that we will see a little more information that we need to configure for our AtBot flow.

We will want to type in some Reply Text that will be sent back to the bot conversation. In this case, we set the Reply Text to It looks like you are interested in finding out about.

Start off by adding a Trigger Description. In this example, we set the Trigger Description to Product Inquiry. We will see later on that this name is also the name of the Skill that will be registered in AtBot.

www.dynamicscompanions.com Dynamics Companions

We won’t stop there, because since we registered the Product entity within the AtBot configuration, it will show up in the dynamics content panel and we can just click on it to add the Product value to the response. - 139 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Next, we will want to select the Reply Activity field. This is used to track the conversation flow within the Bot, and we will see that in the Dynamics Content there is also a Reply Activity object.

All we need to do here is click on the Reply Activity and add it to the Send Reply action. Now we will update the name of the flow to be Product Inquiry and click on the Save button. This will save the Flow for us.

www.dynamicscompanions.com Dynamics Companions

- 140 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

To do this open up Microsoft Flow by going to flow.microsoft.com and then click on the Create from a blank button in the menu bar.

www.dynamicscompanions.com Dynamics Companions

- 141 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

When the Create a flow from blank form is displayed, click o the Create from blank button.

www.dynamicscompanions.com Dynamics Companions

- 142 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will open up the Flow designer, and we will need to select a trigger that we want to use to initiate the Flow.

www.dynamicscompanions.com Dynamics Companions

- 143 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

To find the trigger that we want, just filter out the connectors by typing in AtBot and then select the AtBot Logic connector.

www.dynamicscompanions.com Dynamics Companions

- 144 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will show us the available triggers and select the AtBot Logic – When a registered intent is used trigger.

www.dynamicscompanions.com Dynamics Companions

- 145 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will create a trigger event for the AtBot for us. Before we move on, we just need to click on the Sign In button and sign Flow into AtBot.

www.dynamicscompanions.com Dynamics Companions

- 146 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

After we have done that we will see a little more information that we need to configure for our AtBot flow.

www.dynamicscompanions.com Dynamics Companions

- 147 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

Start off by adding a Trigger Description. In this example, we set the Trigger Description to Product Inquiry. We will see later on that this name is also the name of the Skill that will be registered in AtBot.

www.dynamicscompanions.com Dynamics Companions

- 148 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

Leave the Bot Trigger Type as Shared and then click on the LUIS Intent Vector drop-down list and select the LUIS Intent that we configured for this project. For this example, it is the Product Inquiry intent.

www.dynamicscompanions.com Dynamics Companions

- 149 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

Now we have configured the trigger for our Flow we can start adding some interactions.

www.dynamicscompanions.com Dynamics Companions

- 150 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

To do that click on the + New step button and then click on the Add an action option.

www.dynamicscompanions.com Dynamics Companions

- 151 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will allow us to search through the available connectors, filter out the connectors just to the AtBot connectors and select the AtBot Logic connector.

www.dynamicscompanions.com Dynamics Companions

- 152 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

When the list of available actions is shown, select the AtBot Logic – Send reply action which we can use just to send a message back into the Bot chat.

www.dynamicscompanions.com Dynamics Companions

- 153 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will add the action to the flow.

www.dynamicscompanions.com Dynamics Companions

- 154 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

We will want to type in some Reply Text that will be sent back to the bot conversation. In this case, we set the Reply Text to It looks like you are interested in finding out about.

www.dynamicscompanions.com Dynamics Companions

- 155 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

We won’t stop there, because since we registered the Product entity within the AtBot configuration, it will show up in the dynamics content panel and we can just click on it to add the Product value to the response.

www.dynamicscompanions.com Dynamics Companions

- 156 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

Next, we will want to select the Reply Activity field. This is used to track the conversation flow within the Bot, and we will see that in the Dynamics Content there is also a Reply Activity object.

www.dynamicscompanions.com Dynamics Companions

- 157 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

All we need to do here is click on the Reply Activity and add it to the Send Reply action.

www.dynamicscompanions.com Dynamics Companions

- 158 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

Now we will update the name of the flow to be Product Inquiry and click on the Save button.

www.dynamicscompanions.com Dynamics Companions

- 159 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Creating the AtBot Conversation Flow How to do it…

This will save the Flow for us.

www.dynamicscompanions.com Dynamics Companions

- 160 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category Now that we have created a Flow that uses the AtBot trigger we will need to register the flow as a Skill.

How to do it… To do this, return to the AtBot Admin Portal and select the Shared Skills within the Skill Management menu.

All we need to do is click on the Choose Categories for this Skill field and select the category that we want to add it to. In this example we want to select the Supply Chain category and then click on the Update Categories button.

We will see that we have a new skill there called Product Inquiry that matches the Flow that we created. But it is not assigned to a Category, and therefore it is not being used by any of the Bots.

After we have done that we will bet a Success notification and we can click OK.

To fix that, just click on the Uncategorized button.

Now we will see that our Flow Skill is categorized for us.

This will open up the Edit Skill Categories dialog panel.

www.dynamicscompanions.com Dynamics Companions

- 161 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category How to do it…

To do this, return to the AtBot Admin Portal and select the Shared Skills within the Skill Management menu. We will see that we have a new skill there called Product Inquiry that matches the Flow that we created. But it is not assigned to a Category, and therefore it is not being used by any of the Bots. To fix that, just click on the Uncategorized button.

www.dynamicscompanions.com Dynamics Companions

- 162 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category How to do it…

This will open up the Edit Skill Categories dialog panel.

www.dynamicscompanions.com Dynamics Companions

- 163 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category How to do it…

All we need to do is click on the Choose Categories for this Skill field and select the category that we want to add it to. In this example, we want to select the Supply Chain category and then click on the Update Categories button.

www.dynamicscompanions.com Dynamics Companions

- 164 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category How to do it…

After we have done that we will bet a Success notification and we can click OK.

www.dynamicscompanions.com Dynamics Companions

- 165 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Adding the Skill to the Category How to do it…

Now we will see that our Flow Skill is categorized for us.

www.dynamicscompanions.com Dynamics Companions

- 166 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation Now that we have created our first Skill for our AtBot, we can take it for a test drive and see how it works.

How to do it… To do this, return back to the AtBot and click on the Test & Embed button at the bottom of the page.

our office details. If this is the case then just click on the Login button. This will allow us to authenticate and then we can return back to the chat testing form.

This will open up Test & Embed form chat window for our AtBot.

Now we can see that the Bot processes and returns a response that recognizes that we want to inquire on a product and it also extracts the product name from our question.

All we need to do is type in our question. In this case, we types in do we have any widgets in stock? If this is the first time that we are using the chat interface, it may ask us to login to Office to get

www.dynamicscompanions.com Dynamics Companions

- 167 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

To do this, return back to the AtBot and click on the Test & Embed button at the bottom of the page.

www.dynamicscompanions.com Dynamics Companions

- 168 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

This will open up Test & Embed form chat window for our AtBot.

www.dynamicscompanions.com Dynamics Companions

- 169 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

All we need to do is type in our question. In this case, we types in do we have any widgets in stock?

www.dynamicscompanions.com Dynamics Companions

- 170 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

If this is the first time that we are using the chat interface it may ask us to login to Office to get our office details. If this is the case then just click on the Login button.

www.dynamicscompanions.com Dynamics Companions

- 171 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

This will allow us to authenticate and then we can return back to the chat testing form.

www.dynamicscompanions.com Dynamics Companions

- 172 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Testing the AtBot Conversation How to do it…

Now we can see that the Bot processes and returns a response that recognizes that we want to inquire on a product and it also extracts the product name from our question.

www.dynamicscompanions.com Dynamics Companions

- 173 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 Now that we have created our Chat Flow and linked it to the AtBot as a skill we can start making it a lot more useful by incorporating information from Dynamics 365. Doing this thought coding is not the easiest thing to do, but doing it through Flow is super simple.

How to do it… We will start off by returning to our AtBot Skill Flow, clicking on the + New Step button and then selecting the Add an action link.

statement into the Filter Query field. Start off by typing contains(ProductName, ‘ into the Filter Query.

When the action selector is displayed, type in dynamics into the search box to filter out the connectors and then select the Dynamics 365 for Operations connector.

Then add the Product content object and then adding a ‘) at the end to make the Filter Query contains(ProductName, ‘{{Product}}’). Also, just so in case, there are a lot of products that match this condition we will set the Top Count to 3 to return just the top three records.

That will filter down the Actions that we can choose from, and we will want to select the Dynamics 365 for Operations – Get records action which will allow us to search through our products for to find the ones that match.

Next, we will want to format the returned results into something that we can display in the chat. To do this, click on the + New step and select the Add an action link.

When the Get records action is displayed, we can select the Instance that we want to connect to.

Then type in select into the filter field and select the Data Operations – Select action.

And then we can select the Entity that we want to return. We will do that by filtering the entities by typing in sellable and then selecting the SellableReleasedProducts entity.

This action allows us to create a selection object and we will then use in our conversation flow. Start off by selecting the From field and then selecting the value object from the Dynamics content.

Next, we will want to filter out the records that are returned. We will do that by clicking on the Show advanced options to see more options on the action.

Now we will map the content that we want to add to the selection. Start by adding a mapping entry. Set the first key to title.

We can filter out the returned rows by using a filter query. Start off by adding a filter www.dynamicscompanions.com Dynamics Companions

Then add the Product number as the value. - 174 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

In the next row, set the key to subtitle.

This will open up a chat control that will allow us to specify set responses that we want from the user.

And set the value to ProductName. Set the third mapping key to be value.

We will start building the Message by setting it to It looks like you are interested in finding out about.

And set the third value to be ProductDescription.

Next, we will add the Selected Choice List Title object to the message to add the Product Number to the message.

Now we will add a confirmation step that asks us which product we are interested in. To do that, click on the + New step and then click on Add an action.

And then we will add the Selected Choice List Subtitle to the message to display the description of the product. The final message will look like this: It looks like you are interested in finding out about {{Selected Choice List Title}} ({{Selected Choice List Subtitle}})

When the action browser is displayed, filter out the actions to the AtBot Logic connector and then select the AtBot Logic – Get choice list response from User. This will add a special chat item that allows us to select from a selection.

Then we will want to add the valid Choice Values for this choice. We will set them to Yes and No on separate lines.

We can start off by adding a message to the chat that explains what we are doing. In this example we set the Message to be I looked through the products, and there are a couple of different products that match the one that you are looking for?

Finally, we will want to track the conversation so we will set the Reply Activity to be the Reply Activity object. After we have done that we can click on the Save button to save the flow.

Then add the Output from the Select action into the Choose Values field.

Now we can test the Chat Bot. Start off by returning to the Test & Embed form, and we can start our conversation by typing in do we have any brick in stock?

And then add the Reply Activity object to the Reply Activity field. We will add one last step to the Conversation Flow before we finish just to confirm the product that we have selected is the right one. To do this, click on the + New Step and then select the Add an action link.

We will get our confirmation that we are interested in brick. It will search through Dynamics 365 for any product that has brick in the product name and returns the top three.

When the action browser is displayed, filter out the actions to the AtBot Logic connector and then select the AtBot Logic – Get choice response from User.

www.dynamicscompanions.com Dynamics Companions

We can select any of the products and then it will send us a message confirming the product number and name and allow us to continue on with the conversation if this is the right product.

- 175 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We will start off by returning to our AtBot Skill Flow, clicking on the + New Step button and then selecting the Add an action link.

www.dynamicscompanions.com Dynamics Companions

- 176 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

When the action selector is displayed, type in dynamics into the search box to filter out the connectors and then select the Dynamics 365 for Operations connector.

www.dynamicscompanions.com Dynamics Companions

- 177 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

That will filter down the Actions that we can choose from, and we will want to select the Dynamics 365 for Operations – Get records action which will allow us to search through our products for to find the ones that match.

www.dynamicscompanions.com Dynamics Companions

- 178 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

When the Get records action is displayed, we can select the Instance that we want to connect to.

www.dynamicscompanions.com Dynamics Companions

- 179 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

And then we can select the Entity that we want to return. We will do that by filtering the entities by typing in sellable and then selecting the SellableReleasedProducts entity.

www.dynamicscompanions.com Dynamics Companions

- 180 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Next, we will want to filter out the records that are returned. We will do that by clicking on the Show advanced options to see more options on the action.

www.dynamicscompanions.com Dynamics Companions

- 181 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We can filter out the returned rows by using a filter query. Start off by adding a filter statement into the Filter Query field. Start off by typing contains(ProductName, ‘ into the Filter Query.

www.dynamicscompanions.com Dynamics Companions

- 182 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Then add the Product content object and then adding a ‘) at the end to make the Filter Query contains(ProductName, ‘{{Product}}’).

www.dynamicscompanions.com Dynamics Companions

- 183 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Also, just so in case, there are a lot of products that match this condition we will set the Top Count to 3 to return just the top three records.

www.dynamicscompanions.com Dynamics Companions

- 184 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Next, we will want to format the returned results into something that we can display in the chat. To do this, click on the + New step and select the Add an action link.

www.dynamicscompanions.com Dynamics Companions

- 185 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Then type in select into the filter field and select the Data Operations – Select action.

www.dynamicscompanions.com Dynamics Companions

- 186 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

This action allows us to create a selection object and we will then use in our conversation flow.

www.dynamicscompanions.com Dynamics Companions

- 187 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Start off by selecting the From field and then selecting the value object from the Dynamics content.

www.dynamicscompanions.com Dynamics Companions

- 188 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Now we will map the content that we want to add to the selection. Start by adding a mapping entry. Set the first key to title.

www.dynamicscompanions.com Dynamics Companions

- 189 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Then add the Product number as the value.

www.dynamicscompanions.com Dynamics Companions

- 190 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

In the next row, set the key to subtitle.

www.dynamicscompanions.com Dynamics Companions

- 191 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

And set the value to ProductName.

www.dynamicscompanions.com Dynamics Companions

- 192 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Set the third mapping key to be value.

www.dynamicscompanions.com Dynamics Companions

- 193 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

And set the third value to be ProductDescription.

www.dynamicscompanions.com Dynamics Companions

- 194 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Now we will add a confirmation step that asks us which product we are interested in. To do that, click on the + New step and then click on Add an action.

www.dynamicscompanions.com Dynamics Companions

- 195 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

When the action browser is displayed, filter out the actions to the AtBot Logic connector and then select the AtBot Logic – Get choice list response from User.

www.dynamicscompanions.com Dynamics Companions

- 196 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

This will add a special chat item that allows us to select from a selection.

www.dynamicscompanions.com Dynamics Companions

- 197 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We can start off by adding a message to the chat that explains what we are doing. In this example we set the Message to be I looked through the products, and there are a couple of different products that match the one that you are looking for?

www.dynamicscompanions.com Dynamics Companions

- 198 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Then add the Output from the Select action into the Choose Values field.

www.dynamicscompanions.com Dynamics Companions

- 199 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

And then add the Reply Activity object to the Reply Activity field.

www.dynamicscompanions.com Dynamics Companions

- 200 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We will add one last step to the Conversation Flow before we finish just to confirm the product that we have selected is the right one. To do this, click on the + New Step and then select the Add an action link.

www.dynamicscompanions.com Dynamics Companions

- 201 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

When the action browser is displayed, filter out the actions to the AtBot Logic connector and then select the AtBot Logic – Get choice response from User.

www.dynamicscompanions.com Dynamics Companions

- 202 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

This will open up a chat control that will allow us to specify set responses that we want from the user.

www.dynamicscompanions.com Dynamics Companions

- 203 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We will start building the Message by setting it to It looks like you are interested in finding out about.

www.dynamicscompanions.com Dynamics Companions

- 204 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Next, we will add the Selected Choice List Title object to the message to add the Product Number to the message.

www.dynamicscompanions.com Dynamics Companions

- 205 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

And then we will add the Selected Choice List Subtitle to the message to display the description of the product. The final message will look like this: It looks like you are interested in finding out about {{Selected Choice List Title}} ({{Selected Choice List Subtitle}})

www.dynamicscompanions.com Dynamics Companions

- 206 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Then we will want to add the valid Choice Values for this choice. We will set them to Yes and No on separate lines.

www.dynamicscompanions.com Dynamics Companions

- 207 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Finally, we will want to track the conversation so we will set the Reply Activity to be the Reply Activity object.

www.dynamicscompanions.com Dynamics Companions

- 208 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

After we have done that we can click on the Save button to save the flow.

www.dynamicscompanions.com Dynamics Companions

- 209 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

Now we can test the Chat Bot. Start off by returning to the Test & Embed form, and we can start our conversation by typing in do we have any brick in stock?

www.dynamicscompanions.com Dynamics Companions

- 210 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We will get our confirmation that we are interested in brick.

www.dynamicscompanions.com Dynamics Companions

- 211 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

It will search through Dynamics 365 for any product that has brick in the product name and returns the top three.

www.dynamicscompanions.com Dynamics Companions

- 212 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Extending the Conversation to show data from Dynamics 365 How to do it…

We can select any of the products and then it will send us a message confirming the product number and name and allow us to continue on with the conversation if this is the right product.

www.dynamicscompanions.com Dynamics Companions

- 213 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Review How cool is that. We just created a skill for our bot that uses Flow to manage the conversation and also incorporated data directly from Dynamics 365 into the flow so that we can filter out and return a list of products that match the product that LUIS discovered for us. That is pretty amazing that we can do all of that with no code.

www.dynamicscompanions.com Dynamics Companions

- 214 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Integrating the Bot With Teams The final item that we will look at is making our AtBot available within Teams. This will allow other people in the organization to start using the Bot as a resource that they can query directly through the Teams chat window.

Topics Covered •

Registering the Teams Channel

Using the Bot within Teams

www.dynamicscompanions.com Dynamics Companions

- 215 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel To do this we just need to register the Teams Channel with the Azure Bot Service that we created earlier on.

How to do it… To do this, we just need to return to the Azure Portal and open up the Bot Channel that we created and then click on the Teams icon in the available channels

This will take us to the Configure MSTeams page and all we need to do here is click on the Done button. When we return to the Bot Channel we will see that Microsoft Teams is now configured and running.

This will ask us to accept the Terms of Service for Teams. All we need to do is check the Agree checkbox and then click on the Agree button.

www.dynamicscompanions.com Dynamics Companions

- 216 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel How to do it…

To do this, we just need to return to the Azure Portal and open up the Bot Channel that we created and then click on the Teams icon in the available channels

www.dynamicscompanions.com Dynamics Companions

- 217 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel How to do it…

This will ask us to accept the Terms of Service for Teams.

www.dynamicscompanions.com Dynamics Companions

- 218 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel How to do it…

All we need to do is check the Agree checkbox and then click on the Agree button.

www.dynamicscompanions.com Dynamics Companions

- 219 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel How to do it…

This will take us to the Configure MSTeams page, and all we need to do here is click on the Done button.

www.dynamicscompanions.com Dynamics Companions

- 220 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Registering the Teams Channel How to do it…

When we return to the Bot Channel, we will see that Microsoft Teams is now configured and running.

www.dynamicscompanions.com Dynamics Companions

- 221 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams Now that we have registered the Bot with Teams, let’s test it out and see how it works.

How to do it… To do this, just click on the Microsoft Teams channel in the Bot Channel.

And then it will continue to run, searching through the products within Dynamics for some that match and then returning back a selection card with the product listed.

This will open up Teams and create a new conversation with our Supply Chain Bot/

And then when we select the item, it will confirm the item for us and then ask us if this is the product that we are looking for.

We can ask it do we have any brick in stock? If this is the first time using the chat bot, we will need to click on the Login button to authenticate with Office.

www.dynamicscompanions.com Dynamics Companions

After we say Yes it will register the selection and continue with the conversation.

- 222 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

To do this, just click on the Microsoft Teams channel in the Bot Channel.

www.dynamicscompanions.com Dynamics Companions

- 223 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

This will open up Teams and create a new conversation with our Supply Chain Bot/

www.dynamicscompanions.com Dynamics Companions

- 224 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

We can ask it do we have any brick in stock?

www.dynamicscompanions.com Dynamics Companions

- 225 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

If this is the first time using the chat bot we will need to click on the Login button to authenticate with Office.

www.dynamicscompanions.com Dynamics Companions

- 226 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

And then it will continue to run, searching through the products within Dynamics for some that match and then returning back a selection card with the product listed.

www.dynamicscompanions.com Dynamics Companions

- 227 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

And then when we select the item, it will confirm the item for us and then ask us if this is the product that we are looking for.

www.dynamicscompanions.com Dynamics Companions

- 228 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Using the Bot within Teams How to do it…

After we say Yes it will register the selection and continue with the conversation.

www.dynamicscompanions.com Dynamics Companions

- 229 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Review How neat is that. By using the Azure Bot Channels, we can publish our AtBot out on any of the available channels including Teams without doing any more work.

www.dynamicscompanions.com Dynamics Companions

- 230 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


DYNAMICS COMPANIONS CONFIGURATION BLUEPRINT GUIDE

CONFIGURING ATBOT CREATING AN ATBOT CHATBOT CONNECTED TO DYNAMICS 365

Conclusion In this walkthrough we have done something very cool. We have created a bot using LUIS, AtBot, and Azure Bot Services that query data within Dynamics 365 and returns actionable data back to the selections that they made. And we did all of this without writing a single line of code. That is pretty cool and means that everyone is able to build Bots that connect with Dynamics 365 regardless of if they can code or not. Viva la Bot.

www.dynamicscompanions.com Dynamics Companions

- 231 -

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC , All Rights Reserved


Want to learn more about Microsoft Dynamics? The Bare Bones Configuration Guides for Microsoft Dynamics was developed to show you how to set up a company from the ground up and configure all of the common modules that most people would need, and a few that you might want to use. It aims to demystify the setup process and prove that Dynamics is only as hard to configure as you make it, and if you are a mid-range customer that even you can get a company configured and working without turning on every bell and whistle and without breaking the bank. There are 14 volumes in the current series and although each of these guides have been designed to stand by themselves as reference material for each of the modules within Dynamics, if they are taken as a whole series they are also a great training system that will allow even a novice on Microsoft Dynamics work through the step by step instructions and build up a new company from scratch and learn a lot of the ins and outs of the system right away. The current guides are: • • • • • • • • • • • • • •

Configuring a Training Environment Configuring The General Ledger Configuring Cash and Bank Management Configuring Accounts Receivable Configuring Accounts Payable Configuring Product Information Management Configuring Inventory Management Configuring Procurement & Sourcing Configuring Sales Order Management Configuring Human Resources Configuring Project Management & Accounting Configuring Production Control Configuring Sales & Marketing Configuring Service Management

About the Author Murray Fife is an Author of over 25 books on Microsoft Dynamics including the Bare Bones Configuration Guide series of over 15 books which step the user through the setup of initial Dynamics instance, then through the Financial modules and then through the configuration of the more specialized modules like production, service management, and project accounting. You can find all of his books on Amazon at www.amazon.com/author/murrayfife. For more information on Murray, here is his contact information: Email: murray@murrayfife.com Twitter: @murrayfife Facebook: facebook.com/murraycfife Google: google.com/+murrayfife LinkedIn: linkedin.com/in/murrayfife Blog: atinkerersnotebook.com SlideShare: slideshare.net/murayfife Amazon: amazon.com/author/murrayfife

If you are interested in finding out more about the series and also view all of the details including topics covered within the module, then browse to the Bare Bones Configuration Guide on the Dynamics Companions website. You will find all of the details, and also downloadable resources that help you with the setup of Microsoft Dynamics. Here is the full link: http://www.dynamicscompanions.com

www.blindsquirrelpublishing.com © 2018 Blind Squirrel Publishing, LLC, All Rights Reserved

www.dynamicscompanions.com Dynamics Companions


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.