Skip to main content

Extensibility and Integration

 

OutSystems

Setup and use the Chatbot Web component in your OutSystems applications

Chatbots act as a first line-of-communication, providing support to customers while increasing efficiency and customer satisfaction. You can now use the Chatbot Web component helps you to create your own chatbot in your web applications.

Prerequisites:

  1. Create an Azure account.
  2. Create a Web App Bot resource on Azure Portal.

Use the component in your application

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

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

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

Create the logic for the bot responses

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.

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

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

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

  5. 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.

  6. Select GetResponseMessage to add and customize the logic for the bot responses.

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

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

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

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

  • Was this article helpful?