> ## 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 Product

> Update the product attached to a deal. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Update the product attached to a deal.

<Info>
  Tool ID: `pipedrive_update_deal_product`
</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_product',
  {
    "id": 123,
    "product_attachment_id": 123
  },
);

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

### CLI

```bash theme={null}
deepline tools execute pipedrive_update_deal_product --input '{
  "id": 123,
  "product_attachment_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,
      "sum": 123,
      "tax": 123
    }
  }
}
```

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

## Input reference

Updates the details of the product that has been attached to a deal.

| Name                               | Type                                                                                  | Required | Default        | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------------- | ------------------------------------------------------------------------------------- | -------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.id`                       | `integer`                                                                             | Yes      | —              | The ID of the deal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `payload.product_attachment_id`    | `integer`                                                                             | Yes      | —              | The ID of the deal-product (the ID of the product attached to the deal)                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `payload.product_id`               | `integer`                                                                             | No       | —              | The ID of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `payload.item_price`               | `number`                                                                              | No       | —              | The price value of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `payload.quantity`                 | `number`                                                                              | No       | —              | The quantity of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `payload.tax`                      | `number`                                                                              | No       | `0`            | The product tax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `payload.comments`                 | `string`                                                                              | No       | —              | The comments of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `payload.discount`                 | `number`                                                                              | No       | `0`            | The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage                                                                                                                                                                                                                                                                                                                                                                             |
| `payload.is_enabled`               | `boolean`                                                                             | No       | `true`         | Whether this product is enabled for the deal Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring                                                                                                                                                                                                                               |
| `payload.tax_method`               | `"exclusive" \| "inclusive" \| "none"`                                                | No       | —              | The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal Allowed: `exclusive`, `inclusive`, `none`. |
| `payload.discount_type`            | `"percentage" \| "amount"`                                                            | No       | `"percentage"` | The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage Allowed: `percentage`, `amount`.                                                                                                                                                                                                                                                                                                                                            |
| `payload.product_variation_id`     | `integer`                                                                             | No       | —              | The ID of the product variation                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `payload.billing_frequency`        | `"one-time" \| "annually" \| "semi-annually" \| "quarterly" \| "monthly" \| "weekly"` | No       | —              | Only available in Growth and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time` Allowed: `one-time`, `annually`, `semi-annually`, `quarterly`, `monthly`, `weekly`.                                                                                                      |
| `payload.billing_frequency_cycles` | `integer`                                                                             | No       | —              | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208                                                                                  |
| `payload.billing_start_date`       | `string`                                                                              | No       | —              | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future Format: `date`.                                                                                                                                                                                                                                                                                                                                                       |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Updates the details of the product that has been attached to a deal.",
    "properties": {
      "id": {
        "type": "integer",
        "description": "The ID of the deal"
      },
      "product_attachment_id": {
        "type": "integer",
        "description": "The ID of the deal-product (the ID of the product attached to the deal)"
      },
      "product_id": {
        "type": "integer",
        "description": "The ID of the product"
      },
      "item_price": {
        "type": "number",
        "description": "The price value of the product"
      },
      "quantity": {
        "type": "number",
        "description": "The quantity of the product"
      },
      "tax": {
        "type": "number",
        "description": "The product tax",
        "default": 0
      },
      "comments": {
        "type": "string",
        "description": "The comments of the product"
      },
      "discount": {
        "type": "number",
        "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage",
        "default": 0
      },
      "is_enabled": {
        "type": "boolean",
        "description": "Whether this product is enabled for the deal Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring",
        "default": true
      },
      "tax_method": {
        "type": "string",
        "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal",
        "enum": [
          "exclusive",
          "inclusive",
          "none"
        ]
      },
      "discount_type": {
        "type": "string",
        "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage",
        "default": "percentage",
        "enum": [
          "percentage",
          "amount"
        ]
      },
      "product_variation_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "The ID of the product variation"
      },
      "billing_frequency": {
        "type": "string",
        "description": "Only available in Growth and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time`",
        "enum": [
          "one-time",
          "annually",
          "semi-annually",
          "quarterly",
          "monthly",
          "weekly"
        ]
      },
      "billing_frequency_cycles": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208"
      },
      "billing_start_date": {
        "type": [
          "string",
          "null"
        ],
        "description": "Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future",
        "format": "date"
      }
    },
    "required": [
      "id",
      "product_attachment_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-product (the ID of the product attached to the deal)                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `result.data.data.sum`                      | `number`                                                                              | No       | —              | The sum of all the products attached to the deal                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `result.data.data.tax`                      | `number`                                                                              | No       | —              | The product tax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `result.data.data.deal_id`                  | `integer`                                                                             | No       | —              | The ID of the deal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `result.data.data.name`                     | `string`                                                                              | No       | —              | The product name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `result.data.data.product_id`               | `integer`                                                                             | No       | —              | The ID of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `result.data.data.product_variation_id`     | `integer \| null`                                                                     | No       | —              | The ID of the product variation                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `result.data.data.order_nr`                 | `integer \| null`                                                                     | No       | —              | The order number of the product within the deal                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `result.data.data.add_time`                 | `string`                                                                              | No       | —              | The date and time when the product was added to the deal                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `result.data.data.update_time`              | `string`                                                                              | No       | —              | The date and time when the deal product was last updated                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `result.data.data.comments`                 | `string`                                                                              | No       | —              | The comments of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `result.data.data.currency`                 | `string`                                                                              | No       | —              | The currency associated with the deal product                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `result.data.data.discount`                 | `number`                                                                              | No       | `0`            | The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage                                                                                                                                                                                                                                                                                                                                                                             |
| `result.data.data.discount_type`            | `"percentage" \| "amount"`                                                            | No       | `"percentage"` | The type of the discount's value Allowed: `percentage`, `amount`.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `result.data.data.quantity`                 | `number`                                                                              | No       | —              | The quantity of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `result.data.data.item_price`               | `number`                                                                              | No       | —              | The price value of the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `result.data.data.tax_method`               | `"exclusive" \| "inclusive" \| "none"`                                                | No       | —              | The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal Allowed: `exclusive`, `inclusive`, `none`. |
| `result.data.data.is_enabled`               | `boolean`                                                                             | No       | `true`         | Whether this product is enabled for the deal                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `result.data.data.billing_frequency`        | `"one-time" \| "annually" \| "semi-annually" \| "quarterly" \| "monthly" \| "weekly"` | No       | `"one-time"`   | Only available in Growth and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time` Allowed: `one-time`, `annually`, `semi-annually`, `quarterly`, `monthly`, `weekly`.                                                                                                      |
| `result.data.data.billing_frequency_cycles` | `integer \| null`                                                                     | No       | `null`         | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208                                                                                  |
| `result.data.data.billing_start_date`       | `string \| null`                                                                      | No       | `null`         | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future Format: `date`.                                                                                                                                                                                                                                                                                                                                                       |
| `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-product (the ID of the product attached to the deal)"
              },
              "sum": {
                "type": "number",
                "description": "The sum of all the products attached to the deal"
              },
              "tax": {
                "type": "number",
                "description": "The product tax"
              },
              "deal_id": {
                "type": "integer",
                "description": "The ID of the deal"
              },
              "name": {
                "type": "string",
                "description": "The product name"
              },
              "product_id": {
                "type": "integer",
                "description": "The ID of the product"
              },
              "product_variation_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The ID of the product variation"
              },
              "order_nr": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The order number of the product within the deal"
              },
              "add_time": {
                "type": "string",
                "description": "The date and time when the product was added to the deal"
              },
              "update_time": {
                "type": "string",
                "description": "The date and time when the deal product was last updated"
              },
              "comments": {
                "type": "string",
                "description": "The comments of the product"
              },
              "currency": {
                "type": "string",
                "description": "The currency associated with the deal product"
              },
              "discount": {
                "type": "number",
                "description": "The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage",
                "default": 0
              },
              "discount_type": {
                "type": "string",
                "description": "The type of the discount's value",
                "default": "percentage",
                "enum": [
                  "percentage",
                  "amount"
                ]
              },
              "quantity": {
                "type": "number",
                "description": "The quantity of the product"
              },
              "item_price": {
                "type": "number",
                "description": "The price value of the product"
              },
              "tax_method": {
                "type": "string",
                "description": "The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal",
                "enum": [
                  "exclusive",
                  "inclusive",
                  "none"
                ]
              },
              "is_enabled": {
                "type": "boolean",
                "description": "Whether this product is enabled for the deal",
                "default": true
              },
              "billing_frequency": {
                "type": "string",
                "description": "Only available in Growth and above plans How often a customer is billed for access to a service or product To set `billing_frequency` different than `one-time`, the deal must not have installments associated A deal can have up to 20 products attached with `billing_frequency` different than `one-time`",
                "default": "one-time",
                "enum": [
                  "one-time",
                  "annually",
                  "semi-annually",
                  "quarterly",
                  "monthly",
                  "weekly"
                ]
              },
              "billing_frequency_cycles": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208",
                "default": null
              },
              "billing_start_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future",
                "default": null,
                "format": "date"
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "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)
