Skip to content

Salesforce

Connect Salesforce to bring accounts, contacts, opportunities, contracts, and custom fields into Sonora. Use this guide to choose what to sync and start your first import.

Object Notes
Accounts Account record becomes a Sonora customer; ID maps to the customer’s external ID
Contacts Contact records map into People Graph. Synced by default; contact filters can narrow the import
Opportunities Stage, amount, close date, owner
Contracts Contract dates and terms, used for renewal dates and active-customer rules. Skipped with a warning when unavailable unless your settings require them
Account team members Optional. Syncs each account’s Salesforce account team as its Sonora account team
Custom fields on Account, Opportunity, and Contract Mapped during setup; queryable in chat and Canvas

Sonora syncs read-only by default. If you opt into write-back, the enrichment values you choose push to fields you pick on the Account record.

You’ll need permission to manage integrations in Sonora and a Salesforce user with API Enabled and read access to the objects and fields you want to sync. We recommend a dedicated Salesforce integration user. For contracts and account teams, that user also needs access to those objects.

For an OAuth connection, ask your Salesforce admin to install the Sonora package. If your organization uses IP restrictions, ask them to allow the addresses on the IP allowlist page.

Choose an environment and connection method

Section titled “Choose an environment and connection method”

Choose Production to connect your live Salesforce org or Sandbox to test with a sandbox. For OAuth connections, you cannot change the environment after connecting; contact your Sonora team if you need to change it.

The standard OAuth connection uses the Sonora package. If your organization requires its own Salesforce External Client App, follow the manual connection steps, then return to configure the import.

  1. In Sonora, go to Settings → Integrations and open Salesforce.
  2. Under Connection, select OAuth and choose Production or Sandbox.
  3. Click Install Sonora package. Ask your Salesforce admin to sign in and complete the installation.
  4. Back in Sonora, click Connect Salesforce and sign in as the Salesforce integration user.
  5. Review the requested access and click Allow. Sonora requests API access and permission to keep the connection active between syncs.
  6. Confirm that Sonora shows Salesforce connection active.

The Salesforce authorization page expires after 10 minutes. If it expires, click Connect Salesforce again.

After connecting, configure the import in the order shown on the Salesforce card:

  1. Data Mapping: Choose the Salesforce fields for the customer attributes you use, such as ARR, owner, and stage. Add any other fields you want to fetch. Start with the recommended fields and check the customer field reference for the defaults.
  2. Account Filters: Choose which accounts to bring into Sonora. You can combine conditions to match your criteria.
  3. Import Rules: Choose which contract types count as active for renewals and, if needed, require an account’s latest closed opportunity to be won.
  4. Contacts: Choose the fields used for people and add optional contact filters. These filters apply alongside your account filters.
  5. Account Team: If you want to sync account team members, turn on account team sync and choose any roles to include.

Contact imports have their own result in Sync history. If Contacts fail, they retry separately while Account imports continue.

Review the account and contact counts shown in the configuration, then click Test Connection. When you’re ready, open the Save menu and choose Save & sync to start the first import. You can follow its progress on the connection card. Save only saves the settings without starting a sync.

The first import brings in records that pass your filters. Later scheduled syncs pick up changes. You can edit your mappings and filters after setup; changes take effect on a later sync or backfill.

In Contacts → Contact mapping, choose a readable text field on Salesforce Contact or a related record for each person attribute, such as Contact.Account.Name or Contact.Owner.Email. The defaults are:

Sonora field Salesforce source
First name Contact.FirstName
Last name Contact.LastName
Email Contact.Email — required and fixed
Phone Contact.Phone
Title Contact.Title
LinkedIn URL Not imported until you add a mapping

Open a related-record field in the source picker to browse its fields. You can follow up to five relationships and use Back to return. When a relationship can point to different record types, only compatible fields available on every type are offered. Salesforce also checks the selected path when you save. An empty related record leaves standard person values unchanged.

Remove an optional mapping with its × button. Its row disappears and existing person values remain. To add it again, select a Salesforce source and then an available Sonora destination in the empty row. Complete or clear that row before saving. Use default in a source picker restores that field’s default mapping.

Contact sync fills missing standard person values and preserves existing ones. If a mapped value exceeds the person field’s length limit, Sonora skips that value and imports the rest of the person. Mapping changes apply on the next Contact sync, including Contacts that have not changed in Salesforce. Bare linkedin.com and www.linkedin.com values are imported with https:// added. Malformed scheme forms such as https:example.com are skipped. Email always comes from Contact.Email; it cannot be remapped or removed. If a selected source becomes unavailable, restore its Salesforce permissions or choose another source. Account imports continue while Contacts retry.

To map a People custom field, choose a Salesforce source in the empty row, then select an existing custom destination or create one. These values refresh on each sync, while explicit manual overrides stay protected. A blank Salesforce value clears the synced value. If multiple Salesforce Contacts match one person, the most recently modified eligible Contact wins, with Contact ID breaking ties. An invalid value from that Contact keeps the current value. If that Contact later stops qualifying, the newest remaining eligible Contact takes over. Removing a mapping keeps the person’s existing value. Mapped date/time values with a timezone offset are normalized to UTC without changing the instant they represent.

