> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Ticket

> Documentation for the Create Ticket action for Intercom

![images/intercom.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/intercom.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=9da8767a0b421cfaadbfd9eef6bf6adf)

# Parameters

**Action** `Parameters`

**parameters**

**Ticket Type** `string (Ticket Type)` *required*

This field maps to the destination API `ticket_type_id` field.

**Ticket Attributes** `Map\<Ticket Attribute,dynamic (any)\>`

`HI` `ID` `PII`
This field maps to the destination API `ticket_attributes` field.

**Contacts** `[]string` *required*

`ID`
This field maps to the destination API `contacts` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "admin_assignee_id": "991267404",
    "category": "Customer",
    "contacts": {
      "contacts": [
        {
          "id": "5ba682d23d7cf92bef87bfd4",
          "type": "contact"
        }
      ]
    },
    "created_at": "2024-01-15T10:30:00Z",
    "id": "6601b6f123d45678901234",
    "is_shared": false,
    "linked_objects": {
      "data": [
        {
          "id": "372",
          "type": "conversation"
        }
      ],
      "has_more": false,
      "total_count": 2
    },
    "open": true,
    "snoozed_until": "2024-01-16T09:00:00Z",
    "team_assignee_id": "394051",
    "ticket_attributes": null,
    "ticket_id": "12345",
    "ticket_parts": {
      "ticket_parts": [
        {
          "body": "This ticket was created by a customer.",
          "created_at": "2024-01-15T10:30:00Z",
          "id": "3baf5d69",
          "part_type": "note",
          "updated_at": "2024-01-15T10:30:00Z"
        }
      ],
      "total_count": 1
    },
    "ticket_state": "in_progress",
    "ticket_type": {
      "archived": false,
      "category": "Customer",
      "created_at": "2024-01-01T10:00:00Z",
      "description": "Report bugs or technical issues",
      "icon": "🐛",
      "id": "123",
      "name": "Bug Report",
      "updated_at": "2024-01-15T14:30:00Z",
      "workspace_id": "ecahpwf5"
    },
    "updated_at": "2024-01-15T15:45:00Z"
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "admin_assignee_id": "The id representing the admin assigned to the ticket",
    "category": "Category of the Ticket",
    "contacts": {
      "contacts": {
        "id": "The id of the contact",
        "type": "The type of the contact"
      }
    },
    "created_at": "The time the ticket was created",
    "id": "The unique identifier for the ticket which is given by Intercom",
    "is_shared": "Whether or not the ticket is shared with the customer",
    "linked_objects": {
      "data": {
        "id": "Id of the linked object",
        "type": "Type of the linked object"
      },
      "has_more": "Whether there are more linked objects",
      "total_count": "Total count of linked objects"
    },
    "open": "Whether or not the ticket is open",
    "snoozed_until": "The time the ticket will be snoozed until",
    "team_assignee_id": "The id representing the team assigned to the ticket",
    "ticket_attributes": "An object containing the different attributes associated to the ticket",
    "ticket_id": "The ID of the Ticket used in the Intercom Inbox and Messenger",
    "ticket_parts": {
      "ticket_parts": {
        "body": "The message body, which may contain HTML",
        "created_at": "The time the ticket part was created",
        "id": "The id representing the ticket part",
        "part_type": "The type of ticket part",
        "updated_at": "The last time the ticket part was updated"
      },
      "total_count": "Total count of ticket parts"
    },
    "ticket_state": "A ticket state, used to define the state of a ticket",
    "ticket_type": {
      "archived": "Whether the ticket type is archived or not",
      "category": "Category of the Ticket Type",
      "created_at": "The date and time the ticket type was created",
      "description": "The description of the ticket type",
      "icon": "The icon of the ticket type",
      "id": "The id representing the ticket type",
      "name": "The name of the ticket type",
      "updated_at": "The date and time the ticket type was last updated",
      "workspace_id": "The id of the workspace that the ticket type belongs to"
    },
    "updated_at": "The last time the ticket was updated"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**Ticket** `Fetch Action Response Object`

**fields**

**id** `string` *required*

The unique identifier for the ticket which is given by Intercom

```json CEL theme={null}
$result_object_key.id
```

```json Example theme={null}
"6601b6f123d45678901234"
```

**ticket\_id** `string` *required*

The ID of the Ticket used in the Intercom Inbox and Messenger

```json CEL theme={null}
$result_object_key.ticket_id
```

```json Example theme={null}
"12345"
```

**category** `string` *required*

Category of the Ticket

