API ReferenceBuilding AppsInstalling IntercomAPI & Webhook ReferenceCanvas Kit Reference
DocsApp StoreForumBlogYour Apps

The Conversation model

Example Conversation Object

{
    "type": "conversation",
    "id": "1911149811",
    "created_at": 1539897198,
    "updated_at": 1540393270,
    "source": {
        "attachments": [],
        "author": {
            "id": "5bc8f7421ae2d96695c18a",
            "type": "lead"
        },
        "body": "<p>Hi</p>",
        "delivered_as": "customer_initiated",
        "id": "269650473",
        "subject": "",
        "type": "conversation",
        "url": "https://intercom-survey-app.glitch.me/",
        "redacted": false
    },
    "contacts": [
        {
            "id": "5bc8f7ae2d96695c18a",
            "type": "lead"
        }
    ],
    "teammates": [
        {
            "id": "814860",
            "type": "admin"
        }
    ],
    "title": "Conversation Title",
    "admin_assignee_id": 814860,
    "team_assignee_id": null,
    "custom_attributes": {
      "issue_type": "Billing",
      "priority": "High"
    },
    "topics": {
        "type": "topic.list",
        "topics": [
            {
                "type": "topic"
                "name": "Example Topic 1",
                "id": 839
            }
        ],
        "total_count": 1
    },
    "open": true,
    "state": "open",
    "read": true,
    "waiting_since": 64654125776,
    "snoozed_until": null,
    "tags": {
        "tags": [],
        "type": "tag.list",
    },
    "first_contact_reply": {
        "created_at": 1539897198
        "type": "conversation",
        "url": "https://intercom-survey-app.glitch.me/"
    },
    "priority": "not_priority",
    "sla_applied": {
        "sla_name": "VIP customer <5m",
      "sla_status": "missed",
    },
    "conversation_rating": {
        "created_at": null,
        "contact": {
            "id": null,
            "type": null
        },
        "rating": null,
        "remark": null,
        "teammate": {
            "id": null,
            "type": null
        }
    },
    "statistics": {
      "time_to_assignment": 2310,
      "time_to_admin_reply": 2408,
      "time_to_first_close": 4915 ,
      "time_to_last_close": 5125,
      "median_time_to_reply": 321,
      "first_contact_reply_at": 1539897200,
      "first_assignment_at": 1539897200,
      "first_admin_reply_at": 1539897200,
      "first_close_at": 1539897200,
      "last_assignment_at": 1539897200,
      "last_assignment_admin_reply_at": 1539897200,
      "last_contact_reply_at": 1539897200,
      "last_admin_reply_at": 1539897200,
      "last_close_at": 1539897200,
      "last_closed_by": {
        "type": "admin",
        "id": "325432652",
        "name": "Tom Smith",
        "email": "[email protected]"
      },
      "count_reopens": 3,
      "count_assignments": 2,
      "count_conversation_parts": 67
    },
    "conversation_parts": {
        "conversation_parts": [
            {
                "assigned_to": null,
                "attachments": [],
                "author": {
                    "id": "815309",
                    "type": "bot"
                },
                "body": "<p>Test_App typically replies in a few hours.</p>",
                "created_at": 1539897200,
                "external_id": null,
                "id": "2202737122",
                "notified_at": 1539897200,
                "part_type": "comment",
                "type": "conversation_part",
                "updated_at": 1539897200,
                "redacted": false
            },
          #List of conversation parts...
        ],
        "total_count": 67,
        "type": "conversation_part.list"
    }    
}
{
   "type":"conversation",
   "id":"1122334455",
   "created_at":1567693209,
   "updated_at":1568367881,
   "waiting_since":1568367881,
   "snoozed_until":null,
   "admin_assignee_id": "814860",
   "team_assignee_id": null,
   "open":true,
   "state":"open",
   "read":true,
   "tags":{
      "type":"tag.list",
      "tags":[

      ]
   },
   "conversation_rating":{
      "rating":null,
      "remark":null,
      "created_at":null,
      "customer":{
         "type":null,
         "id":null
      },
      "teammate":{
         "type":null,
         "id":null
      }
   },
   "conversation_parts":{
      "type":"conversation_part.list",
      "conversation_parts":[
         {
            "type":"conversation_part",
            "id":"1223445555",
            "part_type":"comment",
            "body":"We've removed this part of the conversation to comply with Twitter's terms and conditions. You can view the complete conversation in Intercom.",
            "created_at":1567693273,
            "updated_at":1567693273,
            "notified_at":1567693273,
            "assigned_to":null,
             "author":{
               "type":"user",
               "id":"5310d8e7598c9a0b24000002",
               "name":"",
               "email":""
            },
            "attachments": [],
            "external_id":null
         },
      ],
      "total_count":1
   },
   "customer_first_reply":{
      "created_at":1567693209,
      "type":"twitter",
      "url":""
   },
   "conversation_message":{
      "type":"twitter",
      "id":"409820079",
      "delivered_as":"customer_initiated",
      "subject":"We've removed this part of the conversation to comply with Twitter's terms and conditions. You can view the complete conversation in Intercom.",
      "body":"We've removed this part of the conversation to comply with Twitter's terms and conditions. You can view the complete conversation in Intercom.",
      "author":{
         "type":"user",
         "id":"5310d8e7598c9a0b24000002",
         "name":"",
         "email":""
      },
      "attachments":[

      ],
      "url":""
   },
   "customers":[
      {
         "type":"user",
         "id":"5310d8e7598c9a0b24000002"
      }
   ],
   "user":{
      "type":"user",
      "id":"5310d8e7598c9a0b24000002"
   }
}

Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact.

