The Ticket object

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

integer

ID of the ticket.

string

URI of the ticket.

string | null

External ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.

array
Deprecated

All action-executed events with the related user if any on the ticket.
This parameter has been deprecated. Use events api instead.

None

Ticket status is used for managing the lifecycle of the ticket

None

Indicates the importance of the ticket.

LegacyChannelSlug | string

The channel used to initiate the conversation with the customer.

None

How the first message of the ticket has been received or sent from Gorgias.

boolean | null

Whether the first message of the ticket was sent by your company to a customer, or the opposite.

boolean

Whether the ticket is considered as spam or not.

None

The customer linked to the ticket.

TicketUser | null

The agent assigned to this ticket.

integer | null

ID of the user assigned to this ticket.

TicketTeam | null

The team assigned to the ticket.

integer | null

ID of the team assigned to this ticket.

string | null

The language primarily used in the ticket. The language is automatically detected on the first messages by Gorgias if not set explicitly. Once the language has been set, it won't be updated according to future messages.

string | null

The subject of the ticket.

TicketMeta | null

Extra metadatas about the ticket.

array

Tags linked to the ticket.

object | null

The custom fields associated with the ticket.

array

Messages of the ticket.

ISO 8601 datetime

When the ticket was created.

string | null

When the ticket was opened for the first time by a user.

string | null

When the last customer's message was sent.

string | null

When the last message was sent.

string | null

When the ticket was lastly updated.

string | null

When the ticket was closed.

string | null

When the ticket was moved to the trash.

string | null

When the ticket will be re-opened.

TicketSatisfactionSurvey | null

The satisfaction survey linked to the ticket.

object
None
TicketCustomer | null

The user who is requesting something in this ticket.

boolean

Whether the ticket is unread for you.

Ticket example object

{
  "id": 123,
  "external_id": "RETURN#4213",
  "events": [
    {
      "created_datetime": "2019-11-16T15:59:41.966927",
      "data": null,
      "id": 1234,
      "type": "ticket-closed",
      "user": {
        "email": "steve@company.com",
        "firstname": "Steve",
        "id": 3924,
        "lastname": "Frazeli",
        "name": "Steve Frazelli"
      }
    }
  ],
  "status": "open",
  "priority": "normal",
  "channel": "email",
  "via": "email",
  "spam": false,
  "customer": {
    "email": "john@example.com",
    "external_id": "customer-84203241",
    "firstname": "John",
    "id": 3924,
    "integrations": {
      "6": {
        "__integration_type__": "shopify",
        "customer": {
          "default_address": {
            "address1": "52 Washburn Street",
            "address2": "",
            "city": "SAN FRANCISCO",
            "country": "United States",
            "country_code": "US",
            "country_name": "United States",
            "customer_id": 667928133655,
            "default": true,
            "first_name": "Marie",
            "id": 707106144279,
            "last_name": "Curie",
            "name": "Marie Curie",
            "province": "California",
            "province_code": "CA",
            "zip": "94103"
          },
          "email": "marie@gorgias.io",
          "first_name": "Marie",
          "id": 667928133655,
          "last_name": "Curie",
          "note": "",
          "orders_count": 1,
          "tags": ""
        },
        "orders": [
          {
            "billing_address": {
              "address1": "52 Washburn Street",
              "address2": "",
              "city": "SAN FRANCISCO",
              "country": "United States",
              "country_code": "US",
              "first_name": "Marie",
              "last_name": "Curie",
              "name": "Marie Curie",
              "province": "California",
              "province_code": "CA",
              "zip": "94103"
            },
            "contact_email": "marie@gorgias.io",
            "created_at": "2018-12-04T03:29:37-08:00",
            "id": 772803526679,
            "line_items": [
              {
                "fulfillable_quantity": 1,
                "fulfillment_service": "manual",
                "fulfillment_status": null,
                "grams": 10,
                "id": 1760305053719,
                "name": "Acidulous candy",
                "price": "0.10",
                "price_set": {
                  "presentment_money": {
                    "amount": "0.10",
                    "currency_code": "USD"
                  },
                  "shop_money": {
                    "amount": "0.10",
                    "currency_code": "USD"
                  }
                },
                "product_id": 8345093387,
                "quantity": 1,
                "requires_shipping": true,
                "sku": "0987654321",
                "tax_lines": [
                  {
                    "price": "0.02",
                    "price_set": {
                      "presentment_money": {
                        "amount": "0.02",
                        "currency_code": "USD"
                      },
                      "shop_money": {
                        "amount": "0.02",
                        "currency_code": "USD"
                      }
                    },
                    "rate": 0.2,
                    "title": "TVA"
                  }
                ],
                "taxable": true,
                "title": "Acidulous candy",
                "total_discount": "0.00",
                "total_discount_set": {
                  "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  },
                  "shop_money": {
                    "amount": "0.00",
                    "currency_code": "USD"
                  }
                },
                "variant_id": 28442938955
              }
            ],
            "total_tax": "0.02"
          }
        ]
      }
    },
    "lastname": "Smith",
    "meta": {
      "position": "engineer"
    },
    "name": "John Smith",
    "note": "Our best customer."
  },
  "assignee_user": {
    "bio": "Full stack developer at Gorgias",
    "email": "steve@company.com",
    "firstname": "Steve",
    "id": 3924,
    "lastname": "Frazeli",
    "meta": {
      "avatar_url": "https://avatars.example.com/steve-profile.jpeg",
      "position": "engineer"
    },
    "name": "Steve Frazelli"
  },
  "assignee_user_id": 4,
  "assignee_team": {
    "id": 123,
    "name": "Warehouse team"
  },
  "assignee_team_id": 8,
  "language": "fr",
  "subject": "Can I get a refund?",
  "meta": {},
  "tags": [
    {
      "decoration": {
        "color": "#F58D86"
      },
      "name": "urgent"
    }
  ],
  "created_datetime": "2019-07-05T14:42:00.384938",
  "opened_datetime": "2019-07-05T15:22:46.472436",
  "last_received_message_datetime": "2020-01-27T10:42:21.468912",
  "last_message_datetime": "2020-02-01T19:12:32.432197",
  "updated_datetime": "2020-01-27T10:42:21.932637",
  "satisfaction_survey": {
    "body_text": "Such speed, much pertinent.",
    "created_datetime": "2019-11-16T15:59:41.966927",
    "customer_id": 120,
    "id": 1234,
    "meta": {
      "externalData": {
        "id": 1234
      }
    },
    "score": 2,
    "scored_datetime": "2019-11-25T15:59:41.966927",
    "sent_datetime": "2019-11-23T15:59:41.966927",
    "should_send_datetime": "2019-11-23T15:59:41.966927",
    "ticket_id": 12
  },
  "is_unread": true
}