You can set up assignment rules to assign conversations to the correct team or teammate.
This usually happens upon a new, user initiated conversation coming in. This API call allows you to trigger the assignment rules when a conversation is unassigned - whether that's during a conversation, or when a user responds to an admin initiated conversation.
Required Product
Assignment Rules are only available with Inbox Pro. You can upgrade here.
Assign based on assignment rules
curl 'https://api.intercom.io/conversations/{convo_id}/run_assignment_rules'
-X POST
-H 'Authorization: Bearer <Acess Token>='
-H 'Accept: application/json'
-H 'Content-Type: application/json'
HTTP/1.1 200 OK
{
"type": "conversation",
"id": "14113586456",
"created_at": 1516147337,
"updated_at": 1519928682,
"waiting_since": 64632601013,
"snoozed_until": null,
"conversation_message": {
"type": "conversation_message",
"id": "55951247",
"subject": "",
"body": "<p>Hi \ud83d\ude00 We hope you enjoy the example app. To get started just copy and paste some code into the JS editor. Let us know if you think this is useful? <br></p>",
"author": {
"type": "admin",
"id": "814865"
},
"attachments": [],
"url": null
},
"user": {
"type": "user",
"id": "58bed1207d39a857fc9488e7"
},
"customers": [
{
"type": "user",
"id": "58bed1207d39a857fc9488e7"
}
],
"assignee": {
"type": "admin",
"id": "814860"
},
"conversation_parts": {
"type": "conversation_part.list",
"conversation_parts": [
{
...
}
],
"total_count": 17
},
"open": true,
"state": "open",
"read": false,
"tags": {
"type": "tag.list",
"tags": []
},
"conversation_rating": {
"rating": null,
"remark": null,
"created_at": null,
"customer": {
"type": null,
"id": null
},
"teammate": {
"type": null,
"id": null
}
}
}