Description
Insurance Carriers leveraging the Hi Marley inbound chatbot capabilities can subscribe to receive a POST request to their HTTPs address at the end of the chatbot flow. The end of the chatbot flow can be when the last question is answered or when an adjuster initiates 'Operator Takeover' to communicate with the customer.
The POST request body will include metadata information about the case and customer along with the full record of the chatbot Q&A.
Learn more about Automated Chatbot Workflows (Beta)
Registering Webhook
Use the following payload to subscribe to this webhook using the POST /webhooks/register endpoint
Request Payload
Note: The Headers array is an optional set of values that can be used to attach specific static headers to each webhook response for any purpose (e.g carrier authentication of payload with a token)
{
"EVENT_ID": 19,
"HTTP_POST_ADDRESS": "http://mywebaddress.com/himarley/inboundchatbot",
"HEADERS": {
"key": "value",
"key1": "value1"
}
}
Example Payload
"caseData": {
"brand": "(Valid Carrier brand name)",
"reference": "(referenceId of Case - unique)",
"id": "(caseId - unique)"
},
"state": "(open, closed)",
"caseType": "(case, claim, policy)",
"customer": {
"id": "(customerId - unique)",
"first": "Smith",
"last": "John",
"email": "tester8013@testemail.com",
"mobile": "(valid mobile number)",
"role": "enduser",
"optStatus": "(true, false)",
"optStatusDetail": "(OPTED_IN, OPTED_OUT, REQUESTED)"
},
"primaryContact": {
"id": "(primaryContactId- unique)",
"first": "Adjuster",
"last": "Smith",
"email": "adjuster@insurancecarrier.org",
"role": "(operator, admin)"
},
"createTime": "2021-06-03T17:40:44.408Z",
"referenceId": "(referenceId of Case - unique)",
"privacy": "(public, private)",
"closedAt": "2021-08-20T19:53:03.840Z",
"messages": [
{
"id": "(messageId - unique)",
"type": "text",
"formatting": "ai",
"data": "Hi, I'm Marley, your virtual assistant with Hi Marley. To text with your service center representative, please review and agree to the terms/privacy policy (himarley.com/tp) by responding 'Yes'. Msg and data rates may apply. Msg freq varies. Reply HELP for help or STOP to opt out.",
"channelSource": "mobile",
"createdAt": "2021-06-03T17:40:45.069Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:40:45 PM EDT"
},
{
"id": "(messageId - unique)",
"type": "text",
"formatting": "standard",
"data": "Yes",
"channelSource": "mobile",
"author": {
"_id": "(customerId - unique)",
"profile": {
"firstName": "Smith",
"lastName": "John"
}
},
"createdAt": "2021-06-03T17:42:09.180Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:42:09 PM EDT"
},
{
"id": "(messageId - unique)",
"type": "text",
"formatting": "ai",
"data": "(text message contents)",
"channelSource": "mobile",
"createdAt": "2021-06-03T17:42:09.190Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:42:09 PM EDT"
},
{
"id": "(messageId - unique)",
"type": "text",
"formatting": "ai",
"data": "You can contact your service center representative, Adjuster Smith, anytime by text here, by email adjuster@insurancecarrier.org.",
"channelSource": "mobile",
"createdAt": "2021-06-03T17:42:09.200Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:42:09 PM EDT"
},
{
"id": "(messageId - unique)",
"type": "text",
"formatting": "standard",
"data": "hello, do you have pictures of the accident?",
"channelSource": "marley",
"author": {
"_id": "(primaryContactId- unique)",
"profile": {
"firstName": "Adjuster",
"lastName": "Smith"
}
},
"createdAt": "2021-06-03T17:43:05.388Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:43:05 PM EDT"
},
{
"id": "(messageId - unique)",
"type": "image",
"formatting": "standard",
"data": "(Hi Marley link to customer media)",
"channelSource": "mobile",
"author": {
"_id": "(customerId - unique)",
"profile": {
"firstName": "Smith",
"lastName": "John"
}
},
"createdAt": "2021-06-03T17:45:57.074Z",
"dateFormatted": "06-03-2021",
"timeFormatted": "1:45:57 PM EDT"
}
]
}
Comments
0 comments
Please sign in to leave a comment.