In this documentation, we will explain how to use webhook in OneTalk.
Head to "Integration" and click "Webhooks" and you can start setup a webhook by clicking "Set" on the top right corner.
Next, you will have to choose a minimum of 1 event on "Subscribed Events" and click "Save Changes" to finalize your webhook.
Integration Message Status
this webhook event updates your system about the change in status of messages sent via Integration API.
{
"type": "integration_message_status",
"integrationMessageStatus": {
"channelID": "0123456",
"channelType": "whatsapp|whatsappba",
"contactPhone": "628123456789",
"reason": "...",
"status": "acknowledge|delivered|read|failed",
"timestamp": 1587352926788,
"trxID": "000000-0000-0000-0000-000000"
},
"organizationID": 1111
}
Status 'acknowledge' is updated when WhatsApp has received OneTalk's request to send the message.
Status 'delivered' is updated when WhatsApp recipient has received the message.
Status 'read' is upated when WhatsApp recipient has read the message.
Status 'failed' is updated when there's an error either from TapTalk.io's system or WhatsApp's system.
this webhook event updates your system about the changed in case status to "Resolved" in your organization.
{
"organizationID": 1,
"type": "case_resolved",
"caseResolved": {
"caseID": "958CCF3BB6",
"channelType": "whatsapp",
"channelID": "166090",
"topicID": 1,
"topicName": "Finance",
"assigneeType": "agent",
"chatbotID": "",
"chatbotName": "",
"agentEmail": "john@example.com",
"agentFullName": "John",
"isJunk": false,
"agentRemark": "Hello world 3",
"createdTime": 1589354307263,
"counterStartTime": 1589354307263,
"firstResponseTime": 1589355184000,
"resolvedTime": 1615305000400,
"isResolvedByAgent": true,
"isResolvedByChatbot": false,
"isResolvedByContact": false,
"isResolvedBySystem": false,
"labels": [
"follow up",
"hello world"
],
"contact": {
"id": "e148aa04-3e8f-4dd9-82c1-e53c1a93eac1",
"fullName": "John Doe",
"alias": "John",
"email": "",
"phone": "6281234567890",
"customerUserID": "johndoe",
"companyName": "",
"jobTitle": "",
"agentRemark": "",
"customFields": {
"customer_id": {
"fieldType": "single_line",
"value": ""
},
"deal_amount": {
"fieldType": "number",
"value": ""
},
"salutation": {
"fieldType": "dropdown",
"value": ""
}
}
}
}
}