Overview
The integration between Salesforce and Lusha's Company API is a powerful feature designed to enrich account data with accurate, up-to-date company information directly within Salesforce.
Use Case
This feature streamlines the process of retrieving key details such as company descriptions, industries, and domains, ensuring sales and marketing teams have access to high-quality data without manual effort. By automating data enrichment through workflows and API calls, users can save time, reduce errors, and improve targeting for outreach efforts.
This integration is particularly valuable for businesses aiming to enhance their CRM data accuracy, drive personalized engagement, and make informed decisions based on reliable and enriched account information.
Requirements
This workflow requires an active Zoho subscription with the necessary Flow function enabled, along with the inclusion of Lusha resources (such as an API token for the account and available bulk credits).
A credit will be consumed only when a match is successfully found.
Lusha’s API key can be found here (visible only by Lusha admins or managers).
How it works?
Step 1: Create a Named Credential
Navigate to Named Credentials: From the Salesforce Setup, go to the Named Credentials section.
Create an External Credential: Set up an external credential with no authentication needed.
Use Lusha’s API: Input the Company API URL from Lusha’s documentation (https://api.lusha.com/company) while creating the named credential.
Add Headers:
Add a header named api_key with the value as your Lusha API key.
Add a second header named Accept with the value set as */*.
Step 2: Create a Workflow on Salesforce (Screen Flow)
Start a New Workflow: In Salesforce, create a new screen flow with a Free Form layout.
Under the Toolbox Manager, create a new Variable and name it recordId. Choose the Data Type to be Text, and then go to the Get Accounts Records, and choose the Get Record ID. This way we will have a variable that will automatically get the Account ID to enrich.
Choose the Get Records element and drag it to your layout. In the Get Records element, choose the Account object.
Under the Filter Account Records, make sure you choose the All Conditions Are Met requirement, then choose the ID field on your Account object > Equals operator > recordId variable that we created.
5. Next, drag an Action element onto the layout. Give the Action a name you will remember (LushaCompanyAPI for example), and connect the Named Credential we created in Step 1, with the Company API URL.
6. Under the Query Parameter Values, choose Account from get_related_account and then choose the field that stores the company domain (you can add another value for the company name as well, but for this example, we chose the domain since it is more accurate and usually yields a higher probability of a matching result).
Create a Formula for Each Data Point
For each API field you wish to pull (e.g., Description, Industry), create a formula using the response data.
Navigate to Toolbox > New Resource > Formula, then select the corresponding data from the API response (e.g. [whatever you named your Action)>2xx>Data>Description).
Set the correct data type (e.g., Text for Description).
Continue to create Formulas this way for each data point that you will want to use in your Update Records stage.
Use the Update Records element to specify which Account fields to update.
Under How to Find Records to Update choose the Specify conditions option, and then choose the Account object.
Choose the All Conditions Are Met (AND) option, then choose your Account ID field > Operator Equals > under the value select the recordId variable we created in part 2.For each field, map the formula created for that data point to the corresponding field (e.g., map the Description formula to the Account Description field).
Step 3: Create a Screen Interaction
Every time a user chooses to enrich the Account with the Company API action, this will give a screen pop-up, that will show which data points were enriched through the workflow. Drag the Screen element to the layout, and name label Done.
In the Display Text you can write down each datapoint followed by a dash (-), and then Insert a resource and choose the respective formula.
Continue with each field that you wish to enrich with the process. This will ensure that for every field that gets enriched, the user will see it in the pop-up screen first.
3. Save and Debug: After designing the screen, save your flow and run a debug using an Account ID to test the API call and see the response.
The end result should look something like this:
Step 4: Add a Button to Trigger the Flow
Go to Setup > Object Manager > Account > Buttons, Links, and Actions.
Create a new action that triggers the flow created earlier.
Under the Account Page Layout, you can choose where to position the button on the Account page so that the users can have access to enrich the Account with the company data from Lusha.
Step 5: Monitor Workflow Activity (Adjust and Optimize as Needed)
After deploying the workflow, monitor its performance through workflow history and error logs.
Make adjustments as needed to optimize performance and fix any issues.
The flow is now finished 🔥
💡 Note: This feature is only available on our Scale plans.
If you have any questions on the above feel free to reach out the support team via live chat from the Lusha website, your Lusha Dashboard, or via email- support@lusha.com.