Integrate Multiple Bot Engines or Custom API with Qiscus Robolabs

  • Updated

By default, Robolabs use the Google Dialogflow engine. The solutions in this article are suitable for you who are using Robolabs but still need a custom flow with your own bot/API. So we need to integrate them.

Before we jump to Robolabs, the Qiscus Omnichannel also provides webhook services that you can utilize, see the documentation

 

In Robolabs, there are these 3 options:

  1. Add Project from Custom Bot Engine
  2. Dialogflow Webhook
  3. Custom API

 

1. Add Project from Custom Bot Engine

Similar to the feature on Integration menu > Bot Integration, the difference is you can assign to specific channels while the default Bot Integration is for all channels. You only need to set up the bot URL.

Note: other features from Robolabs (Bot template, handover agent, etc.) will be disabled. Qiscus only send the webhook.

mceclip0.png

 

2. Dialogflow Webhook

With this webhook, Qiscus will forward the data from Dialogflow to your URL. You only need to set up the URL and choose the intent.

mceclip1.png

 

3. Custom API

More customizable than others, in this feature, you are able to define the Headers, Query, Body, and Response for each intent.

Method POST/GET (based on your API)
Headers Key, Value
Query Key, Value
Body JSON, URL Encoded Forms, Multiple Forms
Responses Text

Headers, Query, and Body are the data that Qiscus send to the URL. All the values can be anything or the default data from Qiscus.
You can use the JSON path {{$.path.to.the.value}} to get data from the Qiscus default payload. See the payload structure

Example:

{
"name": "{{$.multichannel.payload.from.name}}",
"message": "{{$.multichannel.payload.message.text}}"
}

mceclip12.png mceclip11.png

Responses are the default text response or data from your API when it is called successfully.
You can use that JSON path {{$.path.to.the.value}} to get data from the API response (You have to create your own response on the API).

Example:

{{$.response}}

mceclip7.png  mceclip10.png

Result: 

image__2_.png

 

In addition, when your Bot or external services want to send a message back to Qiscus or handover to an agent, you can use API from this documentation.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.