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

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

Update one deal field.

<Info>
  Tool ID: `pipedrive_update_deal_field`
</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_field',
  {
    "field_code": "example"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute pipedrive_update_deal_field --input '{
  "field_code": "example"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "success": true,
    "data": {
      "field_name": "Example",
      "field_code": "example",
      "field_type": "int",
      "is_custom_field": true,
      "is_optional_response_field": true
    }
  }
}
```

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

## Input reference

Updates a deal custom field. The field\_code and field\_type cannot be changed. At least one field must be provided in the request body.

| Name                       | Type     | Required | Default | Details                                                                                                        |
| -------------------------- | -------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| `payload.field_code`       | `string` | Yes      | —       | The unique code identifying the field                                                                          |
| `payload.field_name`       | `string` | No       | —       | Field name Minimum length: 1. Maximum length: 255.                                                             |
| `payload.ui_visibility`    | `object` | No       | —       | UI visibility settings for the field. Controls where the field appears in the Pipedrive web UI.                |
| `payload.important_fields` | `object` | No       | —       | Configuration for highlighting the field at specific stages.                                                   |
| `payload.required_fields`  | `object` | No       | —       | Required fields configuration for marking the field as mandatory when interacted with in the Pipedrive web UI. |
| `payload.description`      | `string` | No       | —       | Field description                                                                                              |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Updates a deal custom field. The field_code and field_type cannot be changed. At least one field must be provided in the request body.",
    "properties": {
      "field_code": {
        "type": "string",
        "description": "The unique code identifying the field"
      },
      "field_name": {
        "type": "string",
        "description": "Field name",
        "minLength": 1,
        "maxLength": 255
      },
      "ui_visibility": {
        "type": "object",
        "description": "UI visibility settings for the field. Controls where the field appears in the Pipedrive web UI.",
        "properties": {
          "add_visible_flag": {
            "type": "boolean",
            "description": "Whether the field is shown in the add deal modal. Default is false. Cannot be set to false for required system fields (title, pipeline, stage_id, probability).",
            "default": false
          },
          "details_visible_flag": {
            "type": "boolean",
            "description": "Whether the field is shown in the deal details view. Default is true.",
            "default": true
          },
          "projects_detail_visible_flag": {
            "type": "boolean",
            "description": "Whether the field is shown in the project details view when the deal is linked to a project. Default is false.",
            "default": false
          },
          "show_in_pipelines": {
            "type": "object",
            "description": "Controls which pipelines display this field. Default is show_in_all=true. Note that fields marked as important or required must be visible in the pipelines where they are configured.",
            "properties": {
              "show_in_all": {
                "type": "boolean",
                "description": "When true, the field is visible in all pipelines. When false, visibility is controlled by pipeline_ids. Default is true.",
                "default": true
              },
              "pipeline_ids": {
                "type": "array",
                "description": "Array of pipeline IDs where the field should be visible. Only used when show_in_all is false. Must reference valid, active pipelines.",
                "items": {
                  "type": "integer"
                }
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": true
      },
      "important_fields": {
        "type": "object",
        "description": "Configuration for highlighting the field at specific stages.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the field is marked as important. When false, the field is not highlighted. When true with empty stage_ids, the field is important everywhere. When true with specific stage_ids, the field is important only at those stages. Default is false.",
            "default": false
          },
          "stage_ids": {
            "type": "array",
            "description": "Array of deal stage IDs where this field should be highlighted as important. Must reference valid, active deal stages. Empty array when enabled is false. The stages must be in pipelines where this field is visible (show_in_pipelines).",
            "default": [],
            "items": {
              "type": "integer"
            }
          }
        },
        "additionalProperties": true
      },
      "required_fields": {
        "type": "object",
        "description": "Required fields configuration for marking the field as mandatory when interacted with in the Pipedrive web UI.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the field is required. When false, the field is optional. When true with empty stage_ids, the field is required everywhere. When true with specific stage_ids, the field is required only at those stages. Default is false.",
            "default": false
          },
          "stage_ids": {
            "type": "array",
            "description": "Array of deal stage IDs where this field is required. Must reference valid, active deal stages. Empty array when enabled is false. The stages must be in pipelines where this field is visible (show_in_pipelines).",
            "default": [],
            "items": {
              "type": "integer"
            }
          },
          "statuses": {
            "type": "object",
            "description": "Pipeline-specific status requirements for when deals are won or lost. Keys are pipeline IDs (as strings), values are arrays of status strings ('won', 'lost'). Example - `{\"1\":[\"won\",\"lost\"],\"2\":[\"won\"]}` means the field is required when marking deals as won or lost in pipeline 1, and only when won in pipeline 2. Must reference valid, active pipelines.",
            "default": {},
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "won",
                  "lost"
                ]
              }
            }
          }
        },
        "additionalProperties": true
      },
      "description": {
        "type": [
          "string",
          "null"
        ],
        "description": "Field description"
      }
    },
    "required": [
      "field_code"
    ],
    "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       | —       | Whether the request was successful                                                                                                                                                                                                                                                                                                                                                                            |