```json CEL theme={null}
$result_object_key.category
```

```json Example theme={null}
"Customer"
```

**ticket\_attributes** `object` *required*

An object containing the different attributes associated to the ticket

```json CEL theme={null}
$result_object_key.ticket_attributes
```

```json Example theme={null}
null
```

**ticket\_state** `string`

A ticket state, used to define the state of a ticket

```json CEL theme={null}
$result_object_key.ticket_state
```

```json Example theme={null}
"in_progress"
```

**ticket\_type** `object`

A ticket type, used to define the data fields to be captured in a ticket

```json CEL theme={null}
$result_object_key.ticket_type
```

```json Example theme={null}
{
"archived": false,
"category": "Customer",
"created_at": "2024-01-01T10:00:00Z",
"description": "Report bugs or technical issues",
"icon": "🐛",
"id": "123",
"name": "Bug Report",
"updated_at": "2024-01-15T14:30:00Z",
"workspace_id": "ecahpwf5"
}
```

**ticket\_type.id** `string`

The id representing the ticket type

```json CEL theme={null}
$result_object_key.ticket_type.id
```

```json Example theme={null}
"123"
```

**ticket\_type.category** `string`

Category of the Ticket Type

```json CEL theme={null}
$result_object_key.ticket_type.category
```

```json Example theme={null}
"Customer"
```

**ticket\_type.name** `string`

The name of the ticket type

```json CEL theme={null}
$result_object_key.ticket_type.name
```

```json Example theme={null}
"Bug Report"
```

**ticket\_type.description** `string`

The description of the ticket type

```json CEL theme={null}
$result_object_key.ticket_type.description
```

```json Example theme={null}
"Report bugs or technical issues"
```

**ticket\_type.icon** `string`

The icon of the ticket type

```json CEL theme={null}
$result_object_key.ticket_type.icon
```

```json Example theme={null}
"🐛"
```

**ticket\_type.workspace\_id** `string`

The id of the workspace that the ticket type belongs to

```json CEL theme={null}
$result_object_key.ticket_type.workspace_id
```

```json Example theme={null}
"ecahpwf5"
```

**ticket\_type.archived** `bool`

Whether the ticket type is archived or not

```json CEL theme={null}
$result_object_key.ticket_type.archived
```

```json Example theme={null}
false
```

**ticket\_type.created\_at** `timing.v1.Timestamp`

The date and time the ticket type was created

```json CEL theme={null}
$result_object_key.ticket_type.created_at
```

```json Example theme={null}
"2024-01-01T10:00:00Z"
```

**ticket\_type.updated\_at** `timing.v1.Timestamp`

The date and time the ticket type was last updated

```json CEL theme={null}
$result_object_key.ticket_type.updated_at
```

```json Example theme={null}
"2024-01-15T14:30:00Z"
```

**contacts** `object`

The list of contacts affected by a ticket

```json CEL theme={null}
$result_object_key.contacts
```

```json Example theme={null}
{
"contacts": [
{
"id": "5ba682d23d7cf92bef87bfd4",
"type": "contact"
}
]
}
```

**contacts.contacts** `[]object`

The list of contacts affected by this ticket

```json CEL theme={null}
$result_object_key.contacts.contacts
```

```json Example theme={null}
[
{
"id": "5ba682d23d7cf92bef87bfd4",
"type": "contact"
}
]
```

**contacts.contacts.map(x, x.type)** `[]string` *required*

Mapped array of: The type of the contact

```json CEL theme={null}
$result_object_key.contacts.contacts.map(x, x.type)
```

```json Example theme={null}
[
"contact"
]
```

**contacts.contacts.map(x, x.id)** `[]string` *required*

Mapped array of: The id of the contact

```json CEL theme={null}
$result_object_key.contacts.contacts.map(x, x.id)
```

```json Example theme={null}
[
"5ba682d23d7cf92bef87bfd4"
]
```

**admin\_assignee\_id** `string`

The id representing the admin assigned to the ticket

```json CEL theme={null}
$result_object_key.admin_assignee_id
```

```json Example theme={null}
"991267404"
```

**team\_assignee\_id** `string`

The id representing the team assigned to the ticket

```json CEL theme={null}
$result_object_key.team_assignee_id
```

```json Example theme={null}
"394051"
```

**created\_at** `timing.v1.Timestamp` *required*

The time the ticket was created

```json CEL theme={null}
$result_object_key.created_at
```

```json Example theme={null}
"2024-01-15T10:30:00Z"
```

