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

> Get a Pipedrive deal by its ID, with its custom fields and labels. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Get a Pipedrive deal by its ID, with its custom fields and labels.

> [!NOTE]
>
> Tool ID: `pipedrive_get_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_get_deal',
  {
    "id": 123
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute pipedrive_get_deal --input '{
  "id": 123
}' --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_get_deal --json` for the latest machine-readable contract.

## Input reference

Returns the details of a specific deal.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.id` | `integer` | Yes | — | The ID of the deal |
| `payload.include_fields` | `"next_activity_id" \| "last_activity_id" \| "first_won_time" \| "products_count" \| "files_count" \| "notes_count" \| "followers_count" \| "email_messages_count" \| "activities_count" \| "done_activities_count" \| "undone_activities_count" \| "participants_count" \| "last_incoming_mail_time" \| "last_outgoing_mail_time" \| "smart_bcc_email" \| "source_lead_id"` | No | — | Optional comma separated string array of additional fields to include Allowed: `next_activity_id`, `last_activity_id`, `first_won_time`, `products_count`, `files_count`, `notes_count`, `followers_count`, `email_messages_count`, `activities_count`, `done_activities_count`, `undone_activities_count`, `participants_count`, `last_incoming_mail_time`, `last_outgoing_mail_time`, `smart_bcc_email`, `source_lead_id`. |
| `payload.custom_fields` | `string` | No | — | Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response. A maximum of 15 keys is allowed. |
| `payload.include_option_labels` | `boolean` | No | — | When provided with a 'true' value, single option and multiple option custom fields values contain objects in the form of '\{ id: number, label: string }' instead of plain id |
| `payload.include_labels` | `boolean` | No | — | When provided with 'true' value, response will include an array of label objects in the form of '\{ id: number, label: string }' |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns the details of a specific deal.",
    "properties": {
      "id": {
        "type": "integer",
        "description": "The ID of the deal"
      },
      "include_fields": {
        "type": "string",
        "description": "Optional comma separated string array of additional fields to include",
        "enum": [
          "next_activity_id",
          "last_activity_id",
          "first_won_time",
          "products_count",
          "files_count",
          "notes_count",
          "followers_count",
          "email_messages_count",
          "activities_count",
          "done_activities_count",
          "undone_activities_count",
          "participants_count",
          "last_incoming_mail_time",
          "last_outgoing_mail_time",
          "smart_bcc_email",
          "source_lead_id"
        ]
      },
      "custom_fields": {
        "type": "string",
        "description": "Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response. A maximum of 15 keys is allowed."
      },
      "include_option_labels": {
        "type": "boolean",
        "description": "When provided with a 'true' value, single option and multiple option custom fields values contain objects in the form of '{ id: number, label: string }' instead of plain id"
      },
      "include_labels": {
        "type": "boolean",
        "description": "When provided with 'true' value, response will include an array of label objects in the form of '{ id: number, label: string }'"
      }
    },
    "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={"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.