Object Models

Conversation

FieldTypeDescription
typestringAlways conversation.
idstringThe id representing the conversation.
titlestringThe title given to the conversation.
created_atintegerThe time the conversation was created.
updated_atintegerThe last time the conversation was updated.
waiting_sinceintegerThe last time a Contact responded to an Admin. In other words, the time a customer started waiting for a response. Set to null if last reply is from an Admin.
snoozed_untilintegerIf set this is the time in the future when this conversation will be marked as open. i.e. it will be in a snoozed state until this time. i.e. it will be in a snoozed state until this time.
openbooleanIndicates whether a conversation is open (true) or closed (false).
statestringCan be set to "open", "closed" or "snoozed".
readbooleanIndicates whether a conversation has been read.
prioritystringIf marked as priority, it will return priority or else not_priority.
admin_assignee_idintegerThe id of the admin assigned to the conversation. If it's not assigned to an admin it will return null.
team_assignee_idstringThe id of the team assigned to the conversation. If it's not assigned to a team it will return null.
tagsobjectA list of tags objects associated with a conversation
conversation_ratingobjectThe Conversation Rating object which contains information on the rating and/or remark added by a Contact and the Admin assigned to the conversation.
sourceobjectThe Conversation Part that originated this conversation, which can be Contact, Admin, Campaign, Automated or Operator initiated.
contactsobjectThe list of contacts (users or leads) involved in this conversation. This will only contain one customer unless more were added via the group conversation feature.
teammatesobjectThe list of teammates who participated in the conversation (wrote at least one conversation part).
custom_attributesobjectAn object containing the different custom attributes associated to the conversation as key-value pairs. For relationship attributes the value will be a list of custom object instance models.
first_contact_replyobjectAn object containing information on the first users message. For a contact initiated message this will represent the users original message.
sla_appliedobjectThe SLA Applied object contains the details for which SLA has been applied to this conversation.Important: if there are any canceled sla_events for the conversation - meaning an SLA has been manually removed from a conversation, the sla_status will always be returned as null.
statisticsobjectA Statistics object containing all information required for reporting, with timestamps and calculated metrics.
conversation_partsobjectA list of Conversation Part objects for each part message in the conversation. This is only returned when Retrieving a Conversation, and ignored when Listing all Conversations. There is a limit of 500 parts.

Tags

FieldTypeDescription
typestringThe type of the object
tagsarrayA list of tags objects associated with the conversation.

Conversation Rating

FieldTypeDescription
ratingintegerThe rating, between 1 and 5, for the conversation.
remarkstringAn optional field to add a remark to correspond to the number rating
created_atintegerThe time the rating was requested in the conversation being rated.
contactobjectreference to another object
teammateobjectreference to another object

Conversation Source

FieldTypeDescription
typestringThis includes conversation, push, facebook, twitter and email.
idstringThe id representing the message.
delivered_asstringThe conversation's initiation type. Possible values are customer_initiated, campaigns_initiated (legacy campaigns), operator_initiated (Custom bot), automated (Series and other outbounds with dynamic audience message) and admin_initiated (fixed audience message, ticket initiated by an admin, group email).
subjectstringOptional. The message subject. For Twitter, this will show a generic message regarding why the subject is obscured.
bodystringThe message body, which may contain HTML. For Twitter, this will show a generic message regarding why the body is obscured.
authorobjectThe object who initiated the conversation, which can be a Contact, Admin or Team. Bots and campaigns send messages on behalf of Admins or Teams. For Twitter, this will be blank.
attachmentsarrayA list of attachments for the part.
urlstringThe URL where the conversation was started. For Twitter, Email, and Bots, this will be blank.
redactedbooleanWhether or not the source message has been redacted. Only applicable for contact initiated messages.

Conversation Contacts

FieldTypeDescription
typestring
contactsarrayThe list of contacts (users or leads) involved in this conversation. This will only contain one customer unless more were added via the group conversation feature.

