Results mappings merge data returned from a lookup into the source data, so that you can use the results returned from a lookup in other steps later on in the flow. The field mappings you define will be added as new fields or replace existing fields if those fields already exist in the source record.
This example uses the following steps:
- Export campaign folders from Mailchimp.
- Look up email campaign information.
- Import the email campaign data into Salesforce.
If you have Mailchimp email campaign data that you want to import into Salesforce, you can first extract all campaign folders with a Mailchimp export, then use a lookup from another Mailchimp resource to add or replace fields returned by the lookup results back into the source data. The source data passed on to the Salesforce import includes the data returned by the lookup.
Click the + icon on the lookup step to configure the lookup.
This lookup uses an alternate connection to a different Mailchimp account to retrieve information to add to the initial export data. You can define your secondary search criteria in the What would you like to export? section.
For this example, choose the Campaigns API and use a Get all campaigns operation to retrieve the secondary lookup data. Click Launch under Configure search parameters to open the Search parameters window and further refine the search.
The options in this window vary from service to service depending on the API's available fields. You can use the settings to further refine the data retrieved by the lookup. For this example, the lookup will only return records with a Campaign type field value of "regular".
Once you have refined your search criteria, verify the lookup returns data as expected by clicking the Preview button in the Preview data panel.
This lookup retrieves all campaigns with a value of "regular" in the "type" field.
Configure results mappings
Results mappings are set with the mappings icon ( ) to the right of an import or lookup step that also has another step following it. Click + on the lookup step to add it if it isn’t visible.
Once you export the data from Mailchimp, configure the results mappings:
The results mappings for Mailchimp lookups allow the following four options:
- data: data included in the results from Mailchimp.
- errors: any errors from the processed record.
- ignored: a “true” or “false” value. The value is "true" if the record processed through this step was ignored. Otherwise the value is "false".
- statusCode: the status code that resulted from processing the record through this step.
- dataURI: when possible, this returns the link to the data that was retrieved by the lookup.
The lookup data is merged into the source data as new fields unless you create mappings to existing fields. If you map a field returned by the lookup to an existing field in the source data, the field value is replaced by the lookup data. The Source record field on the right is for choosing a field name to hold the data that will be added to the source data for use later on in the flow.
In the above example, the "data" field from the lookup result is mapped to a field named "regular_campaign".
Additional lookup steps (including HTTPS or other endpoints)
You can configure an unlimited number of further lookup steps with results mappings as needed to use the lookup data returned in furture flow steps.
Please sign in to leave a comment.