Salesforce Decode
Salesforcedecode
Back to questions
IntegrationIntermediatecomposite-apirestbatching

Implement composite and batch composite API patterns

Real World Scenario

Mobile app makes 12 sequential REST calls loading account dashboard causing poor UX on 3G networks.

Expected Answer

• Composite API bundling up to 25 dependent or independent subrequests • Batch composite for up to 25 separate composite requests in one call • Reference IDs linking subresponses in same composite transaction • Graph API alternative for UI-shaped queries reducing round trips • Error handling per subrequest partial success semantics • Cache static subresources client-side reducing repeat composite calls • Monitor composite execution time staying under mobile timeout budget

Follow-Up Questions & Answers

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

Main difference: use case and scale. Composite API bundling up to 25 dependent or independent subrequests. Batch composite for up to 25 separate composite requests in one call. Pick based on your integration pattern and team capability. Composite API is free performance win for chatty mobile clients—architects standardize dashboard loads as single composite. Balance speed of delivery with maintainability.

Architect Perspective

Composite API is free performance win for chatty mobile clients—architects standardize dashboard loads as single composite.