Skip to main content
PATCH
Update a custom field rule

Authorizations

Authorization
string
header
required

API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".

Path Parameters

uuid
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json
label
string

Rule label

Required string length: 1 - 255
active
boolean

Whether the rule is active

source_custom_field_uuid
string

Source custom field UUID. Lead and partner rules read only fields of their own entity_type with the target field's partner type. Deal (lead_deal) rules may also read the deal's lead fields and its partner's fields, as the source and as conditions, when the field's partner type matches the target's (distributor partner fields count as reseller).

source_values
(string | number | boolean | object)[]

Values that trigger the rule; {operator, value} objects are numeric threshold conditions for number source fields

Maximum array length: 100
action_type
enum<string>

Rule action: set_value, show_field, or value_mapping

Available options:
set_value,
show_field,
value_mapping
target_custom_field_uuid
string

Target custom field UUID. Must be a field of the rule's entity_type.

target_value
object · null · null

Value to set when action_type is set_value

value_mappings
object[] | null

Value mapping pairs for value_mapping rules

Maximum array length: 100
locked
boolean

Whether the target field is locked when the rule matches

entity_type
enum<string>

Entity type this rule applies to

Available options:
partner,
lead,
lead_deal
conditions
object[]

Extra conditions, each on its own custom field, evaluated alongside the primary condition (source_custom_field_uuid + source_values). For show_field and set_value, the primary condition and every extra condition are combined with condition_operator. For value_mapping, the extra conditions form a gate: they are combined among themselves with condition_operator, and the first matching value_mappings row on the source field applies only while the gate passes. A condition matches when the field's value matches any of its values. Each condition field must be a distinct field, different from the source and target fields, that the rule may read (see source_custom_field_uuid). At most 20 conditions. Replaces the rule's extra conditions; pass [] to remove them all, omit to leave them unchanged.

Maximum array length: 20
condition_operator
enum<string>

How conditions combine: and (all must match) or or (any may match). For show_field and set_value it combines the primary condition with the extra conditions; for value_mapping it combines only the extra conditions (the gate).

Available options:
and,
or

Response

200 - application/json

Default Response

uuid
string
required
label
string
required
active
boolean
required
source_custom_field_uuid
string
required
source_values
(string | number | boolean | object)[]
required
action_type
enum<string>
required
Available options:
set_value,
show_field,
value_mapping
target_custom_field_uuid
string
required
target_value
object · null · null
required
value_mappings
object[] | null
required
conditions
object[]
required

Extra conditions, each on its own custom field, evaluated alongside the primary condition (source_custom_field_uuid + source_values). For show_field and set_value, the primary condition and every extra condition are combined with condition_operator. For value_mapping, the extra conditions form a gate: they are combined among themselves with condition_operator, and the first matching value_mappings row on the source field applies only while the gate passes. A condition matches when the field's value matches any of its values. Each condition field must be a distinct field, different from the source and target fields, that the rule may read (see source_custom_field_uuid). At most 20 conditions.

condition_operator
enum<string>
required

How conditions combine: and (all must match) or or (any may match). For show_field and set_value it combines the primary condition with the extra conditions; for value_mapping it combines only the extra conditions (the gate).

Available options:
and,
or
locked
boolean
required
entity_type
enum<string>
required
Available options:
partner,
lead,
lead_deal
created_at
string
required
updated_at
string
required