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

# Pipedrive: Add Deal

> Create a deal in Pipedrive with a title, value, owner, person, organization and pipeline stage. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Create a deal in Pipedrive with a title, value, owner, person, organization and pipeline stage.

> [!NOTE]
>
> Tool ID: `pipedrive_add_deal`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'pipedrive_add_deal',
  {
    "title": "VP of Engineering"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute pipedrive_add_deal --input '{
  "title": "VP of Engineering"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "success": true,
    "data": {
      "id": 123,
      "title": "VP of Engineering",
      "owner_id": 123
    }
  }
}
```

Use `deepline describe pipedrive_add_deal --json` for the latest machine-readable contract.

## Input reference

Adds a new deal.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.title` | `string` | Yes | — | The title of the deal |
| `payload.owner_id` | `integer` | No | — | The ID of the user who owns the deal |
| `payload.person_id` | `integer` | No | — | The ID of the person linked to the deal |
| `payload.org_id` | `integer` | No | — | The ID of the organization linked to the deal |
| `payload.pipeline_id` | `integer` | No | — | The ID of the pipeline associated with the deal |
| `payload.stage_id` | `integer` | No | — | The ID of the deal stage |
| `payload.value` | `number` | No | — | The value of the deal |
| `payload.currency` | `string` | No | — | The currency associated with the deal |
| `payload.is_deleted` | `boolean` | No | — | Whether the deal is deleted or not |
| `payload.is_archived` | `boolean` | No | — | Whether the deal is archived or not |
| `payload.archive_time` | `string` | No | — | The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time. |
| `payload.status` | `string` | No | — | The status of the deal |
| `payload.probability` | `number` | No | — | The success probability percentage of the deal |
| `payload.lost_reason` | `string` | No | — | The reason for losing the deal. Can only be set if deal status is lost. |
| `payload.visible_to` | `integer` | No | — | The visibility of the deal |
| `payload.close_time` | `string` | No | — | The date and time of closing the deal. Can only be set if deal status is won or lost. |
| `payload.won_time` | `string` | No | — | The date and time of changing the deal status as won. Can only be set if deal status is won. |
| `payload.lost_time` | `string` | No | — | The date and time of changing the deal status as lost. Can only be set if deal status is lost. |
| `payload.expected_close_date` | `string` | No | — | The expected close date of the deal Format: `date`. |
| `payload.label_ids` | `array` | No | — | The IDs of labels assigned to the deal |
| `payload.custom_fields` | `object` | No | — | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Adds a new deal.",
    "properties": {
      "title": {
        "type": "string",
        "description": "The title of the deal"
      },
      "owner_id": {
        "type": "integer",
        "description": "The ID of the user who owns the deal"
      },
      "person_id": {
        "type": "integer",
        "description": "The ID of the person linked to the deal"
      },
      "org_id": {
        "type": "integer",
        "description": "The ID of the organization linked to the deal"
      },
      "pipeline_id": {
        "type": "integer",
        "description": "The ID of the pipeline associated with the deal"
      },
      "stage_id": {
        "type": "integer",
        "description": "The ID of the deal stage"
      },
      "value": {
        "type": "number",
        "description": "The value of the deal"
      },
      "currency": {
        "type": "string",
        "description": "The currency associated with the deal"
      },
      "is_deleted": {
        "type": "boolean",
        "description": "Whether the deal is deleted or not"
      },
      "is_archived": {
        "type": "boolean",
        "description": "Whether the deal is archived or not"
      },
      "archive_time": {
        "type": "string",
        "description": "The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time."
      },
      "status": {
        "type": "string",
        "description": "The status of the deal"
      },
      "probability": {
        "type": [
          "number",
          "null"
        ],
        "description": "The success probability percentage of the deal"
      },
      "lost_reason": {
        "type": [
          "string",
          "null"
        ],
        "description": "The reason for losing the deal. Can only be set if deal status is lost."
      },
      "visible_to": {
        "type": "integer",
        "description": "The visibility of the deal"
      },
      "close_time": {
        "type": [
          "string",
          "null"
        ],
        "description": "The date and time of closing the deal. Can only be set if deal status is won or lost."
      },
      "won_time": {
        "type": "string",
        "description": "The date and time of changing the deal status as won. Can only be set if deal status is won."
      },
      "lost_time": {
        "type": "string",
        "description": "The date and time of changing the deal status as lost. Can only be set if deal status is lost."
      },
      "expected_close_date": {
        "type": "string",
        "description": "The expected close date of the deal",
        "format": "date"
      },
      "label_ids": {
        "type": "array",
        "description": "The IDs of labels assigned to the deal",
        "items": {
          "type": "integer"
        }
      },
      "custom_fields": {
        "type": "object",
        "description": "An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error.",
        "additionalProperties": true
      }
    },
    "required": [
      "title"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.success` | `boolean` | No | — | If the response is successful or not |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.id` | `integer` | No | — | The ID of the deal |
| `result.data.data.title` | `string` | No | — | The title of the deal |
| `result.data.data.owner_id` | `integer` | No | — | The ID of the user who owns the deal |
| `result.data.data.person_id` | `integer` | No | — | The ID of the person linked to the deal |
| `result.data.data.org_id` | `integer` | No | — | The ID of the organization linked to the deal |
| `result.data.data.pipeline_id` | `integer` | No | — | The ID of the pipeline associated with the deal |
| `result.data.data.stage_id` | `integer` | No | — | The ID of the deal stage |
| `result.data.data.value` | `number` | No | — | The value of the deal |
| `result.data.data.currency` | `string` | No | — | The currency associated with the deal |
| `result.data.data.add_time` | `string` | No | — | The creation date and time of the deal |
| `result.data.data.update_time` | `string` | No | — | The last updated date and time of the deal |
| `result.data.data.stage_change_time` | `string` | No | — | The last updated date and time of the deal stage |
| `result.data.data.is_deleted` | `boolean` | No | — | Whether the deal is deleted or not |
| `result.data.data.is_archived` | `boolean` | No | — | Whether the deal is archived or not |
| `result.data.data.status` | `string` | No | — | The status of the deal |
| `result.data.data.probability` | `number \| null` | No | — | The success probability percentage of the deal |
| `result.data.data.lost_reason` | `string \| null` | No | — | The reason for losing the deal |
| `result.data.data.visible_to` | `integer` | No | — | The visibility of the deal |
| `result.data.data.close_time` | `string \| null` | No | — | The date and time of closing the deal |
| `result.data.data.won_time` | `string` | No | — | The date and time of changing the deal status as won |
| `result.data.data.lost_time` | `string` | No | — | The date and time of changing the deal status as lost |
| `result.data.data.expected_close_date` | `string` | No | — | The expected close date of the deal Format: `date`. |
| `result.data.data.label_ids` | `array` | No | — | The IDs of labels assigned to the deal |
| `result.data.data.origin` | `string` | No | — | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. |
| `result.data.data.origin_id` | `string \| null` | No | — | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. |
| `result.data.data.channel` | `integer \| null` | No | — | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings . |
| `result.data.data.channel_id` | `string \| null` | No | — | The optional ID to further distinguish the Marketing channel. |
| `result.data.data.source_lead_id` | `string \| null` | No | — | The ID of the lead if the deal was converted from a lead. Only included when requested via include\_fields parameter. Format: `uuid`. |
| `result.data.data.arr` | `number \| null` | No | — | Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal |
| `result.data.data.mrr` | `number \| null` | No | — | Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal |
| `result.data.data.acv` | `number \| null` | No | — | Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal |
| `result.data.data.custom_fields` | `record` | No | — | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "If the response is successful or not"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "title": {
                "type": "string",
                "description": "The title of the deal"
              },
              "owner_id": {
                "type": "integer",
                "description": "The ID of the user who owns the deal"
              },
              "person_id": {
                "type": "integer",
                "description": "The ID of the person linked to the deal"
              },
              "org_id": {
                "type": "integer",
                "description": "The ID of the organization linked to the deal"
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline associated with the deal"
              },
              "stage_id": {
                "type": "integer",
                "description": "The ID of the deal stage"
              },
              "value": {
                "type": "number",
                "description": "The value of the deal"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal"
              },
              "add_time": {
                "type": "string",
                "description": "The creation date and time of the deal"
              },
              "update_time": {
                "type": "string",
                "description": "The last updated date and time of the deal"
              },
              "stage_change_time": {
                "type": "string",
                "description": "The last updated date and time of the deal stage"
              },
              "is_deleted": {
                "type": "boolean",
                "description": "Whether the deal is deleted or not"
              },
              "is_archived": {
                "type": "boolean",
                "description": "Whether the deal is archived or not"
              },
              "status": {
                "type": "string",
                "description": "The status of the deal"
              },
              "probability": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The success probability percentage of the deal"
              },
              "lost_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The reason for losing the deal"
              },
              "visible_to": {
                "type": "integer",
                "description": "The visibility of the deal"
              },
              "close_time": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The date and time of closing the deal"
              },
              "won_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as won"
              },
              "lost_time": {
                "type": "string",
                "description": "The date and time of changing the deal status as lost"
              },
              "expected_close_date": {
                "type": "string",
                "description": "The expected close date of the deal",
                "format": "date"
              },
              "label_ids": {
                "type": "array",
                "description": "The IDs of labels assigned to the deal",
                "items": {
                  "type": "integer"
                }
              },
              "origin": {
                "type": "string",
                "description": "The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed."
              },
              "origin_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal."
              },
              "channel": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings ."
              },
              "channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The optional ID to further distinguish the Marketing channel."
              },
              "source_lead_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The ID of the lead if the deal was converted from a lead. Only included when requested via include_fields parameter.",
                "format": "uuid"
              },
              "arr": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal"
              },
              "mrr": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal"
              },
              "acv": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal"
              },
              "custom_fields": {
                "type": "object",
                "description": "An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error.",
                "additionalProperties": true
              }
            },
            "additionalProperties": false
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Pipedrive provider guide](https://deepline.com/docs/providers/pipedrive/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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