# CreateTicket

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

Source code: <https://github.com/FrendsPlatform/Frends.HubSpot/tree/main/Frends.HubSpot.CreateTicket>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                  | Description                                                                                                                                                                                                                                                                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| TicketData : `String` | <p>Ticket properties such as subject, content, hs\_pipeline, hs\_pipeline\_stage, hs\_ticket\_priority.</p><p><br>Default: <code>-</code><br>Example: <code>{ "subject": "Login issue", "content": "User cannot log in after password reset", "hs\_pipeline": "0", "hs\_pipeline\_stage": "1", "hs\_ticket\_priority": "HIGH" }</code></p> |
| {% endtab %}          |                                                                                                                                                                                                                                                                                                                                            |

{% tab title="Parameter: Connection" %}

| Name                | Description                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| 🗝ApiKey : `String` | <p>HubSpot Private App access token.</p><p><br>Default: <code>-</code><br>Example: <code>xxx-xxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</code></p> |
| BaseUrl : `String`  | <p>Base Url for the Api.</p><p><br>Default: <code>-</code><br>Example: <code><https://api.hubapi.com></code></p>                                 |
| {% endtab %}        |                                                                                                                                                  |

{% tab title="Parameter: Options" %}

| Name                              | Description                                                                                                                                         |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| AssociateWithContactId : `String` | <p>Associate the ticket with a HubSpot contact by providing the contact ID.</p><p><br>Default: <code>-</code><br>Example: <code>12345678</code></p> |
| AssociateWithDealId : `String`    | <p>Associate the ticket with a HubSpot deal by providing the deal ID.</p><p><br>Default: <code>-</code><br>Example: <code>98765432</code></p>       |
| AssociateWithCompanyId : `String` | <p>Associate the ticket with a HubSpot company by providing the company ID.</p><p><br>Default: <code>-</code><br>Example: <code>11223344</code></p> |
| ThrowErrorOnFailure : `Boolean`   | <p>Whether to throw an error on failure.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                     |
| ErrorMessageOnFailure : `String`  | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Custom error message</code></p>                      |
| {% endtab %}                      |                                                                                                                                                     |

{% tab title="Result: Result" %}

| Name                | Description                                                                                                                    |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Success : `Boolean` | <p>Indicates if the task completed successfully.<br>Example: <code>true</code></p>                                             |
| Id : `String`       | <p>The ID of the created ticket returned by HubSpot.<br>Example: <code>123</code></p>                                          |
| Error : `Error`     | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, Exception AdditionalInfo }</code></p> |
| {% endtab %}        |                                                                                                                                |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2026-03-19

#### Added

* Initial implementation
  {% endtab %}
  {% endtabs %}
