Answered

What's in the payload of 'conversation.admin.closed' webhook ?


Hello,

 

Using v2.4 of the API. We have a webhook on 'conversation.admin.closed', that return a conversation-ish object. Some fields from the documentation are not there (like 'contacts' or 'source') and we have extra fields (like an 'assignee' object).

 

This documentation seems to says that it's a "Conversation data", but what we get do not match the conversation model.

 

Is this realy a conversation model or something else ? Where can I find the documentation for this ?

 

Example of data we get :

 

"data": {
"type": "notification_event_data",
"item": {
"type": "conversation",
"id": "xxxxxxxxx",
"created_at": 1651678878,
"updated_at": 1651678890,
"user": {
"type": "user",
"id": "xxxxxx",
"user_id": "xxxxxxx",
"name": "xxxxx",
"email": "xxxxxx",
"do_not_track": null
},
"assignee": {
"type": "admin",
"id": "xxxx",
"name": "xxxx",
"email": "xxxxx"
},
"admin_assignee_id": null,
"team_assignee_id": xxxx,
"conversation_message": {
"type": "conversation_message",
"id": "xxxxx",
"url": "xxxxxxx",
"subject": "",
"body": "<p>conv 4</p>",
"author": {
"type": "user",
"id": "xxxxxx"
},
"attachments": []
},
"conversation_parts": {
"type": "conversation_part.list",
"conversation_parts": [
{
"type": "conversation_part",
"id": "xxxxxxx",
"part_type": "close",
"body": null,
"created_at": 1651678890,
"updated_at": 1651678890,
"notified_at": 1651678890,
"assigned_to": null,
"author": {
"type": "admin",
"id": "xxxxxx",
"name": "Équipe technique"
},
"attachments": [],
"external_id": null
}
],
"total_count": 1
},
"conversation_rating": {},
"open": false,
"state": "closed",
"snoozed_until": null,
"read": true,
"metadata": {},
"tags": {
"type": "tag.list",
"tags": []
},
"tags_added": {
"type": "tag.list",
"tags": []
},
"custom_attributes": {},
"links": {
"conversation_web": "xxxxxx"
}
}
}

 

 

Thanks !

icon

Best answer by Diana Tripac 12 May 2022, 14:52

View original

2 replies

Userlevel 3
Badge +2

Hi @user1198​ 👋 We don't have documentation which covers exactly what data is returned for each webhook. I can confirm that there is more data returned than what is specified in the conversation object outlined in our REST API docs. What that extra data is depends on the webhook. This might be a good suggestion for something to include in our developer docs going forward. Let me know if you would like me to suggest this to our product team👍

Hello !

Thanks for your answer 🙂

Yes, that would be great if the documentation could match what the webhook returns 😅

Reply