> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Every workflow exported by @mercurjs/core, grouped by domain.

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](/rc/resources/customization/extend-a-workflow).

```ts theme={null}
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.

<CardGroup cols={2}>
  <Card title="Seller lifecycle" href="/rc/references/workflows/seller/create-sellers">
    Create, approve, suspend, terminate sellers and manage their details.
  </Card>

  <Card title="Members & invites" href="/rc/references/workflows/member/add-seller-member">
    Team management and the JWT invite flow.
  </Card>

  <Card title="Checkout & carts" href="/rc/references/workflows/cart/complete-cart-with-split-orders">
    The multi-vendor split checkout and per-seller cart operations.
  </Card>

  <Card title="Order groups" href="/rc/references/workflows/order-group/get-order-group-detail">
    Read models over grouped per-seller orders.
  </Card>

  <Card title="Commission" href="/rc/references/workflows/commission/create-commission-rates">
    Rate CRUD, rule batching, and order line recomputation.
  </Card>

  <Card title="Payout" href="/rc/references/workflows/payout/create-payout">
    Accounts, onboarding, payouts, and webhook processing.
  </Card>

  <Card title="Products" href="/rc/references/workflows/product/create-products">
    Master product creation, confirmation, and seller linking.
  </Card>

  <Card title="Product edit" href="/rc/references/workflows/product-edit/create-product-change">
    The change-request lifecycle behind vendor edits.
  </Card>

  <Card title="Product attributes" href="/rc/references/workflows/product-attribute/create-and-link-product-attributes-to-product">
    Attribute catalog CRUD and the product batch engine.
  </Card>

  <Card title="Offers" href="/rc/references/workflows/offer/create-offers">
    Listing CRUD and inventory item batching.
  </Card>

  <Card title="Media" href="/rc/references/workflows/media/set-collection-images">
    Category and collection galleries, thumbnails, banners, icons.
  </Card>

  <Card title="Orders & RMA" href="/rc/references/workflows/order/create-order-fulfillment">
    Fulfillment and return/claim/exchange confirmation.
  </Card>
</CardGroup>

## Internal and utility workflows

These are exported but usually not called directly — they run inside the workflows above:

| Workflow                                                                                                                                                                                                                                                                                             | Called by                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `applyProductChangeActionsWorkflow` / `applyProductAttributeChangeActionsWorkflow`                                                                                                                                                                                                                   | `confirmProductChangeWorkflow` — replays staged actions onto the product           |
| `productEditUpdateProductWorkflow` / `productEditUpdateVariantsWorkflow` / `productEditUpdateAttributesWorkflow` / `productEditDeleteProductWorkflow`                                                                                                                                                | Vendor product edit routes — stage the corresponding change actions                |
| `recordProductAuditChangeWorkflow`                                                                                                                                                                                                                                                                   | Product flows — writes audit change records                                        |
| `create/update/deleteProductCategoryWithImagesWorkflow` and `create/update/deleteProductCollectionWithImagesWorkflow`                                                                                                                                                                                | Admin category/collection routes — wrap Medusa's workflows plus the image-set step |
| `createSellerCampaignsWorkflow`, `createSellerCustomerGroupsWorkflow`, `createSellerInventoryItemsWorkflow`, `createSellerPriceListsWorkflow`, `createSellerPromotionsWorkflow`, `createSellerShippingOptionsWorkflow`, `createSellerShippingProfilesWorkflow`, `createSellerStockLocationsWorkflow` | Vendor resource-create routes — create the record and link it to the seller        |

<Note>
  Search has no workflows by design — index synchronization is event-driven
  through subscribers. See the [Search module](/rc/references/modules/search#index-synchronization).
</Note>
