Integrations & data flow
Use Salesforce upsert, source revisions, and reconciliation to keep subscription updates safe when billing retries a delivery.
Billing changes Everline’s first subscription from Active to Paused. Salesforce should reflect the new status without changing the Closed Won opportunity or sending a second customer notification when the delivery retries. Define who owns the fields, give the Salesforce row a durable key, and test how the job handles events that reach it late.
- BillingRevision 18 marks subscription sub_901 Paused.
- ConnectorMatch the verified Account and keep revision 18 when revision 17 arrives late.
- SalesforceUpsert the existing row and record its ID in the job results.
Write down the fields that cross the boundary
Billing owns the subscription identifier, status, annual amount, and end date. Salesforce owns the Account owner and Opportunity stage. The connector writes only billing-owned fields and the verified Account lookup referenced by the billing customer key. If that key returns no Account, save the exception with the billing IDs and wait for the steward. The sync should not guess a CRM record from a company name.
Upsert a record and reject stale values separately
Mark Billing_Subscription_Key__c as External ID and Unique. Use a stable value that distinguishes source instances, such as us-prod:sub_901. Salesforce REST upsert by External ID updates a matching record or creates one when the key is new. Bulk API 2.0 upsert uses the same external ID field for CSV batches. If the REST response reports multiple matches against a legacy non-unique key, reconcile the records before retrying.
An upsert still writes the payload you send. In the example, billing revision 18 says Paused and an older retry of revision 17 says Active. Process changes in order per key and compare an authoritative revision in the same write path. If the connector cannot guarantee that, use the event as a prompt to fetch current billing state and serialize writes for that subscription. A repeated key should update the same row. A late event must not restore an older status.
Use a job that meets the response time
Customer Success needs status within the hour, so a 15-minute incremental job is enough in this example. Use the billing provider’s supported cursor, retain it only after results are durably recorded, and reconcile open subscriptions nightly. For a Salesforce-to-warehouse path that needs near-real-time CRM changes, Salesforce Change Data Capture through Pub/Sub API can replay events within the 72-hour retention window. A replay ID is a stream position. If a saved position is outside retention or unavailable, reconcile from a trusted snapshot or change query before resuming.
Keep results by key so you can replay only what failed
| Delivery | Expected outcome | Operator action |
|---|---|---|
Revision 18 arrives for sub_901. | One Salesforce row now reads Paused. | Record the key, source revision and Salesforce ID. |
| Revision 18 is retried. | The same row stays Paused. | Record the repeat without opening a new exception. |
| Revision 17 arrives after revision 18. | The row stays Paused. | Log the stale payload or re-read the billing record. |
sub_902 has no verified Account match. | No CRM row is written to the wrong Account. | Ask the data steward to confirm the match, then replay this key. |
For Bulk API 2.0 jobs, retrieve the successful, failed and unprocessed row results. Compare the reported keys with the input before advancing the job checkpoint. Separate timeouts, which may merit a bounded retry, from validation or relationship failures that need repair. Use the subscription data model to decide which fields belong on the record and the automation guide to keep customer-facing follow-up separate from the sync.
Tools for this
The full stack →Keep reading
All guides →Object & data model
How the standard objects, record types, and custom fields fit together, plus the grain rules and relationship choices that decide whether reporting ever ties out.
ArchitectCPQ & quote-to-cash
How quotes, price books, approvals, and billing connect into one revenue chain, plus the config choices that decide whether a signed deal actually invoices correctly.
ArchitectAutomation architecture
How flows, triggers, and validation rules coexist without fighting, plus the order-of-execution and consolidation rules that keep automation from eating itself.