Conversation Teammates

FieldTypeDescription
typestringThe type of the object - admin.list.
teammatesarrayThe list of teammates who participated in the conversation (wrote at least one conversation part).

Conversation First Contact Reply

FieldTypeDescription
created_atinteger
typestring
urlstring

Sla Applied

FieldTypeDescription
typestringobject type
sla_namestringThe name of the SLA as given by the teammate when it was created.
sla_statusstringSLA statuses: - hit: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - missed: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - active: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events.

Conversation Statistics

FieldTypeDescription
typestring
time_to_assignmentintegerDuration until last assignment before first admin reply. In seconds.
time_to_admin_replyintegerDuration until first admin reply. Subtracts out of business hours. In seconds.
time_to_first_closeintegerDuration until conversation was closed first time. Subtracts out of business hours. In seconds.
time_to_last_closeintegerDuration until conversation was closed last time. Subtracts out of business hours. In seconds.
median_time_to_replyintegerMedian based on all admin replies after a contact reply. Subtracts out of business hours. In seconds.
first_contact_reply_atintegerTime of first text conversation part from a contact.
first_assignment_atintegerTime of first assignment after first_contact_reply_at.
first_admin_reply_atintegerTime of first admin reply after first_contact_reply_at.
first_close_atintegerTime of first close after first_contact_reply_at.
last_assignment_atintegerTime of last assignment after first_contact_reply_at.
last_assignment_admin_reply_atintegerTime of first admin reply since most recent assignment.
last_contact_reply_atintegerTime of the last conversation part from a contact.
last_admin_reply_atintegerTime of the last conversation part from an admin.
last_close_atintegerTime of the last conversation close.
last_closed_by_idstringThe last admin who closed the conversation. Returns a reference to an Admin object.
count_reopensintegerNumber of reopens after first_contact_reply_at.
count_assignmentsintegerNumber of assignments after first_contact_reply_at.
count_conversation_partsintegerTotal number of conversation parts.

Conversation Parts

FieldTypeDescription
typestring
conversation_partsarrayA list of Conversation Part objects for each part message in the conversation. This is only returned when Retrieving a Conversation, and ignored when Listing all Conversations. There is a limit of 500 parts.
total_countinteger

Conversation Part Types

TypeDescription
commentStandard reply from customer or admin to a conversation.
noteA note created by an admin on the conversation. A note will only be viewable as an admin.
note_and_reopenAdd a note and reopen the conversations in the one action.
note_and_unsnoozeAdd a note and unsnooze the conversations in the one action.
assignmentAn assignment of the conversation to an admin, or Nobody.
assign_and_unsnoozeAn assignment of the conversation to an admin, or Nobody and Unsnooze the conversation in one action
workflow_assignmentAn inbox workflow has assigned a admin to a conversation.
openIdentifies a conversation has been opened.
closeIdentifies a conversation has been closed.
away_mode_assignmentConversation has been assigned due to the admin being in away mode.
participant_addedA participant has been added to a group conversation.
participant_removedA participant has been removed from a group conversation.
conversation_ratingA request to rate the conversation has been sent to the user
conversation_rating_changedA conversation rating has been changed, not this can only occur before the rating has been submitted. Once it has been submitted it cannot be changed.
conversation_rating_remark_addedA conversation remark has been added to the conversation.
snoozedA conversation has been snoozed.
unsnoozedA conversation has been unsnoozed.
assign_and_unsnoozeAssign a conversation and unsnooze it in one action.
timer_unsnoozeUnsnooze a conversation after a set time.
quick_replyA quick reply from a customer.
custom_action_startedHighlights that a custom action has been triggered an specific conversation.
custom_action_finishedHighlights that a custom action has finished execution an specific conversation.
conversation_attribute_updated_by_userHighlights that a conversation attribute was updated by the user.
conversation_attribute_updated_by_adminHighlights that a conversation attribute was updated by an admin.
conversation_attribute_updated_by_workflowHighlights that a conversation attribute was updated by an Inbox workflow.
conversation_sla_applied_by_ruleHighlights that a inbox rule has added an SLA to a conversation.
conversation_sla_applied_by_workflowHighlights that a workflow has added an SLA to a conversation.
conversation_sla_removedHighlights that a SLA has been removed from a conversation.
conversation_sla_target_missedHighlights that a conversation has missed its SLA target.
user_became_idleOperator did not receive a reply from the user in time.
priority_changedThe priority of the conversation has changed.
priority_changed_by_ruleAn inbox rule has changed the priority of a conversation.
resolution_bot_found_no_answerResolution bot found no answer to the user's query.
conversation_tags_updatedConversation tags have been updated.
attribute_collectorOperator has added an attribute collector.
attribute_collectedUser has given Operator a response to the attribute_collector