> ## 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 Hubspot

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

# Parameters

**Action** `Parameters`

**parameters**

**Subject** `string` *required*

This field maps to the destination API `properties.subject` field.

**Content** `string`

This field maps to the destination API `properties.content` field.

**Pipeline** `string (Pipeline)` *required*

This field maps to the destination API `properties.hs_pipeline` field.

**Priority** `string`

This field maps to the destination API `properties.hs_ticket_priority` field.

**Status** `string (Pipeline Status)` *required*

This field maps to the destination API `properties.hs_pipeline_stage` field.

**Hubspot Defined Contact Associations** `[]string` *required*

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

**Hubspot Defined Company Associations** `[]string`

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

**Properties** `Map\<Ticket Property,string\>`

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

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "archived": false,
    "archived_at": "2024-07-04T10:32:12+00:00",
    "associated_companies": [
      {
        "id": "39580875173",
        "type": "contact_to_company"
      }
    ],
    "associated_contact_id": "123456",
    "associated_contacts": [
      {
        "id": "39580875173",
        "type": "contact_to_company"
      }
    ],
    "associated_deals": [
      {
        "id": "39580875173",
        "type": "contact_to_company"
      }
    ],
    "created_at": "2024-07-04T10:32:12+00:00",
    "id": "2970281109",
    "pipeline_id": "123456",
    "properties": {
      "content": "Ticket description",
      "createdate": "2024-07-16T10:41:02.266Z",
      "hs_lastmodifieddate": "2024-07-16T14:27:29.505Z",
      "hs_object_id": "2970281109",
      "hs_pipeline": "0",
      "hs_pipeline_stage": "1",
      "subject": "My Subject"
    },
    "recently_updated_property_names": [
      "subject",
      "hs_pipeline_stage"
    ],
    "updated_at": "2024-07-04T10:32:12+00:00"
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "archived": "Whether the ticket was archived",
    "archived_at": "When the ticket was archived",
    "associated_companies": {
      "id": "ID",
      "type": "Type (label) of the association"
    },
    "associated_contact_id": "The ID of the associated contact, or the first associated contact if there are multiple",
    "associated_contacts": {
      "id": "ID",
      "type": "Type (label) of the association"
    },
    "associated_deals": {
      "id": "ID",
      "type": "Type (label) of the association"
    },
    "created_at": "When the ticket was created",
    "id": "ID",
    "pipeline_id": "The ID of the pipeline the ticket is associated with",
    "properties": {
      "key": null,
      "value": null
    },
    "recently_updated_property_names": "The properties that were updated for a webhook event triggering this event payload to be created",
    "updated_at": "When 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*

`ID` ID

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

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

**properties** `Map\<string,string\>` *required*

`HI` `ID` `PII` Ticket properties

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

```json Example theme={null}
{
"content": "Ticket description",
"createdate": "2024-07-16T10:41:02.266Z",
"hs_lastmodifieddate": "2024-07-16T14:27:29.505Z",
"hs_object_id": "2970281109",
"hs_pipeline": "0",
"hs_pipeline_stage": "1",
"subject": "My Subject"
}
```

**archived** `bool` *required*

Whether the ticket was archived

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

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

**archived\_at** `timing.v1.Timestamp`

When the ticket was archived

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

```json Example theme={null}
"2024-07-04T10:32:12+00:00"
```

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

When the ticket was created

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

```json Example theme={null}
"2024-07-04T10:32:12+00:00"
```

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

When the ticket was updated

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

```json Example theme={null}
"2024-07-04T10:32:12+00:00"
```

**recently\_updated\_property\_names** `[]string` *required*

The properties that were updated for a webhook event triggering this event payload to be created

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

```json Example theme={null}
[
"subject",
"hs_pipeline_stage"
]
```

**pipeline\_id** `string` *required*

The ID of the pipeline the ticket is associated with

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

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

**associated\_contact\_id** `string`

The ID of the associated contact, or the first associated contact if there are multiple

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

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

**associated\_contacts** `[]object` *required*

Associated contacts

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

```json Example theme={null}
[
{
"id": "39580875173",
"type": "contact_to_company"
}
]
```

**associated\_contacts.map(x, x.id)** `[]string` *required*

Mapped array of: ID

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

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

**associated\_contacts.map(x, x.type)** `[]string` *required*

Mapped array of: Type (label) of the association

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

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

**associated\_deals** `[]object` *required*

Associated deals

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

```json Example theme={null}
[
{
"id": "39580875173",
"type": "contact_to_company"
}
]
```

**associated\_deals.map(x, x.id)** `[]string` *required*

Mapped array of: ID

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

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

**associated\_deals.map(x, x.type)** `[]string` *required*

Mapped array of: Type (label) of the association

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

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

**associated\_companies** `[]object` *required*

Associated companies

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

```json Example theme={null}
[
{
"id": "39580875173",
"type": "contact_to_company"
}
]
```

**associated\_companies.map(x, x.id)** `[]string` *required*

Mapped array of: ID

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

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

**associated\_companies.map(x, x.type)** `[]string` *required*

Mapped array of: Type (label) of the association

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

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


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