A ticket is a conversation between your support agents and one of your customers.
It contains a list of messages, can be associated with tags, assigned to a user and/or a team, and also collect customer's feedback with a satisfaction survey.
Ticket properties
Ticket example object
{
"id": 123,
"assignee_user": null,
"channel": "email",
"closed_datetime": null,
"created_datetime": "2019-07-05T14:42:00.384938",
"customer": {
"data": {
"city": "San Francisco"
},
"id": 3924,
"external_id": "customer-84203241",
"email": "[email protected]",
"name": "John Smith",
"language": "fr",
"timezone": "UTC",
"created_datetime": "2019-04-13T03:27:56.973873",
"updated_datetime": "2019-09-25T06:18:22.839271",
"meta": {
"position": "engineer"
},
"note": "Our best customer.",
"active": true,
"customer": {},
"firstname": "John",
"integrations": {
"6": {
"orders": [
{
"id": 772803526679,
"total_tax": "0.02",
"created_at": "2018-12-04T03:29:37-08:00",
"line_items": [
{
"id": 1760305053719,
"sku": "0987654321",
"name": "Acidulous candy",
"grams": 10,
"price": "0.10",
"title": "Acidulous candy",
"taxable": true,
"quantity": 1,
"price_set": {
"shop_money": {
"amount": "0.10",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.10",
"currency_code": "USD"
}
},
"tax_lines": [
{
"rate": 0.2,
"price": "0.02",
"title": "TVA",
"price_set": {
"shop_money": {
"amount": "0.02",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.02",
"currency_code": "USD"
}
}
}
],
"product_id": 8345093387,
"variant_id": 28442938955,
"total_discount": "0.00",
"requires_shipping": true,
"fulfillment_status": null,
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"fulfillment_service": "manual",
"fulfillable_quantity": 1
}
],
"contact_email": "[email protected]",
"billing_address": {
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"country_code": "US",
"province_code": "CA"
}
}
],
"customer": {
"id": 667928133655,
"note": "",
"tags": "",
"email": "[email protected]",
"first_name": "Marie",
"last_name": "Curie",
"orders_count": 1,
"default_address": {
"id": 707106144279,
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"default": true,
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"customer_id": 667928133655,
"country_code": "US",
"country_name": "United States",
"province_code": "CA"
}
},
"__integration_type__": "shopify"
}
},
"lastname": "Smith"
},
"events": [
{
"user": {
"id": 3924,
"firstname": "Steve",
"lastname": "Frazeli",
"name": "Steve Frazelli",
"email": "[email protected]"
},
"id": 1234,
"context": "dd4ff312-69df-494a-be96-1a58b3d8b8e0",
"created_datetime": "2019-11-16T15:59:41.966927",
"data": null,
"object_id": 123,
"object_type": "Ticket",
"type": "ticket-closed",
"user_id": 123,
"uri": "/api/events/1234/"
}
],
"external_id": "RETURN#4213",
"is_unread": true,
"language": "fr",
"last_message_datetime": "2020-02-01T19:12:32.432197",
"last_received_message_datetime": "2020-01-27T10:42:21.468912",
"messages": [
{
"macros": [
{
"id": 5132
}
],
"id": 924712,
"external_id": "MSG-78545",
"message_id": "<123345676453.2445.234@web>",
"public": true,
"channel": "email",
"via": "api",
"source": {
"type": "email",
"from": {
"id": 7,
"name": "Sender Doe",
"address": "[email protected]"
},
"to": [
{
"id": 8,
"name": "Receiver Doe",
"address": "[email protected]"
}
]
},
"subject": "Re:Refund request",
"body_text": "Hello,\n\n I can't place an order on your site, it says: I don't have enough credit.\n How can I add some credits?\n\n Cheers,\n John Doe\n ",
"body_html": "Hello,<br><br>\n\n I can't place an order on your site, it says: I don't have enough credit.<br>\n How can I add some credits?<br><br>\n\n Cheers,<br>\n John Doe\n ",
"stripped_text": null,
"stripped_html": null,
"stripped_signature": null,
"headers": {},
"attachments": [],
"meta": {},
"created_datetime": "2020-01-27T10:42:21.468912",
"opened_datetime": "2019-07-05T15:22:46.472436",
"failed_datetime": null,
"deleted_datetime": null,
"actions": [],
"uri": "/api/tickets/12/messages/924712/",
"integration_id": 28643,
"rule_id": 89465,
"ticket_id": 12,
"from_agent": true,
"sender": {
"id": 7
},
"receiver": {
"id": 8
},
"last_sending_error": null,
"replied_by": null,
"replied_to": null
}
],
"meta": {},
"opened_datetime": "2019-07-05T15:22:46.472436",
"satisfaction_survey": {
"id": 1234,
"score": 2,
"body_text": "Such speed, much pertinent.",
"meta": {
"externalData": {
"id": 1234
}
},
"created_datetime": "2019-11-16T15:59:41.966927",
"should_send_datetime": "2019-11-23T15:59:41.966927",
"sent_datetime": "2019-11-23T15:59:41.966927",
"scored_datetime": "2019-11-25T15:59:41.966927",
"uri": "/api/satisfaction-surveys/1234/",
"customer_id": 120,
"ticket_id": 12
},
"snooze_datetime": null,
"spam": false,
"status": "open",
"subject": "Can I get a refund?",
"tags": [
{
"name": "urgent",
"description": "Mark a ticket as urgent",
"usage": 123,
"decoration": {
"color": "#F58D86"
},
"created_datetime": "2020-07-1300:00:00-05:00",
"deleted_datetime": "2020-07-1500:00:00-05:00"
}
],
"trashed_datetime": null,
"updated_datetime": "2020-01-27T10:42:21.932637",
"via": "email",
"uri": "/api/tickets/123/"
}