DealFields
Returns data about all deal fields, including both standard and custom field definitions for deals exposed through the Fields API v2.
Table-Specific Information
SELECT
The provider uses the Pipedrive API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| FieldCode | = |
For example, the following query is processed server-side:
SELECT * FROM DealFields WHERE FieldCode = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0'
INSERT
Execute INSERT by specifying the FieldName and FieldType columns. The Options column is required when FieldType is enum or set. You can also insert any columns that are not read-only.
For example:
INSERT INTO DealFields (FieldName, FieldType) VALUES ('Custom Note', 'varchar')
INSERT INTO DealFields (FieldName, FieldType, Options) VALUES ('Priority Level', 'enum', '[{"label":"Low"},{"label":"High"}]')
UPDATE
Execute UPDATE by specifying the FieldCode in the WHERE clause. All columns that are not read-only can be updated. The FieldType cannot be changed after creation.
For example:
UPDATE DealFields SET FieldName = 'Updated Name' WHERE FieldCode = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0'
DELETE
Execute DELETE by specifying the FieldCode in the WHERE clause.
For example:
DELETE FROM DealFields WHERE FieldCode = 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0'
Columns
| Name | Type | ReadOnly | References | Description |
| FieldCode [KEY] | String | True |
The unique machine-readable code that identifies the field within the Pipedrive V2 API. Cannot be changed after creation. | |
| FieldName | String | False |
The display name of the deal field. | |
| Description | String | False |
A human-readable description of the deal field. | |
| FieldType | String | False |
The data type of the field. Cannot be changed after creation. The allowed values are address, date, daterange, double, enum, monetary, org, people, phone, set, text, time, timerange, user, varchar, varchar_auto. | |
| Options | String | False |
A JSON aggregate containing the selectable options for enum or set type fields, each with an id, label, and color. | |
| Subfields | String | True |
A JSON aggregate containing the subfields that make up a composite field, such as the amount and currency of a monetary field. | |
| IsCustomField | Boolean | True |
Indicates whether the field is a user-defined custom field rather than a standard Pipedrive field. | |
| IsOptionalResponseField | Boolean | True |
Indicates whether the field is returned only when explicitly requested through the include_fields parameter. | |
| UiVisibilityAddVisibleFlag | Boolean | False |
Indicates whether the field is shown in the add new deal dialog. Returned via include_fields. | |
| UiVisibilityDetailsVisibleFlag | Boolean | False |
Indicates whether the field is visible on the deal detail view. Returned via include_fields. | |
| UiVisibilityProjectsDetailVisibleFlag | Boolean | False |
Indicates whether the field is visible on the projects detail view. Returned via include_fields. | |
| UiVisibilityShowInPipelinesShowInAll | Boolean | False |
Indicates whether the field is shown across all pipelines. Returned via include_fields. | |
| UiVisibilityShowInPipelinesPipelineIds | Integer | False |
The identifiers of the specific pipelines in which the field is shown when it is not shown in all pipelines. Returned via include_fields. | |
| ImportantFieldsEnabled | Boolean | False |
Indicates whether the field is marked as important for specific deal stages. Returned via include_fields. | |
| ImportantFieldsStageIds | String | False |
The identifiers of the deal stages in which the field is marked as important. Returned via include_fields. | |
| RequiredFieldsEnabled | Boolean | False |
Indicates whether the field is required for specific deal stages. Returned via include_fields. | |
| RequiredFieldsStageIds | String | False |
The identifiers of the deal stages in which the field is required. Returned via include_fields. | |
| RequiredFieldsStatuses | String | False |
A JSON object mapping deal stage identifiers to the deal statuses in which the field is required. Returned via include_fields. |