Skip to main content
Integration feeds (CRM, webhooks, spreadsheets) rarely accept raw form field names. Flex Forms field mapping renames keys, applies transforms, injects static values, and supports nested target paths — the same engine powers Studio mapping UI and programmatic dispatch.

How mapping works

  1. Field mappings — { "source_field": "target_key" } pairs copy values from answers to the output.
  2. Transformations — optional per-source transform applied before the value is written.
  3. Static values — constants merged into the output (campaign IDs, record types, tags).
  4. Unmapped fields — optionally include remaining answers under a prefix.
Sources use dot notation for nested answers (address.city). Targets use dot notation for nested output (contact.address.city).

Built-in transforms

Chain transforms with | (e.g. trim|lowercase). Register custom transforms:

Conditions

Optional conditions on FieldMapping:
  • Global (no source): if any fail, only staticValues are returned.
  • Per-source (source matches a mapped field): skip that row when the condition fails.
Operators: filled, empty, equals, not_equals, truthy, falsy.

FieldMapping DTO

FieldMapper::map example

Nested paths

Arr::get / Arr::set power both sides — deep paths work out of the box.

Static values

Static values are written after field mappings and can define nested keys:

Preview

Use the same mapper for admin previews and tests:
preview() is an alias of map() — pass the form schema when a transform needs block metadata from $context['schema'].
Conditional feeds in Studio can attach mapping per branch. See Conditional feeds.
Last modified on September 7, 2026