The Userflow-Salesforce integration syncs Salesforce fields to/from Userflow in real-time. This allows you to personalize onboarding content in Userflow based on data from Salesforce.
Userflow-generated events, such as Flow Started and Checklist Task Completed, are continuously streamed into Salesforce as Timeline Events, which you can see on contacts’ profile pages and use in automated workflows. This way you can e.g. send emails from Salesforce based on how your users interact with Userflow content.
Table of contents
- How it works
- Quick note about Salesforce accounts and Userflow environments
- Setup guide
- Stopping the integration
How it works
You can set up “object mappings” between any Salesforce object type and any Userflow object type. For example between Salesforce contacts and Userflow users, or Salesforce accounts and Userflow companies. Fields can be synced in either direction. This means you can both bring Salesforce fields into Userflow, which you can then use to target flows, and you can bring Userflow fields into Salesforce, such as passing NPS responses from Userflow into Salesforce.
We support the following Salesforce object types:
- Custom objects
The integration will match a Salesforce object with a Userflow object through the ID fields you select. For example, match Salesforce contacts with Userflow users via their email address, or via an ID field (a Salesforce field that matches the same ID you use in Userflow.js - typically these IDs come from your own backend’s database).
Objects are immediately synced when they’re created/updated in either Salesforce or Userflow.
The sync happens in real-time! This means that any user seen by Userflow, will always have up-to-date fields synced from Salesforce. The delay varies depending on in which system the change happens. When anything changes in Userflow, count on a delay of less than 1 second. When changes happen in Salesforce, they’re typically reflected within 3 seconds. There’s no periodic job that you have to wait for.
Objects are only synced if they exist in both systems. The integration will not create any new objects in either system. This means if you e.g. have a large number of newsletter-only contacts in Salesforce, then we won’t sync these into Userflow.
Salesforce fields can be seen on user/company profiles in Userflow and are marked with the Salesforce cloud icon:
You can use them in auto-start conditions to target users based on fields from Salesforce:
If enabled, when certain events are tracked by Userflow, such as when a flow is started or a checklist task is completed, they’ll be posted on contacts’ and accounts’ Activity tabs in Salesforce.
Quick note about Salesforce organizations and Userflow environments
A Userflow-Salesforce integration is between a single Userflow environment and a single Salesforce organization. You have to run the below setup guide for each environment.
We recommend only integrating your Main/Production Salesforce organization with your Production Userflow environment.
If you have a Staging Userflow environment, where you want to test the Salesforce integration, then make sure to create a different Salesforce organization. Otherwise the Userflow Staging environment may post timeline events in your main Salesforce organization.
- Sign into Userflow and use the top-right company/environment menu to navigate to the environment you want to integrate with Salesforce.
- Go to Settings -> Integrations. Then click Add integration:
- Find and click Salesforce in the list:
- Click Add Salesforce (activate/upgrade your plan if you don’t yet have access):
- Click Connect with Salesforce. In the popup window that opens, pick the Salesforce account you want to sync with the current Userflow environment.
- Next, we have to tell the integration how to map Salesforce objects to Userflow objects. Click Set up a new mapping between Salesforce and Userflow objects.
- In the dialog that appears, pick the Salesforce object type and the Userflow object type you want to sync. For example: Salesforce contacts and Userflow users. Then click Continue.
Choose how we should match objects from Salesforce with objects in Userflow.
If you’re syncing Salesforce contacts with Userflow users you can have 2 options:
- Via email address, where a Salesforce contact’s email address must match a Userflow user’s email address. Pick “Email” in both dropdown fields.
Via a Salesforce ID field, which must match the user ID your Userflow.js snippet passes to
userflow.identify(userId). This requires your own integration between your own backend and Salesforce to store this user ID as a contact field in Salesforce.
If you’re syncing with Userflow companies:
Requires your Userflow.js installation to call
userflow.group(companyId), and the selected Salesforce account ID field must match this same
- Requires your Userflow.js installation to call
- If you’re syncing Salesforce contacts with Userflow users you can have 2 options:
- Choose the fields you want to sync from Salesforce to Userflow. Note that you’re also able to pick fields from associations of the mapped Salesforce object. For example, when syncing Salesforce contacts, you can pick account fields in the dropdown, too. The integration will simply grab the value from the contact’s account.
Choose the fields you want to sync from Userflow to Salesforce. Once you save, appropriate fields prefixed with
userflow_<object>_will automatically be created in Salesforce for you. Note that we don’t add the new fields to any of your page layouts, so if you want them to appear somewhere in Salesforce, you have to add them yourself under Object Manager in Salesforce.
- If you want Userflow to post timeline events to Salesforce objects’ Activity tab, when e.g. flows are started or checklist tasks are completed, then switch Stream events to ON. Note that only some Salesforce objects support receiving events.
- Finally, click Save mapping.
- Userflow will now sync with Salesforce every time objects are created/updated either system. But! Existing objects have not yet been synced. Click Run full sync to start an initial full sync of all object.
- The UI shows you a running progress, and a green checkmark when it’s done. If you change your mappings later, we recommend running a full sync again to make sure all existing users are in sync. We also run this full sync periodically (currently every ~24 hours), just to make sure we didn’t miss any updates from Salesforce.
- You can of course add multiple object mappings. E.g. Salesforce contacts <-> Userflow contacts and Salesforce accounts <-> Userflow companies.
Stopping the integration
- Find your Salesforce integration in Userflow under Settings -> Integrations.
- Click the three-dot button in the top right.
- Click Disconnect. Event streaming and field sync will stop immediately.