Description
When subscribed to Event ID 22, you will receive a message_updated event webhook which will send the message payload with boolean flag indicators of the update.
Current Message Update Types:
needsAction: indicates a question has been posed by the policyholder and will be delivered after thirty minutes (should the operator not answer the policyholder's question).
needsAttention: indicates negative message sentiment and will be delivered via webhook in nrt.
isRedacted: indicates a file from the customer has been marked as redacted if the adjuster has redacted the file within Hi Marley & will be delivered if and when that action happens.
Learn more about Message Intelligence within Hi Marley
| Webhook Name | Needs Attention |
| Event ID | 22 |
| Event Name | Message Updated |
Table of Contents
- Registering Webhooks
- Example Payload Triggered by Needs Attention badge
- Implementation Recommendations
Registering Webhooks
Use the following payloads to subscribe to the Message_Updated: Needs Attention webhook using the POST /webhooks/register endpoint
Request Payloads
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 indicating the type of event, carrier authentication of payload with a token)
{
"EVENT_ID": 22,
"HTTP_POST_ADDRESS": "http://mywebaddress.com/optin",
"HEADERS": {
"key": "value",
"key1": "value1"
},
"redacted": true
}Example Payload Triggered by Event 22: Message Updated
Headers
content-type application/json
accept application/json
requestid <auto-gen id>
Eventid 22
Eventname MESSAGE_UPDATED
<other subscribed headers>
Request Body
{
"caseData": {
"id": "4bc201bc-3ebb-4729-b42f-ef2914f1986d",
"reference": "114aeb44-ea25-4643-a950-f5363865076b"
},
"state": "open",
"caseType": "case",
"customer": {
"id": "75f2b888-dca1-4596-9cad-325d1f8a6e54",
"first": "Tom",
"last": "Riddle",
"email": "tom.riddle@hogwarts.edu",
"mobile": "+14345321629",
"role": "enduser",
"optStatus": true,
"optStatusDetail": "OPTED_IN"
},
"primaryContact": {
"id": "1cba88af-fac3-425a-9b2b-0faa5779b0e9",
"first": "John",
"last": "Smith",
"email": "john.smith@insuranceco.com",
"role": "operator"
},
"createTime": "2022-08-15T20:26:25.076Z",
"referenceId": "114aeb44-ea25-4643-a950-f5363865076b",
"privacy": "public",
"marleyNumber": "+15047663063",
"languagePreference": "en",
"secondaryOperators": [
{
"id": "1cba88af-fac3-425a-9b2b-0faa5779b0e9",
"first": "Tom",
"last": "Smith",
"email": "tom.smith@insuranceco.com",
"role": "operator"
}
],
"messages": [
{
"id": "33184205-24e5-4995-b3d7-601118fbd8ea",
"type": "file",
"formatting": "standard",
"data": "Link to Customer Image/Media via Hi Marley Generated Link",
"channelSource": "mobile",
"author": {
"_id": "75f2b888-dca1-4596-9cad-325d1f8a6e54",
"role": "enduser",
"profile": {
"firstName": "Tom",
"lastName": "Riddle"
}
},
"createdAt": "2022-08-25T14:19:17.110Z",
"dateFormatted": "08-25-2022",
"timeFormatted": "10:19:17 AM EDT",
"messageClassifications": {
"needsAttention": true,
"needsAction": {
"hasQuestion": false
},
"isRedacted": true
},
}
]
}Request Payload Breakdown
| Property | Elements | Description | Type | Required | Example |
|
caseData |
id | The case identifier for the Hi Marley Case. | string | true | "caseId": "4bc201bc-3ebb-4729-b42f-ef2914f1986d" |
| reference | The case reference identifier for the Hi Marley Case. | string | true | "reference": "114aeb44-ea25-4643-a950-f5363865076b" | |
| state |
The current status of the case state.
|
enum | true | "state": "open" | |
| caseType |
The type of Hi Marley Case.
|
enum | true | "caseType": "case" | |
|
customer |
id | The identifier generated and assigned to the customer. | string | true |
"id": "75f2b888-dca1-4596-9cad-325d1f8a6e54"
|
| first | The customers given name. | string | true |
"first": "Tom"
|
|
| last | The customers surname. | string | true |
"last": "Riddle"
|
|
| The customers email address. | string | false |
"email": "tom.riddle@hogwarts.edu"
|
||
| mobile | The customers mobile number. | string | true |
"mobile": "+14345321629"
|
|
| role | The customers role. Always set to enduser. | enum | true |
"role": "enduser"
|
|
| optStatus | The current opt status for the customer. | boolean | true | "optStatus": true | |
| optStatusDetail | Description of the current opt status for the customer. | string | true | "optStatusDetail": "OPTED_IN" | |
|
primaryContact |
id | The identifier of the person assigned to the Hi Marley case. | string | true |
"id": "1cba88af-fac3-425a-9b2b-0faa5779b0e9"
|
| first | The first name of the person assigned to the Hi Marley case. | string | true |
"first": "John"
|
|
| last | The last name of the person assigned to the Hi Marley case. | string | true |
"last": "Smith"
|
|
| The email of the person assigned to the Hi Marley case. | string | false |
"email": "john.smith@insuranceco.com"
|
||
| role | The role of the person assigned to the Hi Marley case. | enum | true |
"role": "operator"
|
|
| createTime | The time of the case creation. | smalldatetime | true |
"createTime": "2022-08-15T20:26:25.076Z"
|
|
| referenceId | The case reference identifier for the Hi Marley Case. | string | true |
"referenceId": "114aeb44-ea25-4643-a950-f5363865076b"
|
|
| privacy |
The case privacy status.
|
enum | true |
"privacy": "public"
|
|
| marleyNumber | The assigned phone number from an organization pool used to conduct messaging for the current case. | string | true |
"marleyNumber": "+15047663063"
|
|
| languagePreference | The preferred language for the current Hi Marley case. | enum | true |
"languagePreference": "en"
|
|
|
secondaryOperators |
id | The identifier of the person assigned to the Hi Marley case. | string | false |
"id": "1cba88af-fac3-425a-9b2b-0faa5779b0e9"
|
| first | The first name of the person assigned to the Hi Marley case. | string | false |
"first": "Tom"
|
|
| last | The last name of the person assigned to the Hi Marley case. | string | false |
"last": "Smith"
|
|
| The email of the person assigned to the Hi Marley case. | string | false |
"email": "tom.smith@insuranceco.com"
|
||
| role | The role of the person assigned to the Hi Marley case. | enum | false | "role": "operator" | |
|
messages |
id | Message ID of the flagged message | string | true | "id": "33184205-24e5-4995-b3d7-601118fbd8ea" |
| type |
Type of message that was flagged. In most cases text will be flagged for needs attention.
|
enum | true | "type": "text" | |
| formatting |
Indicates if it is a standard message or sent from our ai.
|
enum | true | "formatting": "standard" | |
| data | The text/string of the message that Needs Attention. | string | true | "data": "i want to talk to my lawyer" | |
| channelSource |
The source of the inbound message.
|
enum | true | "channelSource": "mobile" | |
| author.id | The identifier of the message author. | string | true | "_id": "75f2b888-dca1-4596-9cad-325d1f8a6e54" | |
| author.role |
The role of the message author. Only endusers (customers) messages are flagged.
|
enum | true | "role": "enduser" | |
| author.profile.firstName | The authors first name. | string | true | "firstName": "Tom" | |
| author.profile.lastName | The authors surname/last name. | string | true | "lastName": "Riddle" | |
| createdAt | The date and time of the message creation. | smalldatetime | true | "createdAt": "2022-08-25T14:19:17.110Z" | |
| dateFormatted | The formatted date of the message creation. | date | true | "dateFormatted": "08-25-2022" | |
| timeFormatted | The formatted time of the message creation. | time | true | "timeFormatted": "10:19:17 AM EDT" | |
|
messageClassifications |
needsAttention | A boolean value assigned to the message for Needs Attention. True = the message needs attention. | boolean | false |
"messageClassifications"{
|
| needsAction | A boolean value assigned to the message for Needs Action. True = the message needs Action. | boolean | false |
"messageClassifications"{ "needsAction": true } |
|
| isRedacted | A boolean value assigned to the message if the media from the customer is marked as redacted in the webapp. | boolean | false |
"messageClassifications"{ "isRedacted": true } |
Comments
0 comments
Please sign in to leave a comment.