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.
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:
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.
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:
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 🙂