Mapping is how data moves between the parts of a tool: from the record into each lookup or import, from each step's result back into the record, and finally from the record into the tool output schema. This article explains the four mapping types a tool can contain, shows integrator.io users how to map the tool output, and covers what to do when the output schema changes after you've mapped it. The mapper itself is Mapper 2.0, so the field-level mechanics link to the Mapper 2.0 articles.
Important
Prerequisites: Configure tool output. The output mapping targets the output schema.
Mapping types in a tool
| Type | Where | What it does |
|---|---|---|
| Import mapping | On an import step, under Incoming data > Mapping | Maps fields from the record into the application's fields. See Mapper 2.0. |
| Response mapping | On an import step, under Outgoing data > Response mapping | Merges the application's response — for example, the new record's ID — back into the record. |
| Results mapping | On a lookup step, under Outgoing data > Results mapping | Merges the records the lookup returned back into the record. See Results mapping. |
| Tool output mapping | On Tool output, under Mapping | Maps fields from the record into the output schema. The target fields come from the schema you defined. |
Map the tool output
- Go to AI studio, and then select Tools.
- Select the tool.
- Select More on the Tool output step, and then select Mapping. Edit Mapping opens with Destination, Type, and Source columns; the destination fields are generated from the output schema, including nested objects and arrays.
- Map each destination field from the record. Use handlebars expressions for values that combine or transform fields. See Handlebars.
- Turn on Auto preview, or select Preview, to see the mapped output for the mock input.
The output is always JSON, whatever media types the steps used. See JSON media type.
When the output schema changes
If you change the output schema after mapping it, the mapping's target fields no longer match. The mapper shows a warning; select Auto-populate response fields to regenerate the targets from the schema, then re-map any field whose name or position changed. Until you do, test runs fail output validation — see Troubleshoot tools.