The Salesforce integration connects one Userflow environment to one Salesforce organization. It syncs Salesforce records with Userflow users and companies in both directions, and it streams Userflow events to Salesforce as activity on contacts and accounts.
What does the Salesforce integration do?
Brings Salesforce data into Userflow. Salesforce fields sync to Userflow, so you can target flows by any Salesforce field.
Sends Userflow data to Salesforce. Userflow fields you choose, such as NPS responses, sync to Salesforce.
Streams Userflow events to Salesforce. Userflow-generated events, such as Flow Started and Checklist Task Completed, appear on the Activity tab of Salesforce contacts and accounts. You can use them in Salesforce automation, for example to send an email based on how a user moved through your Userflow content.
Separately, you can connect Salesforce Knowledge so your Adoption Agent can answer from your Salesforce articles. That uses a different setup, described in How to set up your Adoption Agent in minutes. Salesforce articles can't be searched directly from the Resource Center; they reach users through the Adoption Agent.
How the Salesforce integration matches and syncs records
The Salesforce integration works through object mappings. Each mapping pairs a Salesforce object type with a Userflow object type, such as Salesforce contacts with Userflow users, or Salesforce accounts with Userflow companies. Fields can sync in either direction.
Supported Salesforce objects: contacts, leads, accounts, opportunities, and custom objects.
Records are matched by ID fields you pick, such as an email address, or a Salesforce field that holds the same ID you use in Userflow.js (usually an ID from your own database). The Salesforce integration only syncs records that exist in both systems and never creates new ones. For example, newsletter-only contacts in Salesforce won't become Userflow users.
Syncing is real time. Changes in Userflow reach Salesforce in under 1 second. Changes in Salesforce usually reach Userflow within 3 seconds. A full sync also runs about every 24 hours.
Where Salesforce data shows up
In Userflow: Salesforce fields appear on user and company profiles with the Salesforce cloud icon.
.png)
In Userflow targeting: use Salesforce fields in auto-start conditions.

In Salesforce: if you turn on event streaming, events such as a flow starting or a checklist task being completed appear on the Activity tab of contacts and accounts.

Do I need a separate Salesforce integration for Staging and Production?
Yes. Each Salesforce integration connects one Userflow environment to one Salesforce organization, so you set it up once per environment.
Connect your main Salesforce organization to your Production environment only. To test in a Staging environment, use a separate Salesforce organization, or your Staging environment will post test events into your real Salesforce data.
Connect Salesforce to Userflow
Sign in to Userflow and use the company and environment menu in the top-right corner to pick the environment you want to connect.
Go to Settings → Integrations and click Add integration.
Find and click Salesforce in the list.
Click Add Salesforce. If you don't see it, the Salesforce integration may not be included in your plan. Check your billing settings.
Click Connect with Salesforce and, in the popup, pick the Salesforce account to connect to this environment.
Click Set up a new mapping between Salesforce and Userflow objects.
.png)
Pick the Salesforce object type and the Userflow object type, for example Salesforce contacts and Userflow users, and click Continue.
.png)
Choose how records are matched:
Salesforce contacts with Userflow users: match by Email (pick Email in both dropdowns), or by a Salesforce field that holds the same user ID your Userflow.js snippet passes to
userflow.identify(userId). The second option needs your back end to store that ID on Salesforce contacts.With Userflow companies: your Userflow.js installation must call
userflow.group(companyId), and the Salesforce account field you pick must hold that samecompanyId.
Choose the fields to sync from Salesforce to Userflow. You can also pick fields from related records. For example, when syncing contacts, you can pick account fields, and the Salesforce integration takes the value from the contact's account.
Choose the fields to sync from Userflow to Salesforce. When you save, Userflow creates Salesforce fields named
userflow_<object>_…for them. They aren't added to any page layout, so add them under Object Manager in Salesforce if you want to see them.To post Userflow events to the Activity tab in Salesforce, turn Stream events on. Only some Salesforce objects can receive events.
Click Save mapping.
.png)
Click Run full sync. New and changed records sync from now on, but existing records only sync after a full sync. The page shows progress and a green check mark when it's done.

If you change a mapping later, run a full sync again. You can add more than one mapping, for example Salesforce contacts to Userflow users and Salesforce accounts to Userflow companies.
How do I disconnect Salesforce?
Open the Salesforce integration in Settings → Integrations.
Click the three-dot button in the top right.
Click Disconnect. Event streaming and field sync stop immediately.
Related articles
HubSpot integration: works the same way, with object mappings