[Chatbot Web] Chatbot Web - Documentation

Forge Component
(0)
Published on 13 May (7 days ago) by Félix Barros
0 votes
Published on 13 May (7 days ago) by Félix Barros

How to setup and use Chatbot Web

Chatbots act as a first line-of-communication, providing support to customers while increasing efficiency and customer satisfaction. Use Chatbot Web to create your own chatbot and allow your users to interact with your services via a chat interface.


Prerequisites:

  1. Create an Azure account.

  2. Create a Web App Bot resource on Azure Portal.


To use the Chatbot Web in your application, do the following:

  1. In your application, go to Manage Dependencies, select ChatbotWeb and add it as a dependency.

  2. Drag the Chatbot web block to the screen where you want to add it.

  3. Fill the following input fields of the web block:

    • DirectLineSecret - to be obtained from the Direct Line channel configuration page of your Web App Bot resource on Azure Portal

    • BotName - the name to be displayed in the chat UI

    • WelcomeMessage - the first message to be displayed in the chat 

    • IsInline - a boolean which specifies how to display the chatbot UI within the screen


  1. Customize the icons in the placeholders of the Chatbot web block.


  1. Publish and test the visual result. You can also interact with the chatbot to confirm that it is correctly linked to your Azure bot.


To create the logic for the bot responses, do the following:

  1. Create a new web application in Service Studio. Choose the Azure Bot Webhook template and create the module.


  1. Publish the module. Ideally, you should move the module you just published to the application to which you’re adding the chatbot. 


  1. In Service Center, under the Factory tab, go to Modules and search for the module that you created based on the AzureBotWebhook template.

  1. Go to the Site Properties tab and set the MicrosoftClientId and the MicrosoftClientSecret to the credentials of your Web App Bot resource


  1. In the module created based on the Webhook template, go to the Logic tab and under the Integrations folder, select the PostMessage REST service to follow the comments in logic flow.


  1. Within GetResponseMessage Server Action add and customize the logic for the bot responses. Bellow you find an image exemplifying the logic customization for a weather bot.

  1. In the Logic tab, go to Integrations, right-click MessagingWebhook_V1 and click on Open Documentation. A tab will open in your browser with details about the REST service.

  1. Copy the request URL of the service from the tab in the browser.


  1.  Go to your Azure Portal and select the respective Web App Bot resource.

  2.  Go to the resource settings, paste the copied request URL in the Messaging Endpoint field and save the settings.

Nice job. Simple and straight to the point. My congrats for the article, it will help a lot.