Salesforce Integration
Sync recovery data with Salesforce for enterprise CRM workflows and reporting.
LostChurn integrates with Salesforce to sync customer and recovery data into your org. Contacts, Accounts, Opportunities, and custom objects are kept in sync so your sales and success teams have full visibility into payment recovery.
Prerequisites
- A Salesforce org (any edition: Essentials, Professional, Enterprise, or Unlimited)
- System Administrator profile or a user with "Manage Connected Apps" permission
- A LostChurn account with at least one active payment processor connected
LostChurn supports both Production and Sandbox Salesforce orgs. Choose your environment when connecting.
Connection Steps
OAuth Setup
- In your LostChurn dashboard, navigate to Settings > CRM.
- Click Connect Salesforce.
- Select your environment: Production or Sandbox.
- You will be redirected to Salesforce's OAuth login page. Sign in with your admin credentials.
- Review the requested permissions and click Allow.
- You are redirected back to LostChurn with a confirmation showing your Salesforce org ID and org name.
LostChurn registers as a Connected App in your Salesforce org. The following OAuth scopes are requested:
api— REST API access for CRUD operationsrefresh_token— offline access for background synccustom_permissions— access to custom objects
What Gets Synced
Contacts
LostChurn syncs customer data to Salesforce Contacts, matched by email address.
| LostChurn Field | Salesforce Field | Direction |
|---|---|---|
| Customer email | Email | Push |
| Customer name | FirstName / LastName | Push |
| Monthly recurring revenue | LostChurn_MRR__c (custom) | Push |
| Recovery count | LostChurn_Recovery_Count__c (custom) | Push |
| Churn risk score | LostChurn_Churn_Risk__c (custom) | Push |
| LostChurn customer ID | LostChurn_ID__c (custom) | Push |
Accounts
If a customer's email domain matches an existing Account, LostChurn links the Contact to that Account. Otherwise, a new Account is created using the domain name.
Opportunities
Successful recoveries create Opportunities in Salesforce:
- Record Type: Recovery
- Name:
Recovery - {customer_email} - {date} - Amount: Recovered payment amount
- Stage mapping:
- Recovery Started → Prospecting
- Retry In Progress → Negotiation/Review
- Recovery Succeeded → Closed Won
- Recovery Exhausted → Closed Lost
- Close Date: Set to the recovery completion date
Custom Object: LostChurn_Recovery__c
LostChurn installs a custom object to store detailed recovery data:
| Field | API Name | Type |
|---|---|---|
| Recovery ID | Recovery_ID__c | Text (External ID) |
| Status | Status__c | Picklist |
| Decline Code | Decline_Code__c | Text |
| Decline Category | Decline_Category__c | Text |
| Retry Count | Retry_Count__c | Number |
| Recovered Amount | Recovered_Amount__c | Currency |
| Started At | Started_At__c | DateTime |
| Completed At | Completed_At__c | DateTime |
| Contact | Contact__c | Lookup(Contact) |
| Opportunity | Opportunity__c | Lookup(Opportunity) |
This object is created automatically when you connect Salesforce. You can click Install Custom Objects in Settings if it was not created during initial setup.
Platform Events
LostChurn publishes Salesforce Platform Events (LostChurn_Recovery_Event__e) for real-time triggers. Use these in Salesforce Flows, Process Builder, or Apex triggers:
Recovery_ID__c— The LostChurn recovery IDEvent_Type__c— One of:started,succeeded,failed,exhaustedCustomer_Email__c— The customer's email addressAmount__c— The payment amountDecline_Code__c— The decline reason code
Sync Behavior
Event-Driven Sync
Updates are pushed to Salesforce in real time as recovery events occur. Salesforce API calls are batched when multiple events occur within a short window to optimize API usage.
Batch Sync
Trigger a full sync from Settings > CRM > Salesforce > Re-sync All. For orgs with large data volumes, LostChurn uses the Salesforce Bulk API 2.0 to process records efficiently.
Conflict Resolution
- Recovery fields: LostChurn always wins (MRR, recovery count, churn risk)
- Sales fields: Salesforce always wins (Owner, Stage overrides, custom sales fields)
- Contact fields: Configurable per-field in Settings > CRM > Salesforce > Field Mapping
API Limits
LostChurn is designed to work within Salesforce's API limits:
| Salesforce Edition | Daily API Limit | LostChurn Usage |
|---|---|---|
| Essentials | 15,000 | Batched to minimize calls |
| Professional | 75,000 | Batched to minimize calls |
| Enterprise | 150,000 | Batched to minimize calls |
| Unlimited | 300,000 | Batched to minimize calls |
LostChurn monitors your org's remaining API calls and throttles sync operations if you approach 80% of your daily limit. You can configure the throttle threshold in Settings.
Monitoring
View sync status at Settings > CRM > Salesforce:
- Org info: Org ID, org name, environment (Production/Sandbox)
- Last sync: Timestamp of the most recent successful sync
- Records synced: Contacts, Opportunities, and Recovery records synced
- API usage: Current API call count vs. daily limit
- Errors: Failed syncs with error details and retry options
Disconnecting
- Go to Settings > CRM > Salesforce.
- Click Disconnect.
- Choose whether to:
- Keep custom fields and objects in Salesforce
- Remove all LostChurn custom metadata
- Confirm the disconnection.
Removing custom objects will delete all LostChurn_Recovery__c records in your Salesforce org. This action cannot be undone.
Troubleshooting
"INVALID_SESSION_ID" error
Your Salesforce session has expired. Go to Settings > CRM > Salesforce and click Reconnect to re-authorize.
Custom object not created
- Go to Settings > CRM > Salesforce
- Click Install Custom Objects
- Ensure the connecting user has "Customize Application" permission
Duplicate Contacts
LostChurn matches contacts by email. If you have duplicate contacts in Salesforce with the same email, LostChurn updates the first match returned by Salesforce. Consider using Salesforce's built-in duplicate management rules to merge duplicates.
Next Steps
- HubSpot Integration — alternative CRM integration
- Zapier Integration — connect LostChurn to 6,000+ apps
- Outbound Webhooks — build custom integrations