Handle long-running and asynchronous workflows initiated by agents
Real World Scenario
Customers ask the agent to process warranty replacements requiring warehouse verification and shipping label generation—a process taking 10–30 minutes. Chat sessions cannot stay open waiting.
Expected Answer
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Direct answer: Acknowledge request synchronously, create a case/work order record, and return tracking reference to customer Also consider: Offload long steps to Queueable Apex, Flow orchestration, or MuleSoft with status polling endpoints In practice: Use Platform Events or CDC to notify the customer via SMS/email when async work completes Optimize for scale and operational observability.
Architect Perspective
Agents should initiate durable workflows, not embody them. Pattern: commit intent to database, async execute, notify on completion. This mirrors good microservice design—short synchronous boundary, long async tail.