> ## 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: Update Deal

> Update a deal. Pipedrive Update Deal reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Update a deal.

<Info>
  Tool ID: `pipedrive_update_deal`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'pipedrive_update_deal',
  {
    "id": 123
  },
);

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

### CLI

```bash theme={null}
deepline tools execute pipedrive_update_deal --input '{
  "id": 123
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "success": true,
    "data": {
      "id": 123,
      "title": "VP of Engineering",
      "owner_id": 123
    }
  }
}
```

Use `deepline tools get pipedrive_update_deal --json` for the latest machine-readable contract.

## Input reference

Updates the properties of a deal.

| Name                          | Type      | Required | Default | Details                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.id`                  | `integer` | Yes      | —       | The ID of the deal                                                                                                                                                                                                                                                                                                                                   |
| `payload.title`               | `string`  | No       | —       | 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={null}
  {
    "type": "object",
    "description": "Updates the properties of a deal.",
    "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"
      },
      "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": [
      "id"
    ],
    "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={null}
  {
    "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](/docs/providers/pipedrive/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
