The Salesforce Lookup step is used to look up records from Salesforce based on an ID and adds them to the current record.
Illustrated in the image below is a flow that utilises the Salesforce Lookup step.
Adding a Salesforce Lookup Step
To add a Salesforce Lookup step in a flow, follow the instructions below:
1. Click on the plus icon as shown in the image below.
2. The page below will appear. Select or search for Salesforce as shown in the image below.
Configuring a Salesforce Lookup Step
Illustrated in the image below is the configuration that is available in the Salesforce Lookup step.
A connection is required for this step. Click on the highlighted plus button to create a new connection.
Lookup Type – Type of lookup to perform. The options available are ID, Query, or Cache. The Query lookup type has been selected in this example.
Limit – The maximum number of records to fetch.
SOQL Query Statement – The SOQL query statement to use.
Mappings – Determine the mappings from the lookup object to the record object. To add a field to map, click on the ‘Add Row’ button as outlined in the image above.
From Path – The path or value to map from.
To Field – This field is mandatory. This specifies the path or name of the new field to map to. In this example, it has been set to “Test Lookup”.
Default Value – This is a default value to use in the new field if there is no source field found on the input record.
Type – The data type. This could be a String, Number, Boolean or any other data type required. Select the required from the dropdown list.
On Not Found – Action to be taken if data is not found. The options available are Error, Null, Discard, or Skip.
Enable Caching Checkbox – Cache results so that they are only fetched once for a specific ID when checked.
Using a Salesforce Lookup Step
To use a Salesforce Lookup Step, follow the instructions below:
1. Click on the play icon on the Calculator step after a Salesforce Lookup Step, as highlighted in the image below:
2. Click the Test button as shown in the image below.
The image below shows the output from the Salesforce Lookup.