Workflows
getFormattedOrderSetListWorkflow
This documentation provides a reference to thegetFormattedOrderSetListWorkflow. It belongs to the @mercurjs/b2c-core package.
This workflow retrieves order sets with calculated totals and aggregated statuses. An order set represents a group of orders created from a single cart in a multi-vendor marketplace. The workflow computes the overall payment status, fulfillment status, and financial totals by aggregating data from all orders within each set.
Source code
Examples
- Store API Route
- Retrieve Single Order Set
- After Cart Completion
packages/modules/b2c-core/src/api/store/order-set/route.ts
Steps
- useQueryGraphStep: Fetches order sets with related orders, items, fulfillments, and payment data.
- transform (formatOrderSets): Aggregates order data to calculate totals and statuses for the entire order set.
Input
The order set query parameters.