Integrations
Salesforce

Salesforce

Connect Salesforce to Customerscore.io to sync your accounts or contacts — and push scores, churn risk, and health data back to Salesforce so your whole team sees them where they work.

The integration uses a Salesforce Connected App with the OAuth 2.0 Client Credentials Flow. Setup is fully self-serve: once you finish the configuration, the first sync starts immediately.

Step 1: Create a Connected App in Salesforce

Customerscore.io authenticates with a Consumer Key and Consumer Secret from a Connected App (or External Client App) in your Salesforce org.

  1. In Salesforce, go to Setup → App Manager and click New Connected App
  2. Enter a name (e.g. Customerscore.io) and a contact email
  3. Check Enable OAuth Settings
    • Callback URL: enter https://login.salesforce.com/services/oauth2/callback — it's required by Salesforce but not used by this flow
    • Selected OAuth Scopes: add Manage user data via APIs (api)
  4. Check Enable Client Credentials Flow and save
  5. After saving, click Manage → Edit Policies and under Client Credentials Flow, set the Run As user, then save

Use a dedicated integration user as the Run As user. The user must have API Enabled and read access to the object you plan to sync (Account or Contact) and its fields. If you plan to push scores back to Salesforce, the user also needs edit access to the fields you'll write to.

Finally, get the credentials: in App Manager, open your app via View, then click Manage Consumer Details and copy the Consumer Key and Consumer Secret.

⚠️

Newly created Connected Apps can take a few minutes to become active in Salesforce. If the connection fails right after creating the app, wait a moment and try again.

Step 2: Connect in Customerscore.io

  1. In Customerscore.io, go to Settings → Providers
  2. Click Connect on the Salesforce card
  3. Enter:
    • Salesforce Domain — your My Domain host, e.g. acme.my.salesforce.com. You can find it in Salesforce under Setup → My Domain. Sandbox and developer orgs work too (e.g. acme--uat.sandbox.my.salesforce.com). Do not use login.salesforce.com.
    • Consumer Key and Consumer Secret from Step 1
  4. Click Connect

Customerscore.io verifies the credentials against your org right away. If the connection is rejected, double-check the domain, make sure the Client Credentials Flow is enabled on the Connected App, and that a Run As user is assigned.

Step 3: Configure the Integration

After a successful connection, you'll configure what gets synced:

  1. Customer entity — choose which Salesforce object represents a customer in Customerscore.io: Account or Contact
  2. External ID field — the Salesforce field used as the customer's External ID in Customerscore.io. Fields marked as External ID in Salesforce (and the record Id) are offered first. Records where this field is empty are skipped during sync.
  3. Days offset — the date the synced data is recorded under: 0 = current day, 1 = yesterday
⚠️

The entity type cannot be changed later. To switch from Accounts to Contacts (or vice versa), you'd need to disconnect and reconnect the integration.

Field Mapping

For each field mapping, you choose:

  • Salesforce field — the field on your Account or Contact object (left side)
  • Direction — the arrow in the middle: Inbound (Salesforce → Customerscore.io) or Outbound (Customerscore.io → Salesforce). Click the arrow to toggle it.
  • Customerscore.io property — the corresponding attribute or metric (right side). You can create a new property directly from the dropdown via Create new property.

You can map as many fields as needed in both directions.

Filter Conditions (Optional)

You can add filter conditions to sync only relevant records — for example, only Accounts of a certain type. All conditions are combined with AND: a record must match every condition to be synced. Available operators include equals, not equals, greater/less than, in/not in a list of values, and has/doesn't have a value.

Once you're done, click Confirm. The first sync starts immediately.

Syncing Data Back to Salesforce (Outbound)

In addition to importing data, Customerscore.io can push calculated scores and any custom attributes or metrics back to your Salesforce records. The following fields can be synced outbound:

Customerscore.io FieldDescription
Fit ScoreHow well a customer fits your ideal customer profile
Health ScoreOverall customer engagement and health
Churn RiskPredicted churn risk level
Upsell ScoreLikelihood the customer is ready for an upsell
Health DifferenceRecent change in the health score
ChurnedWhether the customer has churned (true/false)
Custom attributesAny customer attributes you have configured in Customerscore.io
Custom metricsAny custom metrics you track in Customerscore.io

Note that the calculated scores (Fit Score, Health Score, Churn Risk, Upsell Score, Health Difference) are available for outbound sync only — they cannot be mapped as inbound fields.

Prepare Salesforce Custom Fields

Before mapping outbound fields, create the corresponding custom fields on your Account or Contact object in Salesforce. Customerscore.io writes values directly to these fields.

  1. In Salesforce, go to Setup → Object Manager, open Account (or Contact), and select Fields & Relationships → New
  2. Create a field for each value you want to receive. Recommended setup:
FieldField type
Fit ScoreNumber
Health ScoreNumber
Churn RiskNumber
ChurnedCheckbox
  1. Make sure the Connected App's Run As user has edit access to these fields

Then, in the Customerscore.io field mapping, add a row for each field, select the Salesforce field on the left, set the direction to Outbound, and pick the Customerscore.io field on the right.

When Does Outbound Sync Run?

Outbound sync runs automatically after each data import cycle completes — every time Customerscore.io finishes processing your data and recalculating scores, the updated values are pushed to Salesforce shortly after. Both active customers and recently churned customers are included.

Sync Schedule & History

  • Data syncs from Salesforce automatically once a day, around 2:00 AM in your account's timezone
  • Each sync is a full snapshot of your Salesforce data — this is what allows Customerscore.io to reliably detect churned customers
  • You can trigger a manual sync anytime: open Manage on the Salesforce provider card and click Save & Sync now, or use Run sync now on the sync history page
  • Sync history — including records fetched, synced, and skipped — is available under Settings → Imports → Salesforce sync

Managing the Integration

Open Manage on the Salesforce provider card to change the external ID field, field mappings, and filter conditions at any time. The synced entity type and connected domain are fixed after setup.

Disconnecting Salesforce removes the integration, its sync history, and related synced data from Customerscore.io.