Data mapper
A Data mapper step works out a set of named values from the run’s data and stores them. Use it to rename fields, pick values out of a tool’s answer, set defaults, or build the object another step expects. No model is involved.
When to use it
Section titled “When to use it”- Pick the customer’s name and phone out of a CRM lookup so later steps read
data.nameanddata.phone. - Set a fallback language when the trigger did not send one.
- Build the payload a sub-workflow or an End step’s output needs.
When not to use it
Section titled “When not to use it”- You need a calculated figure with rounding, such as an EMI. Use Compute.
- The values should be kept for future conversations on any channel. Use Write context.
Settings
Section titled “Settings”| Setting | What it does |
|---|---|
| Mapping | Required. Name and expression pairs, up to 50. A plain number or true/false is stored as it is. |
| Store under | Saves all the values as one object under data.<name>. Empty writes each name straight into data. |
What it produces
Section titled “What it produces”- A single Next.
data.<name>for each mapping entry, or one object atdata.<Store under>.
Values that are missing in the run come out empty rather than failing. An expression that cannot be worked out at all fails the run, as this step has no error path.
Example
Section titled “Example”A hospital tidies a patient lookup before sending a confirmation.
MCP tool (patients / find_patient) → Data mapper (store under patient) → Send message → End| Name | Expression |
|---|---|
name |
steps.find_patient.fullName |
phone |
coalesce(steps.find_patient.mobile, input.phone) |
language |
coalesce(steps.find_patient.language, 'en') |
data.patient:
{ "name": "R. Kumar", "phone": "+919800000005", "language": "hi" }