INT-Q02โ˜… Must-prepareDesign AdvancedIntegration & data#architecture#integration

Design the integration between Salesforce and an ERP for customers, orders and invoices.

Your confidence:Not rated

Model answer

First agree ownership: ERP owns customer legal data, orders and invoices; Salesforce owns prospects, opportunities and service interactions.

FlowPatternMechanism
Customer master ERP โ†’ SalesforceBatch sync (+ near real time for new customers)Middleware upserts by ERP_Id__c via Bulk API 2.0 nightly; ERP events for urgent changes
New customer Salesforce โ†’ ERPFire-and-forget + callbackPlatform event โ†’ middleware โ†’ ERP; ERP number written back (remote call-in)
Price and stock checkRequest-replyNamed Credential callout via middleware, 3-second timeout, cached fallback
Order submissionFire-and-forgetPlatform event published after commit; status updates back as remote call-in
Invoices and payments historyData virtualization or summary syncExternal object for detail; nightly totals on Account

Cross-cutting: an External Client App with JWT bearer or client credentials for middleware's calls into Salesforce, least-privilege integration user; Named Credentials outbound; idempotency keys and external IDs everywhere; an integration log with correlation IDs; alerting on failures and backlog; and a field-ownership matrix so nobody (including AI agents) writes fields another system owns.

โœ” Key points to hit

โœ– Red-flag answers

  • Synchronous order creation from the UI
  • Copying all invoices into Salesforce by default
  • No external IDs

โ†ช Follow-ups

ERP is down for maintenance every Sunday. What changes?

Requests queue in middleware (or events are retained and replayed), the UI shows 'pending' statuses, request-reply lookups fall back to cached values with a timestamp, and no user has to re-key anything.

How do you trace one order across systems?

Carry a correlation ID from Salesforce through middleware into ERP and back, log it at every hop, and show it on the order record so support can search all logs by it.