EmailgisticsAPI
WebhooksActions

Set custom fields action

Set custom field values on the conversation.

Sets custom field values on the conversation that contains the triggering message. Custom fields must be configured in the mailbox first; values for unknown keys are silently dropped.

{
  "name":  "Apply claim context",
  "type":  "setCustomFields",
  "value": {
    "claimNumber":  "CLM-556677",
    "policyNumber": "POL-889900"
  }
}

Action object

type"setCustomFields"

Always "setCustomFields".

name?string

Optional label for diagnostics.

valueRecord<string, string>

A flat object whose keys are mailbox-defined custom-field keys and values are strings.

Validation rules

For each entry in value:

  • Unknown keys are silently dropped. Only keys configured for the mailbox are written.
  • Values longer than 100 Unicode characters (runes) are truncated to 100. ASCII characters count as one each; emoji and many CJK characters also count as one rune apiece, not as their UTF-8 byte length.
  • Values that fail the field’s validation pattern are silently dropped for that field. An empty string skips the validation check entirely (and writes the empty value through). Other fields in the same action still apply.

These are individual-field-level filters. The action overall still succeeds if any value applies. If every entry is dropped, the action is a silent no-op.

Receiving custom fields back

When Include Custom Fields is enabled in the webhook definition, the request payload includes a customFields object showing the conversation’s current values — see Request payload. You can use those existing values to decide which to update.

On this page