This webhook will be triggered when a customer sends a message to your Qiscus Omnichannel Chat for the first time or when a customer sends a new message after the previous chat room was resolved. For setting this webhook, you can follow this New Session Webhook Documentation.
This is the sample payload that will be sent to your webhook URL:
{
"is_new_session": true,
"payload": {
"from": {
"avatar_url": "https://latest-multichannel.qiscus.com/img/default_avatar.svg",
"email": "628xxx26xxx67",
"id": 0,
"id_str": "0",
"name": "Muhammad Ridho (Test)"
},
"message": {
"id": 0,
"id_str": "0",
"payload": {
"caption": "Tess",
"url": "https://d1edrlpyc25xu0.cloudfront.net/ramo-xxxxxxxxxxxxx/image/upload/8s84YGRsKc/1669774321_85-b9ab-85f06236_2069.jpg"
},
"text": "Tess",
"timestamp": "2022-11-30T02:12:03Z",
"type": "file_attachment"
},
"room": {
"id": "xx93xxxx",
"id_str": "xx93xxxx",
"is_public_channel": false,
"name": "Muhammad Ridho (Test)",
"options": "{\\"channel\\":\\"wa\\",\\"channel_details\\":{\\"channel_id\\":45xx,\\"name\\":\\"WABA Q\\",\\"phone\\":\\"+6282xxxxxxx\\"},\\"is_resolved\\":false,\\"is_waiting\\":true,\\"source\\":\\"wa\\"}",
"participants": [
{
"email": "628xxx26xxx67"
},
{
"email": "ramo-xxxxxxxxxxxxx_admin@qismo.com"
}
],
"room_avatar": "https://latest-multichannel.qiscus.com/img/default_avatar.svg",
"topic_id": "xx93xxxx",
"topic_id_str": "",
"type": "group"
}
},
"room_log": {
"channel_id": 45xx,
"created_at": "2022-11-30T02:10:02",
"extras": null,
"has_no_message": true,
"is_waiting": true,
"name": "Muhammad Ridho (Test)",
"resolved": false,
"room_badge": "https://d1edrlpyc25xu0.cloudfront.net/ramo-xxxxxxxxxxxxx/image/upload/-ERjHRDoNu/wa_icon_100.png",
"room_id": "xx93xxxx",
"source": "wa",
"user_avatar_url": "https://latest-multichannel.qiscus.com/img/default_avatar.svg",
"user_id": "628xxx26xxx67"
},
"webhook_type": "NEW_SESSION_WEBHOOK"
}
The new webhook session can be used for the following examples:
Create custom auto-replies.
- Create your webhook URL
- Setup Webhook URL via API
- Test send a message to your Dashboard
- You can check webhook logs sent from Analytics>Other>Outgoing Logs or from your server.
- Send your message to reply with Session Message.
Custom bot-replied.
You can use this New Session Webhook if you have a special use case and need an additional trigger at the start of a conversation session other than using the payload provided when activating the Bot Integration feature. Please note if you want to reply or take action using the Bot API, you need to activate the toggle on the Integration page>Bot Integration.
Create a contact or ticket to CRM.
Or other cases that only require 1x trigger at the start of the session.
Comments
0 comments
Article is closed for comments.