SLM Integration Design 3 — Questions and Answers
Question 1: A nightly batch job must sync 500,000 loyalty transaction records from an external data warehouse into Salesforce. Which integration approach is most appropriate?
- Real-time REST API callouts from Apex triggers
- Bulk API with batch data synchronization pattern (Correct answer)
- Platform Events streaming
- Salesforce Connect with OData adapter
Correct answer: Bulk API with batch data synchronization pattern
The Bulk API is optimized for high-volume data loads and the batch synchronization pattern is ideal for nightly large-scale data transfers.
Question 2: Which Salesforce Loyalty Management API endpoint is used by an external POS system to accrue points for a member transaction?
- /services/data/vXX.0/loyalty-programs/{programName}/members/{membershipNumber}/transaction-journals (Correct answer)
- /services/data/vXX.0/loyalty-programs/{programName}/ledger
- /services/data/vXX.0/commerce/loyalty/accrual
- /services/data/vXX.0/loyalty/v1/pointsCredit
Correct answer: /services/data/vXX.0/loyalty-programs/{programName}/members/{membershipNumber}/transaction-journals
The Transaction Journals resource under a specific member and program is the standard endpoint for recording point accrual events via the Loyalty Management API.
Question 3: An integration must handle cases where the external loyalty partner API is temporarily unavailable. Which Apex pattern best addresses this?
- Synchronous callout with no error handling
- Exponential backoff retry logic using Queueable Apex (Correct answer)
- Increasing the callout timeout to 120 seconds
- Storing the request in a Platform Cache
Correct answer: Exponential backoff retry logic using Queueable Apex
Queueable Apex supports chaining and retry logic, and exponential backoff prevents overwhelming the external system during recovery.
Question 4: Change Data Capture (CDC) for LoyaltyMemberCurrency records is enabled. What can an external system use to receive these change notifications?
- Polling the REST API every minute
- Subscribing to the /data/LoyaltyMemberCurrencyChangeEvent channel via CometD (Correct answer)
- Outbound Message workflows
- Scheduled reports emailed to an API endpoint
Correct answer: Subscribing to the /data/LoyaltyMemberCurrencyChangeEvent channel via CometD
CDC publishes change events to a channel that external systems subscribe to via CometD or Bayeux protocol, enabling near real-time data sync.
Question 5: A loyalty integration uses MuleSoft as the middleware layer. What is the primary architectural benefit of this approach over direct Salesforce-to-external API calls?
- MuleSoft eliminates the need for Named Credentials
- It provides a centralized integration layer for protocol transformation, routing, and error handling (Correct answer)
- MuleSoft allows bypassing Salesforce governor limits
- It removes the need for API versioning
Correct answer: It provides a centralized integration layer for protocol transformation, routing, and error handling
MuleSoft acts as an ESB/iPaaS layer providing centralized transformation, orchestration, and error handling that decouples Salesforce from external systems.
Question 6: What is the maximum number of callouts allowed within a single Salesforce transaction, which affects loyalty integration design?
- 10 callouts per transaction
- 50 callouts per transaction
- 100 callouts per transaction (Correct answer)
- 250 callouts per transaction
Correct answer: 100 callouts per transaction
Salesforce enforces a limit of 100 callouts per transaction, which must be considered when designing bulk loyalty point accrual integrations.
Question 7: When designing a loyalty integration that calls out from an Apex trigger, which critical restriction must the architect consider?
- Triggers cannot use Named Credentials
- Callouts cannot be made from triggers that fire synchronously within a DML operation (Correct answer)
- Trigger callouts are limited to 5 per object
- Triggers can only call SOAP services, not REST
Correct answer: Callouts cannot be made from triggers that fire synchronously within a DML operation
Salesforce does not allow HTTP callouts directly from synchronous Apex triggers; instead, @future or Queueable Apex must be used for asynchronous callouts.
A nightly batch job must sync 500,000 loyalty transaction records from an external data warehouse into Salesforce.
Which integration approach is most appropriate?