Skip to main content
This guide is being written. The outline below is the intended structure.
Workflows are Medusa’s extension model, and Mercur keeps it. Unlike the panels (where Mercur ships its own customization framework), backend logic follows Medusa conventions unchanged: Mercur’s workflows expose hooks you inject steps into, with the same compensation/rollback semantics as any Medusa workflow. Skills learned in plain Medusa transfer here one-to-one.
You extend a Mercur workflow by injecting your own step into a hook it exposes, so your logic runs inside the existing flow instead of a fork of it.

Why hooks

Hooks let you add behavior without forking or rewriting the workflow.
1

Pick the target hook

The completeCartWithSplitOrdersWorkflow and where its hooks sit.
2

Inject a step

The shape of a hook and how to register your step.
3

Handle compensation and rollback

How your step participates in automatic rollback on failure.

Verify

Confirm the injected behavior runs and rolls back correctly.

Next steps

Add a custom API route

Custom fields