medusa-workflows
Installation
SKILL.md
Medusa v2 Workflows
Before writing code
Fetch live docs:
- Fetch
https://docs.medusajs.com/learn/fundamentals/workflowsfor workflow overview - Web-search
site:docs.medusajs.com createStep createWorkflowfor step and workflow API - Web-search
site:docs.medusajs.com workflow compensation rollbackfor compensation patterns - Web-search
site:docs.medusajs.com workflow hooksfor extending built-in workflows - Web-search
site:docs.medusajs.com built-in workflows listfor available core workflows
Workflow Concept
Workflows orchestrate multi-step, transactional operations in Medusa v2:
- Each step is an isolated, retryable unit of work
- Steps can define compensation (rollback) logic for failure recovery
- Workflows execute steps sequentially, in parallel, or conditionally
- Built-in workflows handle core commerce operations (cart, order, fulfillment)
- Custom workflows are invoked from API routes, subscribers, or scheduled jobs