**updated\_at** `timing.v1.Timestamp` *required*

The last time the ticket was updated

```json CEL theme={null}
$result_object_key.updated_at
```

```json Example theme={null}
"2024-01-15T15:45:00Z"
```

**open** `bool` *required*

Whether or not the ticket is open

```json CEL theme={null}
$result_object_key.open
```

```json Example theme={null}
true
```

**snoozed\_until** `timing.v1.Timestamp`

The time the ticket will be snoozed until

```json CEL theme={null}
$result_object_key.snoozed_until
```

```json Example theme={null}
"2024-01-16T09:00:00Z"
```

**linked\_objects** `object`

An object containing metadata about linked conversations and linked tickets

```json CEL theme={null}
$result_object_key.linked_objects
```

```json Example theme={null}
{
"data": [
{
"id": "372",
"type": "conversation"
}
],
"has_more": false,
"total_count": 2
}
```

**linked\_objects.data** `[]object`

Array of linked objects

```json CEL theme={null}
$result_object_key.linked_objects.data
```

```json Example theme={null}
[
{
"id": "372",
"type": "conversation"
}
]
```

**linked\_objects.data.map(x, x.type)** `[]string` *required*

Mapped array of: Type of the linked object

```json CEL theme={null}
$result_object_key.linked_objects.data.map(x, x.type)
```

```json Example theme={null}
[
"conversation"
]
```

**linked\_objects.data.map(x, x.id)** `[]string` *required*

Mapped array of: Id of the linked object

```json CEL theme={null}
$result_object_key.linked_objects.data.map(x, x.id)
```

```json Example theme={null}
[
"372"
]
```

**linked\_objects.total\_count** `int64`

Total count of linked objects

```json CEL theme={null}
$result_object_key.linked_objects.total_count
```

```json Example theme={null}
2
```

**linked\_objects.has\_more** `bool`

Whether there are more linked objects

```json CEL theme={null}
$result_object_key.linked_objects.has_more
```

```json Example theme={null}
false
```

**ticket\_parts** `object`

A list of Ticket Part objects for each note and event in the ticket

```json CEL theme={null}
$result_object_key.ticket_parts
```

```json Example theme={null}
{
"ticket_parts": [
{
"body": "This ticket was created by a customer.",
"created_at": "2024-01-15T10:30:00Z",
"id": "3baf5d69",
"part_type": "note",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total_count": 1
}
```

**ticket\_parts.ticket\_parts** `[]object`

A list of Ticket Part objects

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts
```

```json Example theme={null}
[
{
"body": "This ticket was created by a customer.",
"created_at": "2024-01-15T10:30:00Z",
"id": "3baf5d69",
"part_type": "note",
"updated_at": "2024-01-15T10:30:00Z"
}
]
```

**ticket\_parts.ticket\_parts.map(x, x.id)** `[]string` *required*

Mapped array of: The id representing the ticket part

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts.map(x, x.id)
```

```json Example theme={null}
[
"3baf5d69"
]
```

**ticket\_parts.ticket\_parts.map(x, x.part\_type)** `[]string` *required*

Mapped array of: The type of ticket part

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts.map(x, x.part_type)
```

```json Example theme={null}
[
"note"
]
```

**ticket\_parts.ticket\_parts.map(x, x.body)** `[]string` *required*

Mapped array of: The message body, which may contain HTML

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts.map(x, x.body)
```

```json Example theme={null}
[
"This ticket was created by a customer."
]
```

**ticket\_parts.ticket\_parts.map(x, x.created\_at)** `[]timing.v1.Timestamp` *required*

Mapped array of: The time the ticket part was created

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts.map(x, x.created_at)
```

```json Example theme={null}
[
"2024-01-15T10:30:00Z"
]
```

**ticket\_parts.ticket\_parts.map(x, x.updated\_at)** `[]timing.v1.Timestamp` *required*

Mapped array of: The last time the ticket part was updated

```json CEL theme={null}
$result_object_key.ticket_parts.ticket_parts.map(x, x.updated_at)
```

```json Example theme={null}
[
"2024-01-15T10:30:00Z"
]
```

**ticket\_parts.total\_count** `int64`

Total count of ticket parts

```json CEL theme={null}
$result_object_key.ticket_parts.total_count
```

```json Example theme={null}
1
```

**is\_shared** `bool` *required*

Whether or not the ticket is shared with the customer

```json CEL theme={null}
$result_object_key.is_shared
```

```json Example theme={null}
false
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.