Salesforce Decode
Salesforcedecode
Back to questions
IntegrationArchitect (Hardest)compensationrollbackerp

Design compensating rollback when ERP succeeds but Salesforce update fails

Real World Scenario

SAP creates sales order successfully; Salesforce Opportunity update fails leaving SAP order orphaned without CRM link.

Expected Answer

• Saga compensation: SAP order cancel API on Salesforce failure • Staging status SAP_Created SF_Pending SF_Complete SF_Compensated • Manual ops queue if automatic compensation fails • Idempotent SAP create with external idempotency key • Retry Salesforce update before triggering compensation • Reconciliation report orphaned SAP orders nightly • Alert compensation rate indicating systemic issue

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Direct answer: Saga compensation: SAP order cancel API on Salesforce failure Also consider: Staging status SAP_Created SF_Pending SF_Complete SF_Compensated In practice: Manual ops queue if automatic compensation fails Document the decision in an ADR and align with enterprise standards.

Architect Perspective

Cross-system success requires compensation—hope Salesforce succeeds after SAP is not architecture.