// Integrations

Salesforce Integration

Connect Salesforce to sync contacts, trigger sequences from Closed Won events, and push scores back

3 min read
Updated March 18, 2026
integrationssalesforcecrmautomation

Use Salesforce integration to import CRM contacts, optionally auto-trigger sequences when opportunities move to Closed Won, and push survey scores back into Salesforce fields.

01

Core Capabilities

  • OAuth connection with PKCE
  • Contact sync from Salesforce into demeterrr
  • Manual queue triggering for synced contacts
  • Auto-triggering on Closed Won webhook events
  • Score pushback field mapping (NPS, CSAT, Last Survey Date)
02

Connect Salesforce

  1. Go to Settings > Integrations.
  2. Click Connect Salesforce.
  3. Complete OAuth in Salesforce.
  4. Return to demeterrr and confirm Connected status.

After connection, open Configure on the Salesforce card to tune behavior.

03

Configure Trigger Modes

In /settings/integrations/salesforce, set:

  • manual: Trigger only from the manual queue
  • auto: Trigger from Closed Won webhook events
  • both: Enable auto triggers and manual queue

When auto or both is enabled, choose the sequence that should run.

04

Manual Queue Workflow

The queue lists Salesforce-linked contacts that have not been triggered yet.

  1. Select one or more contacts.
  2. Select a sequence.
  3. Click Trigger.

The system creates sendings and dispatches them through the sequence runtime.

05

Salesforce Survey Button (No Dashboard)

You can let Salesforce users trigger demeterrr surveys directly from Salesforce with a button + Flow.

  1. In demeterrr, create an API key with scope sequences:execute.
  2. In Salesforce, create a Named Credential (for example Demeterrr_API) pointing to your demeterrr app URL.
  3. Store the API key in the Named Credential auth header (Authorization: Bearer dem_...).
  4. Add an Apex invocable action that calls:

POST /api/v1/sequences/:id/execute

  1. Build a Flow that passes contact fields (email required) into that Apex action.
  2. Add a Quick Action button to your page layout (Opportunity/Contact/etc.).

This lets users send surveys without opening the demeterrr dashboard.

06

Score Pushback Field Mapping

You can map:

  • NPS score field (default NPS_Score__c)
  • CSAT score field (default CSAT_Score__c)
  • Last survey date field (default Last_Survey_Date__c)

Use Test Fields before saving to confirm the custom fields exist in your Salesforce org.

07

Webhook Security

For auto-trigger mode, webhook auth supports:

  • Organization-specific webhook secret stored in Salesforce config
  • Global SALESFORCE_WEBHOOK_SECRET environment fallback

Send the secret as:

  • Header: x-salesforce-webhook-secret (or x-webhook-secret)
  • Query param: token (or secret)
08

Manual Sync and Disconnect

From the Salesforce card in Integrations:

  • Sync Now triggers contact sync
  • Disconnect stops sync and trigger behavior
09

Troubleshooting

OAuth setup error

Verify these environment variables:

  • SALESFORCE_CLIENT_ID
  • SALESFORCE_CLIENT_SECRET

Callback state errors

If redirected with a Salesforce state error, reconnect with a fresh session and avoid stale tabs.

Webhook events are ignored

Check:

  • Trigger mode is auto or both
  • Sequence is selected in Salesforce config
  • Webhook secret is correctly set and passed

Was this article helpful?

Let us know if you found this article helpful or if you need more information.

Take Control Of Your Reputation. Take Control Of Your Reputation. Take Control Of Your Reputation. Take Control Of Your Reputation.

Join hundreds of businesses already using demeterrr to collect feedback, boost reviews, and grow faster.

Start Your Trial