Skip to main content

Salesforce company enrichment

How to enrich Salesforce Account records with Lusha company data using Salesforce Flow and the Lusha Company API.

Written by Hila
Updated over a week ago

This guide shows you how to enrich Salesforce Account records with Lusha company data using Salesforce Flow. The workflow calls Lusha's Company API to pull firmographic details β€” such as industry, description, and domain β€” directly into your Salesforce accounts.

πŸ’‘ Note: This feature requires a Premium or Scale plan. You'll need an active Salesforce subscription with Flow enabled, a Lusha API key (visible to Admins and Managers at dashboard.lusha.com/enrich/api), and available bulk credits. Credits are only consumed when a match is found.

Step 1: Create a named credential in Salesforce

  1. In Salesforce Setup, go to Named Credentials.

  2. Create a new External Credential with no authentication.

  3. Enter the Lusha Company API URL as the endpoint.

  4. Add two headers:

    • api_key β€” set the value to your Lusha API key

    • Accept β€” set the value to */*

Step 2: Create a screen flow in Salesforce

  1. In Salesforce, create a new Screen Flow with a Free Form layout.

  2. In the Toolbox Manager, create a new Variable named recordId with Data Type set to Text. Connect it to the Account ID via Get Records.

  3. Drag a Get Records element into the layout and select the Account object.

  4. Under Filter Account Records, choose All Conditions Are Met, then set: ID field β†’ Equals β†’ recordId variable.

  1. Drag an Action element into the layout, connect it to the Named Credential from Step 1, and name it (e.g., LushaCompanyAPI).

  2. Under Query Parameter Values, select the Account domain field as the lookup identifier.

Create a formula for each data point

For each API field you want to pull (e.g., Description, Industry), create a Formula resource in the Toolbox: go to New Resource β†’ Formula, select the field from the API response (e.g., [ActionName] β†’ 2xx β†’ Data β†’ Description), and set the correct data type.

Add an Update Records element. Set it to update Account records where ID equals recordId, and map each formula to its corresponding Account field.

Step 3: Create a screen confirmation

Drag a Screen element into the layout and label it "Done". Use Display Text to show each enriched field and its formula value. This gives users a confirmation popup showing what was enriched.

Save the flow, then run a debug test with an Account ID to verify the API call and confirm the response looks correct.

Step 4: Add a button to trigger the flow

  1. Go to Setup β†’ Object Manager β†’ Account β†’ Buttons, Links, and Actions.

  2. Create a new action that triggers the flow you just built.

  3. Add the button to the Account Page Layout so users can trigger enrichment on demand.

Step 5: Monitor and optimise

After deploying the workflow, check the workflow history and error logs. Adjust the flow as needed to improve performance.

For help, contact [email protected] or use the chat icon in your Lusha dashboard.

Did this answer your question?