Skip to main content
All marketplace business logic runs through Medusa workflows exported from @mercurjs/core/workflows. Run them from your own API routes, jobs, or subscribers, and extend them through their hooks — see Extend a workflow.
import { createSellersWorkflow } from "@mercurjs/core/workflows"

const { result } = await createSellersWorkflow(container).run({
  input: { name: "Acme", email: "hello@acme.co" },
})
Each workflow has its own reference page with the exact input, result, and hooks.

Seller lifecycle

Create, approve, suspend, terminate sellers and manage their details.

Members & invites

Team management and the JWT invite flow.

Checkout & carts

The multi-vendor split checkout and per-seller cart operations.

Order groups

Read models over grouped per-seller orders.

Commission

Rate CRUD, rule batching, and order line recomputation.

Payout

Accounts, onboarding, payouts, and webhook processing.

Products

Master product creation, confirmation, and seller linking.

Product edit

The change-request lifecycle behind vendor edits.

Product attributes

Attribute catalog CRUD and the product batch engine.

Offers

Listing CRUD and inventory item batching.

Media

Category and collection galleries, thumbnails, banners, icons.

Orders & RMA

Fulfillment and return/claim/exchange confirmation.

Internal and utility workflows

These are exported but usually not called directly — they run inside the workflows above:
WorkflowCalled by
applyProductChangeActionsWorkflow / applyProductAttributeChangeActionsWorkflowconfirmProductChangeWorkflow — replays staged actions onto the product
productEditUpdateProductWorkflow / productEditUpdateVariantsWorkflow / productEditUpdateAttributesWorkflow / productEditDeleteProductWorkflowVendor product edit routes — stage the corresponding change actions
recordProductAuditChangeWorkflowProduct flows — writes audit change records
create/update/deleteProductCategoryWithImagesWorkflow and create/update/deleteProductCollectionWithImagesWorkflowAdmin category/collection routes — wrap Medusa’s workflows plus the image-set step
createSellerCampaignsWorkflow, createSellerCustomerGroupsWorkflow, createSellerInventoryItemsWorkflow, createSellerPriceListsWorkflow, createSellerPromotionsWorkflow, createSellerShippingOptionsWorkflow, createSellerShippingProfilesWorkflow, createSellerStockLocationsWorkflowVendor resource-create routes — create the record and link it to the seller
Search has no workflows by design — index synchronization is event-driven through subscribers. See the Search module.