Salesforce & Enterprise Connectors Β· Senior / Architect

SAP + Salesforce End-to-End Integration β€” Interview Questions & Scenarios (2026)

Bidirectional sync, infinite loop prevention, SAP downtime resiliency, and dead-letter queues.

πŸ”„ SAP + Salesforce End-to-End Integration

Bidirectional sync, infinite loop prevention, SAP downtime resiliency, and dead-letter queues.

Q1 [SENIOR / ARCHITECT] ⏱️ 1 min read Module F

Describe a full Salesforce + SAP integration end to end.

⚑ Self-Test Mode Ready
βœ“ ANSWER

Scenario: Salesforce Opportunity Closed-Won β†’ SAP Sales Order created β†’ SAP Order ID written

back to Salesforce.

πŸ“‹ STEP-BY-STEP FLOW

1.Salesforce fires Opportunity_Closed_Won__e Platform Event when Opportunity stage changes
2.MuleSoft XAPI subscribes to the event (replayId=-2 on restart)
3.SOQL query for full Opportunity details (Account, LineItems, Contact)
4.Check ObjectStore for Opportunity ID β€” if already processed, skip (idempotency)
5.DataWeave: Salesforce JSON β†’ SAP BAPI XML (BAPI_SALESORDER_CREATEFROMDAT2)
6.SAP SAPI creates Sales Order via HTTP SOAP call to SAP
7.SAP returns Order ID β†’ MuleSoft writes SAP_Order_ID__c back to Salesforce via Update
8.Publish SAP_Order_Created__e confirmation event to Salesforce

⚠ ERROR HANDLING

SAP failure β†’ On Error Continue β†’ update Opportunity with SAP_Error_Status__c = 'FAILED'

Salesforce write-back failure β†’ log SAP Order ID to S3 reconciliation table for retry job

Max retries exceeded β†’ Anypoint Alert to ops team + DLQ message

Q2 [SENIOR / ARCHITECT] ⏱️ 1 min read Module F

How do you prevent infinite loops in bidirectional Salesforce↔SAP sync?

⚑ Self-Test Mode Ready
βœ“ ANSWER

Challenge: updating SAP triggers a Salesforce CDC event which triggers SAP update again β€” infinite

loop.

Solution 1 β€” Source System Flag: Add SAP_Last_Updated__c timestamp field to Salesforce. When

MuleSoft updates SF from SAP, set this field = NOW. In CDC subscriber, check: if

SAP_Last_Updated__c was updated within last 5 seconds β†’ skip (it was a SAP-originated update).

Solution 2 β€” Dedicated Integration User: Use a dedicated Salesforce user

(mulesoft_integration@enterprise.com) for all SAP-originated updates. In CDC subscriber, skip events where

commitUser == 'mulesoft_integration@enterprise.com' . This breaks the loop at the event source.

Q3 [SENIOR / ARCHITECT] ⏱️ 1 min read Module F

How do you handle SAP being down when a Platform Event arrives?

⚑ Self-Test Mode Ready
βœ“ ANSWER

Synchronous flows: Until Successful with 3 retries + 30s delay. After exhaustion β†’ On Error Continue

β†’ update Salesforce with SAP_Error_Status__c = 'FAILED' β†’ Anypoint Alert to ops team.

Asynchronous flows (preferred): Publish the Platform Event payload to Anypoint MQ β€” messages

persist cleanly (default 4–7 day retention, configurable up to 14 days) and drain reliably when SAP recovers. MQ consumer checks ObjectStore

idempotency key before each attempt to prevent duplicate SAP orders on retry.

🎯🎯 Interview Pitch - Say It Like This (30 Sec)
"We implement event-driven architectures between Salesforce and MuleSoft using Platform Events and Change Data Capture. In MuleSoft, we subscribe using the Replay Channel Listener backed by persistent ObjectStore storage to save the Replay ID, guaranteeing at-least-once delivery and zero event loss even during downstream system downtime or planned maintenance."
πŸ’ΌπŸ’Ό Real-Time Project Example

Project: Insurance β€” Real-Time Order Status Notification.

Problem: Traditional scheduled polling every 2 minutes was too slow for customer notifications and wasted 70,000 API calls daily.

What I Did: Subscribed to Salesforce `Order_Status_Event__e` Platform Events via MuleSoft Replay Channel Listener, routing events through Anypoint MQ for async processing.

Result: Achieved end-to-end event notification latency of under 400ms while eliminating 100% of polling API calls.

← AWS Integration Patterns (S3, SQS, DynamoDScatter-Gather Router Deep Dive β†’