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.


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: (this requires a Windows Live ID to sign up). Once signed-up, you will be able to register the new Bot:


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.


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


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.


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:


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.


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


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.


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


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

Example on Slack:


Example on Skype:



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.


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 🙂



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

  1. Hi,

    When I deploy the bot to azure, I take error which is “There was an error sending this message to your bot: HTTP status code MethodNotAllowed”. I wrote MicrosofAppId and MicrosoftAppPassword to my code.

    I am waiting your response.Thanks a lot.

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Connecting to %s