# CreateDeal

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.CreateDeal>

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

| Name                | Description                                                                                                                                                                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DealData : `String` | <p>Deal properties such as amount, dealname, dealstage, pipeline.</p><p><br>Default: <code>-</code><br>Example: <code>{ "amount": "5000", "dealname": "Enterprise Deal", "dealstage": "presentation scheduled", "pipeline": "default" }</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>Optional. Contact Id to associate the deal with.</p><p><br>Default: <code>-</code><br>Example: <code>1234567890</code></p>        |
| ThrowErrorOnFailure : `Boolean`   | <p>Whether to throw an error on failure. True by default.</p><p><br>Default: <code>True</code><br>Example: <code>false</code></p>    |
| ErrorMessageOnFailure : `String`  | <p>Overrides the error message on failure.</p><p><br>Default: <code>-</code><br>Example: <code>Failed to create the deal.</code></p> |
| {% endtab %}                      |                                                                                                                                      |

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

| Name                | Description                                                                                                                                         |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean` | <p>Indicates whether deal creation was successful.<br>Example: <code>true</code></p>                                                                |
| Id : `String`       | <p>Unique Id of the created deal.<br>Example: <code>1234567890</code></p>                                                                           |
| Error : `Error`     | <p>Error that occurred during task execution.<br>Example: <code>object { string Message, object { Exception Exception } AdditionalInfo }</code></p> |
| {% endtab %}        |                                                                                                                                                     |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2025-12-17

#### Fixed

* Fixed a bug with the display format

### \[1.0.0] - 2025-08-08

#### Added

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