Skip to main content
Use Order Groups to turn a single customer cart that spans multiple sellers into one coherent order for the shopper. A marketplace cart can contain offers from several sellers at once. On checkout, Mercur splits that cart into one child order per seller and wraps them in an Order Group. This is the aggregate the shopper sees as “their order”. Each child order is then fulfilled, returned, and refunded independently, while the group gives you a single handle over the whole purchase.
An order group is the OrderGroup entity. It lives in the Seller module (id prefix og), not a module of its own. There is no ORDER_GROUP module key. Resolve its service through MercurModules.SELLER.

Key features

  • Multi-seller checkout: one cart with offers from many sellers becomes one group of per-seller orders.
  • Human-readable id: an auto-incrementing display_id the shopper and operator can reference.
  • Immutable cart link: a read-only cart_id back to the originating cart. Carts are frozen after checkout.
  • Computed totals: seller_count and total are derived at query time, never stored.
  • Independent child orders: fulfillment, returns, and refunds happen per seller order.
  • Scoped visibility: admins see every group platform-wide. Vendors see only their slice.

Get started

Learn how the domain fits together.

The order group

The aggregate entity, its display_id, and the read-only cart link.

Order splitting

How a multi-seller cart is split into per-seller child orders.

Computed totals

Why seller_count and total are calculated at query time.

Examples

Build against Order Groups in your own code.

Retrieve an order group

Load a group and its aggregated child orders.

List order groups

Page through groups, optionally scoped to a seller.

Split a cart

Complete a multi-seller cart into a group of orders.

Resources

Data models, links, workflows, service methods, and events for Order Groups.

Data models

The OrderGroup entity and its fields.

Links

How order groups link to carts, orders, sellers, and offers.

Workflows

Splitting, retrieving, and listing order groups.

Service

Seller module methods for working with groups directly.

Events

Events emitted as order groups are created.