Response mapping adds data from an import's response, such as a new record ID or an error, to the source record so later steps in the flow can use it. This article is for builders whose flow has more than one step after the import, or who need to capture what the destination application returns. Response mapping applies to import steps. For lookup steps, see Configure results mapping.
How response mapping works
The destination application's response to an import is available only at the import step. Response mapping copies selected parts of that response into fields on the source record. The record then carries those fields into every later step.
If the source record already has a field with the name you choose, the response value overwrites it. Otherwise, integrator.io adds a new field.
For example, if the destination application assigns a customer ID when it creates a customer, you can map the response id to a source field named customer_id and use it in a later import.
Configure response mapping
- Open the flow in the flow builder.
- On the import step, select More
> Outgoing data > Response mapping.
- In Import response field, select the response field to copy. If the response includes a field that isn't listed, enter its name.
- In Source record field, enter the name of the field that will hold the value.
- Click Save & close.
The panel is titled Edit response mapping.
Response fields
| Field | Description |
|---|---|
id |
The ID of the record that was imported. |
errors |
Errors from the record processed in this step. |
ignored |
true if the step ignored the record, otherwise false. |
statusCode |
The status code from processing the record in this step. |
_json |
The full JSON response of the import. Use it to reach fields that the application returns but that aren't listed. For example, a customer import into Shopify can return a sales representative ID inside the customer record. |
dataURI |
When available, the link to the data the import created or updated. |
headers |
The response header values. |
The fields vary by application. NetSuite returns id, errors, ignored, and statusCode. Other applications can return more, such as the whole imported object. The list in Import response field shows fields from a sample response. To map a field the list doesn't show, enter its name. For example, HubSpot returns companyId when you create a company, so enter companyId to map it.
Use response data in later steps
After you save, the new field is part of the source record. To confirm it, check that it appears as a source field in the next import step's mapping. You can use the field in a later import's mapping or in a lookup's search criteria. For a worked example, see Example: Look up a NetSuite customer and merge the result.
To write response errors to a custom NetSuite record or a file, see the section on capturing errors in Example: Look up a NetSuite customer and merge the result.
To control what happens to a record that fails at this step, see Handle failed records in a flow.
Map responses from several import steps
When a flow has a chain of imports, configure response mapping on each import whose response a later step needs. Use a different Source record field name for each one so that one response doesn't overwrite another.