| `result.data.data`                                              | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | —                                                                                                                                                                                                                                                                                                                                                                                                             |
| `result.data.data.field_name`                                   | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | —       | The display name/label of the field                                                                                                                                                                                                                                                                                                                                                                           |
| `result.data.data.field_code`                                   | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | —       | The unique identifier for the field (40-character hash for custom fields)                                                                                                                                                                                                                                                                                                                                     |
| `result.data.data.description`                                  | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The description of the field                                                                                                                                                                                                                                                                                                                                                                                  |
| `result.data.data.field_type`                                   | `"int" \| "double" \| "boolean" \| "varchar" \| "text" \| "phone" \| "varchar_options" \| "varchar_auto" \| "date" \| "daterange" \| "time" \| "timerange" \| "enum" \| "set" \| "address" \| "monetary" \| "deal" \| "deals" \| "lead" \| "org" \| "people" \| "project" \| "stage" \| "user" \| "activity" \| "json" \| "picture" \| "status" \| "visible_to" \| "price_list" \| "billing_frequency" \| "projects_board" \| "projects_phase"` | Yes      | —       | The type of the field Allowed: `int`, `double`, `boolean`, `varchar`, `text`, `phone`, `varchar_options`, `varchar_auto`, `date`, `daterange`, `time`, `timerange`, `enum`, `set`, `address`, `monetary`, `deal`, `deals`, `lead`, `org`, `people`, `project`, `stage`, `user`, `activity`, `json`, `picture`, `status`, `visible_to`, `price_list`, `billing_frequency`, `projects_board`, `projects_phase`. |
| `result.data.data.options`                                      | `array \| null`                                                                                                                                                                                                                                                                                                                                                                                                                                 | No       | —       | Array of available options for enum/set fields, null for other field types                                                                                                                                                                                                                                                                                                                                    |
| `result.data.data.options[].id`                                 | `record`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The option ID (integer for custom fields, string for built-in fields)                                                                                                                                                                                                                                                                                                                                         |
| `result.data.data.options[].label`                              | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The option display label                                                                                                                                                                                                                                                                                                                                                                                      |
| `result.data.data.options[].color`                              | `string \| null`                                                                                                                                                                                                                                                                                                                                                                                                                                | No       | —       | Optional color code for the option                                                                                                                                                                                                                                                                                                                                                                            |
| `result.data.data.options[].update_time`                        | `string \| null`                                                                                                                                                                                                                                                                                                                                                                                                                                | No       | —       | When the option was last updated Format: `date-time`.                                                                                                                                                                                                                                                                                                                                                         |
| `result.data.data.options[].add_time`                           | `string \| null`                                                                                                                                                                                                                                                                                                                                                                                                                                | No       | —       | When the option was created Format: `date-time`.                                                                                                                                                                                                                                                                                                                                                              |
| `result.data.data.subfields`                                    | `array \| null`                                                                                                                                                                                                                                                                                                                                                                                                                                 | No       | —       | Array of subfields for complex field types (address, monetary), null for simple field types                                                                                                                                                                                                                                                                                                                   |
| `result.data.data.subfields[].field_code`                       | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The subfield identifier                                                                                                                                                                                                                                                                                                                                                                                       |
| `result.data.data.subfields[].field_name`                       | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The subfield display name                                                                                                                                                                                                                                                                                                                                                                                     |
| `result.data.data.subfields[].field_type`                       | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | The subfield type                                                                                                                                                                                                                                                                                                                                                                                             |
| `result.data.data.is_custom_field`                              | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes      | —       | Whether this is a user-created custom field                                                                                                                                                                                                                                                                                                                                                                   |
| `result.data.data.is_optional_response_field`                   | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes      | —       | Whether this field is not returned by default in entity responses                                                                                                                                                                                                                                                                                                                                             |
| `result.data.data.ui_visibility`                                | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | UI visibility settings (only included when requested via include\_fields parameter)                                                                                                                                                                                                                                                                                                                           |
| `result.data.data.ui_visibility.add_visible_flag`               | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is shown in the add modal                                                                                                                                                                                                                                                                                                                                                                   |
| `result.data.data.ui_visibility.details_visible_flag`           | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is shown in the details view                                                                                                                                                                                                                                                                                                                                                                |
| `result.data.data.ui_visibility.projects_detail_visible_flag`   | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is shown in project details view                                                                                                                                                                                                                                                                                                                                                            |
| `result.data.data.ui_visibility.show_in_pipelines`              | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | Pipeline visibility configuration                                                                                                                                                                                                                                                                                                                                                                             |
| `result.data.data.ui_visibility.show_in_pipelines.show_in_all`  | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is shown in all pipelines                                                                                                                                                                                                                                                                                                                                                                   |
| `result.data.data.ui_visibility.show_in_pipelines.pipeline_ids` | `array`                                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | —       | Specific pipeline IDs where the field is shown (if show\_in\_all is false)                                                                                                                                                                                                                                                                                                                                    |
| `result.data.data.important_fields`                             | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | Important fields configuration                                                                                                                                                                                                                                                                                                                                                                                |
| `result.data.data.important_fields.enabled`                     | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is marked as important                                                                                                                                                                                                                                                                                                                                                                      |
| `result.data.data.important_fields.stage_ids`                   | `array`                                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | —       | Array of stage IDs where the field is important                                                                                                                                                                                                                                                                                                                                                               |
| `result.data.data.required_fields`                              | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | Required fields configuration                                                                                                                                                                                                                                                                                                                                                                                 |
| `result.data.data.required_fields.enabled`                      | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | —       | Whether the field is required                                                                                                                                                                                                                                                                                                                                                                                 |
| `result.data.data.required_fields.stage_ids`                    | `array`                                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | —       | Array of stage IDs where the field is required                                                                                                                                                                                                                                                                                                                                                                |
| `result.data.data.required_fields.statuses`                     | `record`                                                                                                                                                                                                                                                                                                                                                                                                                                        | No       | —       | Pipeline-specific status requirements, mapping pipeline ID to array of statuses                                                                                                                                                                                                                                                                                                                               |
| `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": "Whether the request was successful"
          },
          "data": {
            "type": "object",
            "properties": {
              "field_name": {
                "type": "string",
                "description": "The display name/label of the field"
              },
              "field_code": {
                "type": "string",
                "description": "The unique identifier for the field (40-character hash for custom fields)"
              },
              "description": {
                "type": "string",
                "description": "The description of the field"
              },
              "field_type": {
                "type": "string",
                "description": "The type of the field",
                "enum": [
                  "int",
                  "double",
                  "boolean",
                  "varchar",
                  "text",
                  "phone",
                  "varchar_options",
                  "varchar_auto",
                  "date",
                  "daterange",
                  "time",
                  "timerange",
                  "enum",
                  "set",
                  "address",
                  "monetary",
                  "deal",
                  "deals",
                  "lead",
                  "org",
                  "people",
                  "project",
                  "stage",
                  "user",
                  "activity",
                  "json",
                  "picture",
                  "status",
                  "visible_to",
                  "price_list",
                  "billing_frequency",
                  "projects_board",
                  "projects_phase"
                ]
              },
              "options": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "Array of available options for enum/set fields, null for other field types",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "object",
                      "description": "The option ID (integer for custom fields, string for built-in fields)",
                      "additionalProperties": true
                    },
                    "label": {
                      "type": "string",
                      "description": "The option display label"
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Optional color code for the option"
                    },
                    "update_time": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the option was last updated",
                      "format": "date-time"
                    },
                    "add_time": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the option was created",
                      "format": "date-time"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "subfields": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "Array of subfields for complex field types (address, monetary), null for simple field types",
                "items": {
                  "type": "object",
                  "properties": {
                    "field_code": {
                      "type": "string",
                      "description": "The subfield identifier"
                    },
                    "field_name": {
                      "type": "string",
                      "description": "The subfield display name"
                    },
                    "field_type": {
                      "type": "string",
                      "description": "The subfield type"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "is_custom_field": {
                "type": "boolean",
                "description": "Whether this is a user-created custom field"
              },
              "is_optional_response_field": {
                "type": "boolean",
                "description": "Whether this field is not returned by default in entity responses"
              },
              "ui_visibility": {
                "type": "object",
                "description": "UI visibility settings (only included when requested via include_fields parameter)",
                "properties": {
                  "add_visible_flag": {
                    "type": "boolean",
                    "description": "Whether the field is shown in the add modal"
                  },
                  "details_visible_flag": {
                    "type": "boolean",
                    "description": "Whether the field is shown in the details view"
                  },
                  "projects_detail_visible_flag": {
                    "type": "boolean",
                    "description": "Whether the field is shown in project details view"
                  },
                  "show_in_pipelines": {
                    "type": "object",
                    "description": "Pipeline visibility configuration",
                    "properties": {
                      "show_in_all": {
                        "type": "boolean",
                        "description": "Whether the field is shown in all pipelines"
                      },
                      "pipeline_ids": {
                        "type": "array",
                        "description": "Specific pipeline IDs where the field is shown (if show_in_all is false)",
                        "items": {
                          "type": "integer"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "important_fields": {
                "type": "object",
                "description": "Important fields configuration",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the field is marked as important"
                  },
                  "stage_ids": {
                    "type": "array",
                    "description": "Array of stage IDs where the field is important",
                    "items": {
                      "type": "integer"
                    }
                  }
                },
                "additionalProperties": false
              },
              "required_fields": {
                "type": "object",
                "description": "Required fields configuration",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the field is required"
                  },
                  "stage_ids": {
                    "type": "array",
                    "description": "Array of stage IDs where the field is required",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "statuses": {
                    "type": "object",
                    "description": "Pipeline-specific status requirements, mapping pipeline ID to array of statuses",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "won",
                          "lost"
                        ]
                      }
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "field_name",
              "field_code",
              "field_type",
              "is_custom_field",
              "is_optional_response_field"
            ],
            "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)
