packages/core/src/links/, and checkout creates their rows when it splits a cart.
Order group to order
Connects a group to its child orders, one per seller.Order group to cart
Exposes the completed cart a group was created from. The link is read-only: it reads the group’scart_id column and has no table of its own.
link.create or link.dismiss. It changes only if cart_id changes, and Mercur never updates it.
Order to seller
Connects each child order to the seller who fulfills it.getOrderGroupsListWorkflow reads orders.seller.id to trim each group to one seller when you pass sellerId.
Order line item to offer
Records which offer each order line item was bought from. Checkout copies it from the matching cart line item’s offer link.Links checkout creates for each order
Besides the links above,completeCartWithSplitOrdersWorkflow creates these rows for every child order:
- Order to cart: Medusa’s own link from each child order to the completed cart
- Order to promotion: for each promotion owned by the order’s seller
- Seller to customer: when the customer hasn’t bought from that seller before