Suggested answer

Synchronous callout limits: 100 HTTP callouts per transaction, 10 seconds per callout timeout (configurable up to 120 seconds), 6 MB response body per callout, 12 MB total heap. Callouts cannot be made after DML in the same synchronous context (without using mixed-DML patterns).

Async workarounds:
1. Queueable Apex: Enqueue a Queueable job from a trigger (after DML) to perform the callout asynchronously. Queueable jobs allow callouts and can be chained.
2. @future(callout=true): Simple async callout method. Cannot accept non-primitive parameters.
3. Batch Apex: Use Database.AllowsCallouts interface to make callouts in the execute() method (one callout per batch chunk).

Best practice: For high-volume callouts, use Queueable chaining or Platform Events to trigger an external worker, rather than making hundreds of synchronous callouts.

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.