Add Project from Custom Bot Engine
This feature can only be used on Robolabs Premium plan
If you already have your own bot, Robolabs supports various bot platforms through custom bot engine to help you handle the conversation inquiries. Apart from channel routing, other communications with Qiscus Omnichannel Chat should be managed by your bot engine. This include sending response back to your customer.
Step 1: Create Custom Bot Engine Project
Go to Bot Integration and choose Add Project from Custom Bot Engine

To connect your bot to Robolabs and Send Message to Qiscus Omnichannel Chat, just follow this steps (we assume you already build your bot):
- Fill your Bot Name (the bot's name will be created)
- Fill your Engine Name (the name of the bot engine to be used)
- Grab your bot Webhook URL and paste it into the Engine URL field. Make sure the input field is in HTTPS format

Assign Channel to your bot

Step 2: Receive Webhook From Robolabs
Robolabs will send POST request to this URL containing conversation payload from customer from Qiscus Omnichannel Chat. Your endpoint will get this payload:
{
"type": "post_comment_mobile", // either type "post_comment_mobile" if from client side or "post_comment_rest" if from REST API
"payload": {
"from": {
"id": 1,
"email": "user1@gmail.com",
"name": "User1",
},
"room": {
"id": 1,
"topic_id": 1, # same value with room.id
"type": "group", # can also be single
"name": "ini grup",
"options": {
"is_resolved": true,
"source": "wa",
"is_waiting": "false",
"channel_details": {
"channel_id": 1,
"name": "Wa Pertama"
}
},
"participants": [
{
"id": 1,
"email": "user1@gmail.com",
"username": "User1",
"avatar_url": "http://avatar1.jpg"
},
{
"id": 2,
"email": "user2@gmail.com",
"username": "User2",
"avatar_url": "http://avatar2.jpg"
}
]
},
"message": {
"type": "text",
"text": "ini pesan",
"payload": {
# comment type specific payload
}
}
}
}
Process the data according to your needs. Once you done process the data, you may want to send messages to your customer in Qiscus Omnichannel Chat.
Step 3: Send Message To Qiscus Omnichannel Chat From Your Bot Engine
Open integration page in Qiscus Omnichannel Chat and navigate to Bot Integration. There are several informations regarding your credential. Point your bot engine to hit Qiscus Omnichannel Chat in STEP 2. So, get a copy of STEP 2 URL and make it the default URL to hit into whenever any messages coming for bot to response to. Leave URL in STEP 3 as it is, since Robolabs will need that.
When your bot making a post to Qiscus Omnichannel Chat, you will need your Qiscus Omnichannel Chat app credentials, such as: Agent ID (This will be your bot ID), App ID (AppCode), and Qiscus Secret Key. All this information has been provided in the bot integration page.
For more information about what type of message that has been supported in Qiscus Omnichannel Chat, please visit Message section. You can use this API for managing various behaviour of message. There are several type of message that bot can post to a chat room, instead of text (default). Each message has different payload format (particularly in JSON/JSON string).