The &Open platform integrates with Salesforce to help you automate your gifting campaigns. By creating a workflow automation, you can set up rules to automatically add Leads or Contacts to a campaign based on criteria you define. This is a powerful way to ensure the right people are receiving gifts at the right time, without manual effort from your team. These automations can be set up once, and then run in the background from that point on.
The way our Salesforce campaign integration works is that the &Open platform will monitor the members of the campaign in Salesforce, and then match these members automatically in the Campaign on the &Open side. So, whenever a person is added to the campaign within Salesforce, that same person will be mirrored to the &Open gifting campaign within a few seconds.
In this guide, we'll walk through setting up a Flow in Salesforce that will automatically add Leads to an &Open gifting campaign. Every Salesforce instance is unique, with different usage of fields and custom fields & objects, so use this as a general template that you can adapt to your own use case. You might set up a single automation, or dozens, depending on your gifting setup.
In our example flow, we're going to periodically check through our list of Leads, and add them to a gifting campaign if they are recorded to have an annual revenue over $1,000,000.
Anatomy of a Flow
A Flow in Salesforce is a set of steps that automate a business process that you'd otherwise have to do manually. It consists of:
A trigger: This is the event that launches the flow. It could be a record being created or updated, a scheduled time, or a manual button press.
Filters and logic: The flow looks up records and checks conditions to determine what actions to take, if any.
Actions: The end result, like creating a record or updating a field. In our case, we'll be adding a Lead to a Campaign.
Here‘s a diagram showing the general shape our flow will take:
Types of Flows
There are a few different types of flows for different use cases:
Screen Flows: These automate user interactions with Salesforce screens, like filling out a multi-step form.
Auto-Launched Flows: These are triggered automatically by system events, without user interaction.
Schedule-Triggered Flows: These run automatically on a schedule you define (e.g., daily or weekly). We‘ll be using this type.
For our gifting automation, a Schedule-Triggered Flow that is scheduled to run weekly will work well. Let's build it!
Building the Flow
To get started, go to Setup > Process Automation > Flows, where all of your flows will be created and managed. If you can't access this screen, you will need to ask your Salesforce administrator to give you additional access.
Click the New Flow button and select Schedule-Triggered Flow. This will open up the “Flow Builder” interface, which is a visual diagram of the steps in your flow, where the logic and filtering can be edited for each step.
We'll be checking Lead records, so use the “Get Records” element to query Leads and filter for those with Annual Revenue over 1,000,000. Connect this to your trigger element.
Now use a "Record Lookup" element to find the gifting Campaign you want to add them to. You can look it up by name or ID. Using the ID is recommended so you can change the name later without disrupting the flow.
Next, let's check if the Lead is already a member of the Campaign with another "Record Lookup", this time on the CampaignMember object. A campaign member brings together a campaign and a lead or contact. In this step, we'll be constructing a filter by using the outputs from our previous two steps — so we're aiming to match the LeadId and CampaignId from previous steps.
If a record is found here, that tells us they are already a member.Add in a Decision element to check if the CampaignMember was found in the previous step.
If so, we're done! If not, add one more step to add this lead into the campaign for the first time.A final "Create Records" element will add a new CampaignMember record related to the Lead and Campaign, adding them to the Campaign and kicking off the synchronisation process in the background.
It's a good idea to use the “Debug” feature in the Flow builder to do test runs of your Flow and ensure that the various records are being correctly matched as you go down through the steps.
Once you're finished, Activate the flow and monitor the “Flow Interview Log” to check that it's working as expected. You can update the filter criteria or scheduling at any time.
You can also open any existing Flow and “Save As...” to create different versions of each one to cover multiple similar use-cases.
Some other tips:
To exclude inactive Leads, add a filter for "IsActive equals True".
If you want to use data from a custom field to filter Leads, just use the “API name“ of the field, which would've been set when it was created, like "My_Field__c".
While we used Leads in this example, the same approach works for Contacts, Users or any other object you use to model gift recipients.
By automating your gifting in Salesforce, you can leverage your existing segments and data without needing to manage campaigns in multiple systems. Feel free to reach out to your Customer Success Manager for help designing a flow that maps to your unique business needs and goals.