Thread

The thread resource models any form of communication between a user within your organization and a customer that has been synchronized from one the Mesh integrations.

The thread model intentionally maps to multiple forms of communication in an effort to reduce the complexity associated with querying for multiple communication threads that may exist with a user. Dealing with one unified resource is simpler than dealing with 3 divers resources.

Threads have a user_id field which will represent the customer with whom the communication has occurred. It also has a collaborator_ids field whose value is an array of user identifiers which can be other customers or other members of your organization.

Provider Mapping


Provider Model URL
Gmail thread https://developers.google.com/gmail/api/v1/reference/users/threads
Zendesk ticket https://developer.zendesk.com/rest_api/docs/core/tickets
Intercom conversation https://developers.intercom.io/reference#conversations

Types


The thread resource has a type property which describes the original form of communication. The threads types are email, ticket, conversation.

Thread Type Description
ticket The type representing a support ticket. The assignee_id for a ticket thread maps to the ticket's assignee.
email The type representing an actual email thread. The assignee_id for an email is nil as emails cannot be assigned.
conversation The type representing a chat conversation. The assignee_id for a conversation thread maps to the conversations assignee.

Model


Field Type Description
created_at int The original creation date of the thread.
updated_at int The date if the last update for the thread.
user_id string The identifier of the customer participating in the communication thread.
collaborator_ids array The the identifiers of the collaborators on the communication thread.
organization_id string The organization identifier to which the recipient belongs.
type string The type of thread. Either Conversations, Ticket or Email.
sub_type string The subtype of the thread.
subject string The subject of the thread. If no subject exists, the value will be the first message sent into the thread.
description string The description of the thread.
priority string The priority that has been assigned to the thread.
status string The status of the thread. Either Open, Pending, or Closed.
read string A boolean value indicating whether or not the thread has been read.
custom_fields string An array of custom fields associated with the thread.
tags string An array of tags applied to the thread.
url string The url for the thread.

Get Thread


Returns a single thread record.

Request

GET http://api.meshdata.io/apps/{app_id}/thread/{thread_id}

Response

HTTP/1.1 200 OK
{
    "collaborator_ids": [
        "21a1c6598dsdsd23dd00ddf34"
    ],
    "created_at": 1243435434543,
    "custom_fields": [],
    "description": "",
    "id": "56a1c9715decd82dd00dfa62",
    "origin": "zendesk",
    "priority": "high",
    "provider_data": {},
    "read": true,
    "user_id": "12a1c6798decd23dd00dfa34",
    "sub_type": "problem",
    "subject": "Any extra tickets?",
    "status": "open",
    "tags": [],
    "type": "ticket",
    "updated_at": 1243435434543,
    "url": "www.zendesk.com/{ticket_id}"
}

Get Threads


Fetches a multiple thread records.

Request

GET http://api.meshdata.io/apps/{app_id}/thread/{thread_id}

Response

HTTP/1.1 200 OK
[
    {
        "collaborator_ids": [
            "21a1c6598dsdsd23dd00ddf34"
        ],
        "created_at": 1243435434543,
        "custom_fields": [],
        "description": "",
        "id": "56a1c9715decd82dd00dfa62",
        "origin": "zendesk",
        "priority": "high",
        "provider_data": {},
        "read": true,
        "user_id": "12a1c6798decd23dd00dfa34",
        "sub_type": "problem",
        "subject": "Any extra tickets?",
        "status": "open",
        "tags": [],
        "type": "ticket",
        "updated_at": 1243435434543,
        "url": "www.zendesk.com/{ticket_id}"
    },
    {...}
]

Get Threads with Type


Fetches multiple thread records with the supplied type.

Request

GET http://api.meshdata.io/apps/{app_id}/thread/{thread_id}?type={thread_type}

Response

HTTP/1.1 200 OK
{
    "threads" : [
        {
            "collaborator_ids": [
                "21a1c6598dsdsd23dd00ddf34"
            ],
            "created_at": 1243435434543,
            "custom_fields": [],
            "description": "",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "zendesk",
            "priority": "high",
            "provider_data": {},
            "read": true,
            "user_id": "12a1c6798decd23dd00dfa34",
            "sub_type": "problem",
            "subject": "Any extra tickets?",
            "status": "open",
            "tags": [],
            "type": "ticket",
            "updated_at": 1243435434543,
            "url": "www.zendesk.com/{ticket_id}"
        },
        {...}
    ]
}

Get Threads For User


Fetches multiple thread records for the supplied user_id

Request

GET http://api.meshdata.io/apps/{app_id}/thread/{thread_id}?user_id={user_id}

Response

HTTP/1.1 200 OK
{
    "threads" : [
        {
            "collaborator_ids": [
                "21a1c6598dsdsd23dd00ddf34"
            ],
            "created_at": 1243435434543,
            "custom_fields": [],
            "description": "",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "zendesk",
            "priority": "high",
            "provider_data": {},
            "read": true,
            "user_id": "12a1c6798decd23dd00dfa34",
            "sub_type": "problem",
            "subject": "Any extra tickets?",
            "status": "open",
            "tags": [],
            "type": "ticket",
            "updated_at": 1243435434543,
            "url": "www.zendesk.com/{ticket_id}"
        },
        {...}
    ]
}

Get Threads For Assignee


Fetches multiple thread records for the supplied email

Request

GET http://api.meshdata.io/apps/{app_id}/thread/{thread_id}?email={email}

Response

HTTP/1.1 200 OK
{
    "threads" : [
        {
            "collaborator_ids": [
                "21a1c6598dsdsd23dd00ddf34"
            ],
            "created_at": 1243435434543,
            "custom_fields": [],
            "description": "",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "zendesk",
            "priority": "high",
            "provider_data": {},
            "read": true,
            "user_id": "12a1c6798decd23dd00dfa34",
            "sub_type": "problem",
            "subject": "Any extra tickets?",
            "status": "open",
            "tags": [],
            "type": "ticket",
            "updated_at": 1243435434543,
            "url": "www.zendesk.com/{ticket_id}"
        },
        {...}
    ]
}

results matching ""

    No results matching ""