Ticket
With the Ticket API, you can manage inquiries from your customers. When a new ticket is submitted, your agents and customers can start a conversation within it.
Resource representation
The following table shows the list of properties in a ticket resource.
Property name | Type | Description |
---|---|---|
id | int | The unique ID of the ticket. |
project | int | The unique ID of a Desk project where the agent belongs. Desk projects have their own corresponding Sendbird application on a one-to-one basis. |
channelName | string | The name of the ticket. |
channelUrl | string | The channel URL of the ticket from Sendbird Chat platform. The value of tickets from social networks will be generated arbitrarily by Desk. |
createdAt | string | The date and time when the ticket was created, in ISO 8601 format. |
closedAt | string | The date and time when the ticket was closed, in ISO 8601 format. |
issuedAt | string | The date and time when the customer sent the first message, in ISO 8601 format. |
durationTime | int | The time in seconds taken from a customer's first message to ticket closing. |
pendingTime | int | The time in seconds taken from a customer's first message to ticket assignment. |
conversationTime | int | The time in seconds taken from a customer's first message to the last message of the conversation. |
customer | nested object | An object that contains the information of the customer. |
status2 | string | The status of the ticket. This property has been updated from the previous version status to be consistent with the ticket status on the Sendbird Dashboard. Valid values are limited to the following: |
closeStatus | string | The reason why the ticket has been closed. Valid values are limited to the following: |
recentAssignment | nested object | The detailed information about the last assignment. |
closeComment | string | The comment left for ticket closing. |
closeMessage | string | The message for ticket closing, which is sent instead of the default closing message set in Settings > Triggers of your dashboard. |
info | string | The information of a ticket such as subject and the requester given upon its creation. |
messageCount | int | The total count of the messages in the ticket. |
lastMessage | string | The last message of the ticket. |
lastMessageSender | string | The sender of the last message. Valid values are CUSTOMER, AGENT, and PLATFORM. |
lastMessageAt | string | The date and time when the last message was sent, in ISO 8601 format. |
lastUserMessageSender | string | The sender of the last text message except for the admin messages from Desk Platform. Valid values are CUSTOMER and AGENT. |
lastUserMessageAt | string | The date and time when the customer sent the last message, in ISO 8601 format. |
updatedAt | string | The date and time when the ticket information was last updated, in ISO 8601 format. |
firstAssignmentToCloseTime | int | The time in seconds taken from the first assignment of a ticket to ticket closing. |
firstResponseTime | int | The time in seconds taken from a customer’s first message to an agent’s first response. |
channelType | string | A channel type that indicates which channel the ticket belongs to. Valid values are SENDBIRD, SENDBIRD_IOS, SENDBIRD_ANDROID, SENDBIRD_JAVASCRIPT, FACEBOOK_CONVERSATION, FACEBOOK_FEED, TWITTER_STATUS, TWITTER_DIRECT_MESSAGE_EVENT, INSTAGRAM_COMMENT, and WHATSAPP_MESSAGE. |
data | string | The information related to tickets from social networks. |
lastSeenAt | int | The timestamp when the customer first read the last message in the ticket, in Unix millisecond. The value of 0 indicates the customer hasn't read the last message yet. This property is applicable for tickets from Facebook only. |
group | nested object | The group which this ticket belongs to. |
customFields[] | array | An array of key-value custom fields that indicates additional information about the ticket. This property can have up to 20 custom fields. |
customerSatisfactionScore | int | The customer satisfaction score. Valid values are 1 to 5, inclusive. |
customerSatisfactionComment | string | The feedback from a customer about the support within the ticket. |
priority | string | The priority of the ticket. Valid values are LOW, MEDIUM, HIGH, and URGENT. When it comes to ticket assignment with the auto ticket routing function, a ticket with a higher priority takes precedence over others. |
priorityValue | int | The priority value of the ticket. Valid values are 10, 20, 30, and 40, which indicate Low, Medium, High, and Urgent in the |
relatedChannel | nested object | The information of channels in Sendbird Chat platform that are related to this ticket. |
Actions
- API endpoints are relative to the base URL allocated to your application. In this page, the
/tickets
endpoint refers tohttps://desk-api-{application_id}.sendbird.com/platform/v1/tickets
.
Note: If you want to know your application ID, sign in to your dashboard, go to the Settings > Application > General, and then check the Application ID.
- It's recommended that the parameter values in API URLs be urlencoded, such as
{ticket_id}
.
List of actions
Action | HTTP request |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
List tickets
Retrieves a list of all tickets in the application.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Optional
Parameter name | Type | Description |
---|---|---|
limit | int | Specifies the number of results to return per page. Acceptable values are 1 to 500, inclusive. (Default: 50) |
int | Specifies the number of results to skip when receiving a response. The value of | |
status2 | string | Restricts the search scope to only retrieve tickets whose status matches the specified value. You can also specify multiple |
agent | string | Specifies the unique ID of an agent to restrict the search scope to only retrieve tickets assigned to a specific agent. |
group | string | Restricts the search scope to only retrieve tickets assigned to the specified team. |
sendbird_id | string | Restricts the search scope to only retrieve tickets submitted by a customer with a specified Sendbird ID. |
q | string | Restricts the search scope to retrieve up to 100 tickets that match a specified keyword. The specified keyword is applied to the following: channel names, and customers' display names and Sendbird IDs. For example, |
assignment_status | string | Restricts the search scope to only retrieve tickets whose assignment status matches the specified value. Acceptable values are limited to the following: |
channel_url | string | Restricts the search scope to only retrieve tickets related to a specified channel URL. |
updated_since | date | Specifies a starting date that restricts the search scope to retrieve tickets that have been updated after the point, in YYYY-MM-DD format. |
start_date | date | Specifies a starting date that restricts the search scope to retrieve tickets created between start_date and end_date, in YYYY-MM-DD format. |
end_date | date | Specifies an ending date that restricts the search scope to retrieve tickets created between start_date and end_date, in YYYY-MM-DD format. |
order | string | Specifies the method to sort a list of results. Acceptable values are limited to the following: |
Response
If successful, this action returns a list of ticket resources in the response body.
List of response properties
Property name | Type | Description |
---|---|---|
count | int | The total count of tickets registered in the application. |
previous | string | The URL to retrieve the previous page in the result set. |
next | string | The URL to retrieve the next page in the result set. |
results[] | list | A list of tickets. |
Error
In the case of an error, an error object like below is returned. See the error code table for more details.