
Vercel Blog · 2 min readNode.js & JS runtimes
Workflow SDK adds idempotent starts
The article shows how to use Vercel’s Workflow SDK to start a workflow idempotently by atomically claiming a hook with a token. It explains handling duplicate starts, routing payloads to the existing run, and configuring retention. This pattern prevents race conditions and ensures reliable processing of order events.
- Use start() with experimental_hook token to claim hook atomically.
- Duplicate starts throw HookConflictError; resumeHook routes payloads to existing run.
- Set experimental_minRetention to block late duplicates after run ends.