If Salesforce fields cannot be loaded, you can still save unrelated settings changes while keeping your mappings unchanged, or turn Contact sync off. Changing mappings, changing authentication or turning Contact sync back on requires Salesforce validation.

Check these customer attributes in Data Mapping. The defaults may already work for your team; change a mapping when your Salesforce data uses a different field or definition.

  • Customer Name, Email Domains, and Website URL help Sonora identify your customers and associate activity with them. Use the domains your customers use for email: they may differ from their website domain. Shared or conflicting domains can make matching ambiguous.
  • Owner Name and Owner Email identify the person responsible for an account and help route work. The owner’s email should match a Sonora workspace user.
  • Renewal Date supports renewal reminders, workflow conditions, and lifecycle enrichments.
  • ARR helps prioritize accounts and target workflows by value. Confirm the field reflects your team’s definition of annual recurring revenue.
  • Tier and Stage help group customers for workflows, health assessments, and enrichments. Tier has no default Salesforce source; check that the default Stage source matches your team’s definition.

Add contract start date, contract length, summary, or custom fields when they support your team’s use cases. To bring in contacts, check that Salesforce Contacts have accurate email addresses and account associations. A Contact must pass your filters and its Account must already link to a Sonora customer. Both 15- and 18-character Account IDs are recognized. Archived customers remain eligible, with archive state preserved. Contacts with missing or conflicting customer links, or people already assigned to a different customer, are skipped and reported in Sync history. Existing people are kept.

The Contact preview counts eligible Salesforce records linked to imported customers. Duplicate Contacts, existing customer assignments and sync mode can reduce the number of people imported.

If a customer is still being created when Contacts run, its Contacts can import on the next scheduled or manual sync.

If the preview cannot count records, it shows guidance for recognized Salesforce field-access, filter or query-size errors. Correct the indicated settings or permissions, then retry the preview.

To keep a record of your mappings, select Download CSV in Data Mapping. The file lists all standard Sonora fields and mapped custom fields, their Salesforce sources, descriptions, and whether they are standard or custom. An unmapped standard field has a blank Salesforce field. The file includes unsaved changes; custom descriptions appear when available. Default sources can be combined or use fallback records.

The table shows the default source for each standard customer attribute when no mapping overrides it. Your saved mappings, disabled fields, Salesforce permissions, and import filters determine what your connection actually syncs. Salesforce API field names appear in code formatting.

Sonora attribute What it represents Default Salesforce source
Customer Name Name of the customer Account.Name
ARR Annual recurring revenue Opportunity.Amount, annualized using a contract term when available
Owner Name Name of the customer owner Account.Owner.Name
Owner Email Email used to link the customer to a Sonora user Account.Owner.Email
Renewal Date Customer’s renewal date Contract.EndDate
Stage Customer lifecycle stage Opportunity.Type; known values are normalized
Contract Length (days) Length of the customer’s contract in days Days between Contract.StartDate and Contract.EndDate
Contract Start Date Start date of the customer’s contract Contract.StartDate
Email Domains Domains associated with the customer Domain extracted from Account.Website
Summary Description of the customer Account.Description
Tier Customer’s tier or segment No default Salesforce source
Website URL Customer’s website Account.Website

When an account has multiple opportunities, Sonora prefers a won opportunity, then the one with the latest close date. For contracts, it prefers the statuses Activated, In Effect, In-Progress, and Signed, then the latest end date. If neither contract being compared has an end date, Sonora compares start dates. Default ARR uses the selected opportunity’s amount; if that amount is missing, Sonora looks for another opportunity with an amount. When a valid contract term in months is available, Sonora calculates ARR as amount × 12 ÷ term; otherwise it uses the amount unchanged. A mapped ARR value is used directly. Check the result against your team’s definition of ARR before relying on it.

You can also map custom fields from Account, Opportunity, and Contract. A source field being imported does not by itself mean it populates a standard customer attribute; check the mapping in Data mapping. The Salesforce integration user must be able to read each source field.

Choose Standard to match all conditions (AND) or any condition (OR). Choose Custom to group numbered conditions, for example ((1 OR 2 OR (3 AND 4) OR 5) AND 6). Parentheses group conditions; AND takes precedence over OR. Every condition must appear in the expression. Multiple values in an “Is any of” row remain alternatives within that condition.

Condition numbers stay with their rows when you reorder them. If you remove a referenced condition, correct the expression before saving. Existing filters keep their current behavior until you edit the account logic. Account-filter edits cannot be saved while a sync is queued or running.

Preview counts and Test Connection use your current valid draft. Save only stores it; the next sync reconciles eligibility. Narrowing filters can archive excluded customers and their active contacts. Widening filters can restore customers archived by the system and contacts archived with them, and fetch newly eligible related records even if those records have not changed in Salesforce. Manual archives stay archived. Contact filters and import rules still apply separately.

