Resolve the service
Resolve the Seller module from the Medusa container withMercurModules.SELLER. There is no ORDER_GROUP module key.
Read methods
The Seller module overrides the generated read methods forOrderGroup. All three run one SQL query through OrderGroupRepository, which fills seller_count and total:
From
config, the repository reads take, skip, and order only. It ignores select and relations and always returns every column plus the two computed fields.
Write methods
The write methods are the onesMedusaService generates for the model:
Creating a group doesn’t create orders or links. Checkout does that in
completeCartWithSplitOrdersWorkflow, so prefer the workflow over calling createOrderGroups yourself.
Filters and sorting
The repository builds its own SQL and reads only the top-level keys below. It ignores every other key, including$and and $or.
The order-level filters only choose which groups match.
seller_count and total still cover every order in each matching group. Pass id as a plain string or array: an { $in: [...] } map isn’t read.
config.order sorts by display_id, created_at, or updated_at, with ASC or DESC. Other keys are ignored. Without a valid key, groups come back by created_at descending.