CRM Chat Bot: Part 4 – Deployment & Action!

In the previous part of this series, we have seen the sample implementation and how the code is running against a CRM Online instance. In this post I will show on how to deploy the chat bot to the supported channels.

channels.png

As illustrated above, the built bot has the capability to be deployed to multiple channels leveraging the built-in capability of Bot Connector library.

Bot Registration

To deploy the bot, first we need to sign up to register the bot: https://dev.botframework.com/bots/new (this requires a Windows Live ID to sign up). Once signed-up, you will be able to register the new Bot:

BotRegistration.png

You will then be asked to setup the App ID and password. Please take note of this App ID and password, as this will be the one that we will use in the Web.Config.

BotRegistration_appid&password.png

Then update your web.config of the bot with the generated App Id and Password.

BotWebConfig.png

Now we are ready to deploy to Azure App Service. You need to make sure that your Visual Studio has the latest Azure SDK. To publish it, right click the bot project and click on Publish.

BotPublish.png

This will prompt the details for the Azure App Service deployment.BotAppService1.png

Continue to create, once the App Service has been created, it will show below screen:

BotPublish2.png

Note: Take note the destination URL, this will be the bot endpoint. You will need this base URL  and  the API path”/api/messages” to be configured on the bot registration site.

BotConfigEndpoint.png

Once the endpoint has been setup properly, you could verify and test the connectivity:

BotConnection.png

Channels Configuration

Congratulations, we are nearly there. The next step is to configure the channels. Skype and Web Chat are automatically configured by default. To add other channel it is really simple. Just follow the guide provided by Microsoft is sufficient.

BotChannelFb.png

Once it’s configured with the details, now here is the bot in action:

FBDeployed.gif

As I’ve configured it on different channels, the same Bot is working on different platforms, such as Slack and Skype.

Example on Slack:

SlackDeployed.gif

Example on Skype:

SkypeDeployed.gif

Conclusion

Microsoft Bot Framework is relatively new for the community, however it has produced a great framework to built multi-channels conversational bot. Where the developers only need to developed the bot once and it can be deployed in many different channels rapidly.

BotFrameworkArchitecture.jpg

The diagram above depicts the high level on how the bot application is deployed and work together as a solution.

I hope this post helps you to gain the understanding on the Bot Framework and how it can be integrated with Dynamics CRM and other Microsoft platforms.

This post is the end of the CRM Chat Bot series. There will be a spin-off post on a topic related to Luis Model that was used in this example. So, stay tuned 🙂

 

 

Advertisements

2 thoughts on “CRM Chat Bot: Part 4 – Deployment & Action!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s