Articles in this section

Use a lookup cache in a flow

Use a lookup cache in a flow to map values from stored data, or to retrieve stored data in a lookup step. This procedure is for builders who map data in flows.

Prerequisites:

Map a field with a lookup cache

For example, a flow moves customer data from Microsoft Dynamics 365 Business Central to Shopify. Business Central stores country and state as two-letter codes, and Shopify stores the full names, so GA, US in Business Central is Georgia, United States in Shopify. A lookup cache that stores the reference values maps both fields without a static or dynamic lookup.

  1. Go to Build Build icon, and then select Flows.
  2. Open the flow.
  3. Select Mapping Mapping icon on the import.
  4. Select Settings Settings icon next to the country destination.
  5. For Destination data type, select string.
  6. For Field mapping type, select Lookup.
  7. For Lookup type, select Lookup cache.
  8. For Lookup cache name, select the lookup cache. If it doesn't exist, create it. See Create a lookup cache.
  9. For Lookup cache value field, select the column that contains the full country name. If the lookup cache value is a string or number instead of an object, select $ to retrieve the complete value.
  10. Enter the path to the source value, for example $.address.countryLetterCode.

Transformation 2.0 maps fields with lookup caches the same way.

Add a lookup step

For example, a flow sends a Slack notification when SKUs fall below a threshold. The threshold changes with market, customer, and business factors, so you store it in a lookup cache that your flows keep current. Update the lookup cache manually, or update it automatically with a flow. See Populate a lookup cache with a flow.

  1. Go to Build Build icon, and then select Flows.
  2. Open the flow, and then add a lookup step after the export.
  3. Select Look up additional records (per record).
  4. Configure the lookup to retrieve the lookup cache entry.
  5. Add a filter so only records below the threshold pass to the next step.
  6. Add an import that sends the notification, and map the fields that passed the filter.

To retrieve lookup cache data in a field that supports handlebars, see Pull lookup cache data with the getLookupCacheData helper.