# Create deal

> Creates a HubSpot deal for the lead in a pipeline and stage, owned by the rep the flow assigned.

| | |
|---|---|
| Type | `createDeal` |
| Group | HubSpot |

## Exits

| Exit | Name |
|---|---|
| `next` | Next |

## Settings

| Key | Label | Takes | Default | Notes |
|---|---|---|---|---|
| `pipelineId` | Pipeline | A string: a HubSpot pipeline's id, from list_hubspot with what = pipelines. |  |  |
| `stageId` | Stage | A string: the id of a stage of the chosen pipeline, from list_hubspot with what = pipelines. |  |  |
| `name` | Deal name | A string. | `&#123;&#123;sopro.name}} inbound` | Blank: the company's name and "inbound". May hold fields in braces. |
| `owner` | Owner | A string. |  | Blank: the rep the flow assigned. Or a HubSpot owner ID, or a field in &#123;&#123;braces}}. May hold fields in braces. |
| `properties` | Other properties | An array of objects, each {"property": a HubSpot property's name, "value": a string}. Property names come from list_hubspot with what = properties. |  | A value may hold a field in &#123;&#123;braces}}. May hold fields in braces. |

## Fields it adds

| Field | What |
|---|---|
| `hs.deal.id` | The deal's ID |

## In a flow document

```json
{
  "id": "createDeal1",
  "type": "createDeal",
  "settings": {
    "name": "{{sopro.name}} inbound"
  }
}
```
