How to integrate an external bot?
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Getting Started
- Bot Building
- Conversation Design
- Developer Guides
- Agent Setup
- Analytics & Reporting
- Troubleshooting Guides
- Release Notes
Table of ContentsWhy?Process to integrate1. Create a bot on Conversation Studio2. Create a step to transfer data3. Accepting all inputs4. Communicating with the external bot5. Completing the setup
There might be times when there is an existing bot with a flow already built on another platform or through custom code. It is possible to connect this external bot flow to the Haptik tools through the Conversation Studio tool.
The first stage is to create a new bot on the Conversation Studio tool. This bot will act as a gateway between the Haptik Platform and the external bot.
The second stage is to create a step in the bot. The job of this step is to take any user input that comes in and pass it along to the external bot. The step is also responsible to accept the input that comes in from the external bot and send it back to the user.
We get the step to capture all the input messages by using a catchall entity. You can do this by adding an entity called "feedback_regex". This entity uses regex to capture the complete user message in the entity called "feedback_regex".
You can add an entity by going to
bot_says the section of the step. In the
bot response section click on them
+ Add an Entity and then search for
feedback_regex. Finally, click on
Add to Bot responseit to add it to the step.
Once the user message is captured it can be sent to the external bot using the
integrations section of the step. The first stage is to set the base URL of the external bot in the bot settings section. If the external bot has different test and production endpoints you can set them accordingly. Or you can set it to be the same URL in both cases.
Once that is done, we can add the specific path where we need to send the message to. It should be noted that the endpoint will receive the message in a parameter called
feedback_regex because that is what the entity is called. The external bot can then use this message and return a bot response in a
HSL format. This
HSL will then be sent back to the user who sent the message.
Finally, we want the above stages to be repeated for all user messages. To do this we make the step self connecting. This means that all incoming messages and responses will loop through this step which is what we want.