--- title: "Salesforce integration: sync records and stream Userflow events" slug: "salesforce" description: "Sync Salesforce fields with Userflow in real-time to personalize onboarding, automate workflows, and enhance user engagement seamlessly." tags: ["Userflow Integration", "Salesforce Sync", "Real-time Data"] updated: 2026-10-26T16:17:00Z published: 2026-10-26T16:17:00Z canonical: "help.userflow.com/salesforce" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://help.userflow.com/llms.txt > Use this file to discover all available pages before exploring further. # Salesforce integration: sync records and stream Userflow events 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](https://help.userflow.com/docs/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](https://help.userflow.com/docs/ai-assistant). 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. ![Salesforce fields on a Userflow user profile, marked with the Salesforce icon](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-user-profile(1).png) - **In Userflow targeting:** use Salesforce fields in auto-start conditions. ![A Salesforce field used in a flow's auto-start condition](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-start-condition.png) - **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. ![Userflow events on a Salesforce contact's Activity tab](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/salesforce-activity.png) ## 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 1. [Sign in to Userflow](https://userflow.com/app) and use the company and environment menu in the top-right corner to pick the environment you want to connect. 2. Go to **Settings → Integrations** and click **Add integration**. 3. Find and click **Salesforce** in the list. 4. Click **Add Salesforce**. If you don't see it, the Salesforce integration may not be included in your plan. Check your [billing settings](https://app.userflow.com/app/_/settings/billing). 5. Click **Connect with Salesforce** and, in the popup, pick the Salesforce account to connect to this environment. 6. Click **Set up a new mapping between Salesforce and Userflow objects**. ![Set up a new mapping between Salesforce and Userflow objects button](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-add-object-mapping-button(1).png) 1. Pick the Salesforce object type and the Userflow object type, for example Salesforce contacts and Userflow users, and click **Continue**. ![Choosing the Salesforce and Userflow object types for a mapping](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-new-object-mapping(1).png) 1. 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 same `companyId`. 2. 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. 3. 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. 4. To post Userflow events to the **Activity** tab in Salesforce, turn **Stream events** on. Only some Salesforce objects can receive events. 5. Click **Save mapping**. ![Object mapping settings with Save mapping button](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-edit-object-mapping(1).png) 1. 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. ![Run full sync button for the Salesforce integration](https://cdn.us.document360.io/9697557a-eb5d-476f-9b09-062b0f7bdcbd/Images/Documentation/userflow-run-full-sync.png) 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? 1. Open the Salesforce integration in **Settings → Integrations**. 2. Click the three-dot button in the top right. 3. Click **Disconnect**. Event streaming and field sync stop immediately. ## Related articles - [Userflow-generated events](https://help.userflow.com/docs/userflow-generated-events) - [How to set up your Adoption Agent in minutes](https://help.userflow.com/docs/ai-assistant) - [HubSpot integration](https://help.userflow.com/docs/hubspot): works the same way, with object mappings - [Configuring companies](https://help.userflow.com/docs/companies) - [Integrations](https://help.userflow.com/docs/integration-old) A persistent list of tasks or items that users can follow to ensure completion of techniques, often used for onboarding, setup, or feature adoption.