Skip to content

Computed Custom Field Values

What is a Computed Custom Field?

The following types of Custom Fields return option ids instead of option labels: * Dropdown Fields * Multi-select Dropdown Fields

For example, you may have a custom field with id = 1 called "Favorite Ice Cream Flavor". Below are its options ids and values:

  1. "Chocolate"
  2. "Vanilla"
  3. "Strawberry"

When it is returned as part of any endpoint that returns an entity with custom fields included, by default it will be returned like this:

{
    "custom_fields": [
        {
            "custom_field_definition_id": 1,
            "value": [1, 2]
        }
    ]
}

The option ids 1 and 2 need to be mapped back to their corresponding labels of "Chocolate" and "Vanilla" via a call to GET /v1/custom_field_definitions which causes an extra request to be made. As a convenience to reduce HTTP traffic with your rate limit in mind, you may provide an optional query param custom_field_computed_values=true (providing a false value produces the default behavior) to any eligible endpoints that return custom fields in order to retrieve the custom field's "computed_value". See example below:

{
    "custom_fields": [
        {
            "custom_field_definition_id": 1,
            "value": [1, 2],
            "computed_value": ["Chocolate", "Vanilla"]
        }
    ]
}

Note that all other types of Custom Fields will return "computed_value" with the same value as the "value" field. See example below:

{
    "custom_fields": [
        {
            "custom_field_definition_id": 2,
            "value": "example text",
            "computed_value": "example text"
        }
    ]
}

Eligible Endpoints

People

Leads

Companies

Opportunities

Projects

Tasks

Webhooks

A similar functionality is also available for Webhooks. You can create a new webhook or update an existing webhook with the parameter "custom_field_computed_values": true/false (boolean value) in order to be returned the computed values instead of the standard value.

Click here an example of a webhook request with computed custom field values.