If your security policy doesn’t allow installing third-party packages, choose Manual to connect through an External Client App that you create and own. Sonora then signs in with the client credentials flow instead of a user authorization. Skip the Sonora package installation for this method.

  1. In Salesforce, go to Setup.
  2. In Quick Find, search for External Client App Manager.
  3. Open External Client App Manager.
  4. Click New External Client App.
  5. Fill in the basic information:
    • External Client App Name: Sonora Integration
    • API Name: Sonora_Integration
    • Contact Email: your admin email
    • Distribution State: Local
  1. Expand API (Enable OAuth Settings).
  2. Select Enable OAuth.
  3. Enter the OAuth callback value:
    • Callback URL: https://login.salesforce.com/services/oauth2/success
    • The client credentials flow doesn’t redirect, so Sonora never uses this URL. Salesforce requires a value.
  4. Select the required OAuth scopes:
    • api — Manage user data via APIs
  5. Click Create.

After you click Create, Salesforce redirects you to the External Client App detail page.

  1. Open the Settings tab.
  2. Click Edit.
  3. Expand OAuth Settings.
  4. In Flow Enablement, select Enable Client Credentials Flow.
  5. Save the settings.

4. Assign the integration user in policies

Section titled “4. Assign the integration user in policies”

Salesforce requires a user for client credentials calls to run as.

  1. In External Client App Manager, open the External Client App.
  2. Open the Policies tab.
  3. Click Edit.
  4. Expand OAuth Policies.
  5. In OAuth Flows and External Client App Enhancements, select Enable Client Credentials Flow.
  6. In Run As (Username), enter the Salesforce username for the integration user.
  7. Save the policies.
  8. Make sure that user has API access and the object and field permissions Sonora needs.
  1. In Salesforce, go to Setup → External Client App Manager.
  2. Open the Sonora External Client App.
  3. Open the Settings tab.
  4. Expand OAuth Settings.
  5. Click Consumer Key and Secret. Salesforce opens a classic setup page or a new tab with the app credentials.
  6. Copy the Consumer Key and Consumer Secret.
  1. In Sonora, go to Settings → Integrations and open the Salesforce card.
  2. Under Connection, select Manual.
  3. Enter:
    • Environment: production, or sandbox for a sandbox org
    • Instance URL: your org’s My Domain URL, for example https://yourcompany.my.salesforce.com
    • Client ID: the Consumer Key
    • Client Secret: the Consumer Secret
  4. Click Test Connection.
  5. Open the Save menu and choose Save only. Then return to configure the import.

Sonora saves the selected connection method and uses only that method. Both credential sets are retained, so you can switch back without reconnecting. If the selected method fails, sync stops with an authentication error; Sonora never tries the other method automatically.

Save authentication changes after active imports finish. The next run performs a full Account resync. Save a changed connection method before loading field metadata or preview counts; Test Connection checks the method currently selected in the form.

“Salesforce authorization was cancelled or denied.” The user clicked Deny on the Salesforce consent page, or an admin policy blocked them from authorizing the Sonora app. Check that the user is allowed to use the Sonora External Client App, then click Connect Salesforce again.

“Salesforce authorization session expired.” More than 10 minutes passed on the Salesforce sign-in page, or the sign-in started in a different browser tab or session. Click Connect Salesforce again and finish within the same browser.

Syncs stop with authentication errors after working. The authorization was revoked, the integration user was deactivated or lost API access, or your org’s refresh token policy expired the token. Click Reconnect Salesforce and sign in again. For a manual connection, check that the Client ID and Client Secret are correct, the instance URL matches the org, Client Credentials Flow is enabled, and the External Client App has a Run As user.

“insufficient access rights” during sync. The connected user’s profile doesn’t have read access to the object that errored. Check field-level security and object permissions in Salesforce — the most common gap is on a custom field added after the integration was set up.

Contracts were skipped. When your settings do not require Contracts, sync can continue without access to them. Existing Contract data is kept. Restore access and run a full resync to refresh Contracts changed while access was unavailable.

Records aren’t showing up that should. Check the inclusion filters in the Salesforce card configuration — the most common cause is a record type or sharing rule that excludes the records you expected.

API limits. Sonora respects the org’s bulk and REST API quotas. During heavy initial imports the sync paces itself; you’ll see throughput drop temporarily and resume when the org’s limit window resets.

To sync as a different Salesforce user, click Reconnect Salesforce and sign in as that user. Your field mappings, filters, and import rules are kept.

From Settings → Integrations, open the Salesforce card and disconnect or disable the integration.

To revoke access from inside Salesforce:

  • Package connection: in Setup → Connected Apps OAuth Usage, find Sonora and click Revoke for the integration user, or uninstall the Sonora package.
  • Manual connection: disable the External Client App, change its Run As user, or rotate its Consumer Secret.

Revoking the selected method stops its syncs; Sonora does not switch to retained inactive credentials. To remove all access, disconnect the integration in Sonora or revoke both apps.