Contents
Response mapping
For flows that have multiple imports, response mappings allow you to define actions based on the API response from an import. For example, you can use response mapping to define an action based on the success or fail value of a field for records sent to an import. You can apply response mappings only to import steps.
Use the following steps to configure response mapping:
- Click the plus sign on the import step you want to add response mapping to, and select the mapping icon to the right of the flow step.

- The field mappings you define are merged into the source export’s data object as new fields. Use the drop-down menu in the Define response mapping panel to select the element of the response you want to map to the next flow step.

Import response mappings allow the following options:
- id: exports the internal ID of the record just imported into a system (like NetSuite).
- errors: exports any errors from the processed record in this step.
- ignored: exports a “true” or “false” value. The value is "true" if the record processed through this import step was ignored. Otherwise the value is "false".
- statusCode: exports the status code that resulted from processing the record through this import step.
- headers: exports the header values of the response.
- Choose a field in the Source record field (New/Existing field) on the right to hold the data that will be merged back into the source export data for use later on in the flow. If you use a name that is already a field on the top level of the source data’s JSON object, this response mapping overwrites that field. If you use a new field name, a new field is added to the source data.
- Click Save & close.

Note: You can use _json in the import response field to download a full, JSON formatted copy of your imported data. This is a great resource when you’re defining actions based on a field's success or fail value. _json can be discarded after you’ve retrieved your data and need to fill in your legitimate response mappings.
Let’s say you want to create response mappings for an "email" field under a "customer" parent record. You can use _json in your response mappings to get your entire JSON body, then search that body for your "email" field. Now that you’ve found the path to your field, you can use handlebars expressions and dot notations to reference the field in your response mappings. For example,
Let’s say you want to create response mappings for an "email" field under a "customer" parent record. You can use _json in your response mappings to get your entire JSON body, then search that body for your "email" field. Now that you’ve found the path to your field, you can use handlebars expressions and dot notations to reference the field in your response mappings. For example,
{{customer.email}}
.Results mapping
Results mappings merge data returned from a lookup into the original export’s data, so that the new data can be used in steps later on in the flow. You can use results mapping only on lookups.
Use the following steps to configure results mapping:
- Click the plus sign on the lookup step you want to add results mapping to, and select the results mapping icon to the right of the flow step.

- The field mappings you define are merged into the source export’s data object as new fields. Use the drop-down menu in the Define results mapping panel to select the element of the results you want to map to the next flow step.

Lookup results mappings allow the following options:
- data: exports the JSON structure in the body of the results returned by the lookup step. You can then reference the path to the field within the JSON object with handlebars expressions using dot notation {{parentField.childField}}.
- errors: exports any errors from the processed record in this step.
- ignored: exports a “true” or “false” value. The value is "true" if the record processed through this lookup step was ignored. Otherwise the value is "false".
- statusCode: exports the status code that resulted from processing the record through this lookup step.
- Choose a field in the Source record field (New/Existing field) on the right to hold the data that will be merged back into the source export data for use later on in the flow. If you use a name that is already a field on the top level of the source data’s JSON object, this results mapping overwrites that field. If you use a new field name, a new field is added to the source data.
- Click Save & close.
Take the following class to learn more about this topic:
Comments
0 comments
Please sign in to leave a comment.