How to Automatically Import Salesforce Leads and Contacts into Viral Loops
Connect Salesforce with Viral Loops to automatically add new Salesforce Leads and Contacts as participants in your Viral Loops referral campaign.
The Salesforce Participation Workflow allows you to automatically send participant information from Salesforce to Viral Loops whenever a new Lead or Contact is created. This means you don't need to manually import new users into your referral campaign.
In this guide, you'll learn how the Salesforce–Viral Loops integration works and how to manually configure the participation workflow if the automatic setup is unsuccessful.
How the Salesforce and Viral Loops integration works
When a new Lead or Contact is created in Salesforce:
Salesforce → Outbound Message → Viral Loops → Participant registered in your campaign
Salesforce sends the participant information to your Viral Loops campaign through an Outbound Message. Viral Loops then creates or registers the user as a campaign participant.
This is particularly useful if you want your Salesforce Leads or Contacts to automatically participate in your referral program without requiring a manual CSV import.
Salesforce edition requirements
The automatic Salesforce participation workflow relies on Salesforce's Outbound Messages feature.
Outbound Messages are available in the following Salesforce editions:
Enterprise
Unlimited
Performance
Developer
If you're using another Salesforce edition, the standard auto-import workflow described below may not be available.
Salesforce also confirms that Outbound Messages are available in Enterprise, Performance, Unlimited and Developer editions.
Automatically importing Salesforce Leads into Viral Loops
When you connect Salesforce from your Viral Loops campaign, Viral Loops attempts to automatically create and register the necessary workflow.
If the automatic setup doesn't complete successfully, you can configure the workflow manually using the steps below.
Log in to your Salesforce account (https://login.salesforce.com/).
2. Click on Setup in the top right corner.
3. Search for Workflow Rules in the search bar in the left navigation, then click on it.
4. A list of all Workflow Rules will be listed. Click on New Rule to create a new one. A dialog box will appear asking you to confirm. Click on Continue with Workflow Rules to proceed.
5. In the configuration, we will go ahead and select the Lead object. This rule will run when a new Lead comes into Salesforce.
6. Now let’s edit the Workflow Rule:
Give it a unique name and description
For the Evaluation Criteria, set it as “Created.”
And the Rule criteria, set it to Email - Not equal to - null(empty)
Click Save & Next
7. On the next screen, we will be setting up our Outbound Message. This is what will send data to Viral Loops for your campaign. Click on Add Action and select Outbound Message.
8 . In the Outbound Message configuration, we will need to set a few things:
A name. The Unique Name will be automatically filled based on the name provided
The Endpoint URL. This is obtained from the Salesforce Integration page in your campaign’s wizard in Viral Loops. Alternatively, you can use:
https://app.viral-loops.com/api/integrations/salesforce/hooks/participation/{CAMPAIGN_API_TOKEN}Select the fields to send. Include at least the Email, FirstName and LastName.
If you wish to connect the same Salesforce account to multiple VL campaigns, you will also need to include the ReferralCode__c field. This is to prevent cross-contamination of participant data.
Click Save, then Done to proceed
9. The final step is to Activate the Workflow Rule. This can be done by clicking the Activate button. The checkbox should be marked.
10. You are all set! New Leads will be automatically imported to your campaign.
You will also need to sync Contacts to the same campaign so you don’t miss any new contacts coming into Salesforce. Especially if you are running a Conversion campaign with Viral Loops. To do that, we will have to create a new Workflow Rule targeting the Contacts Object. The process is the same as that of Leads.
Please follow the instructions to set up a conversion flow here.








