# Order aggregation

> Combine items from several wholesale orders into factory production orders: select orders, review the combined items, group them by factory and create the orders.

Source: https://docs.vestislabs.com/production/order-aggregation/

**Order Aggregation** turns the wholesale orders your buyers have placed into production orders for your factories. You pick the wholesale orders, review the items they add up to, group those items by factory, fill in the production details for each group and create the production orders in one go.

**Where to find it:** Production → Order Aggregation
**Requires:** permission `VIEW_BRAND_PRODUCTION`

## Before you start

- The page lists wholesale orders that still have items waiting to be aggregated. Orders whose items have all been aggregated are no longer shown.
- Each item needs a suggested factory (the supplier set on the style). Items are grouped by that factory.
- Factories, order categories, priorities, payment terms and shipment methods are the ones already set up for your brand.

The four steps are always shown at the top of the page: **Select Orders**, **Aggregate Items**, **Group into POs** and **Order Details**. The step you are on is highlighted and finished steps are marked as done.

## Select the orders to aggregate

1. **Open Order Aggregation**
   In the left sidebar, expand **Production** and click **Order Aggregation**. The **Pending Orders** tab lists the wholesale orders waiting for aggregation, with the number of orders in the tab title.

   ![The Order Aggregation page with the four steps at the top and the Pending Orders tab listing the wholesale orders](https://docs.vestislabs.com/assets/production/assets/order-aggregation/60-pending-orders.webp)

2. **Search and filter the list**
   Use the search bar (**Search by order number, customer name...**) to find an order. Click the **Filter** button to narrow the list by **Status**, **Delivery Window**, **Customer** or **Order Date** (a **Start Date** and an **End Date**). Click **Reset** to clear everything.

   ![The search box and the Filter menu with Status, Delivery Window, Customer and Order Date](https://docs.vestislabs.com/assets/production/assets/order-aggregation/61-filters.webp)

3. **Tick the orders**
   Check the checkbox at the start of a row to select an order, or check the checkbox in the header to select every order in the list. The heading reads *Choose wholesale orders to aggregate. Selected: N orders*.

   > [!NOTE]
   > An order whose items are all aggregated already cannot be selected.

   ![Two orders ticked, with the heading reading Selected: 2 orders and the aggregate button showing the count](https://docs.vestislabs.com/assets/production/assets/order-aggregation/62-select-orders.webp)

4. **Check the items of each order**
   Under every selected order, the **Items in this order:** list shows each style and colour with its SKU, units and value. Uncheck an item to exclude it. Excluded items are outlined and are left out of this run. Items that were aggregated earlier are greyed out and marked **Aggregated**.

   ![The items of the selected order with one item unchecked, so it is excluded from this run](https://docs.vestislabs.com/assets/production/assets/order-aggregation/63-exclude-items.webp)

5. **Review the preview**
   Once at least one order is selected, an **Aggregation Preview** shows **Items to aggregate**, **Items excluded** and **Total items**.

   ![The Aggregation Preview showing Items to aggregate, Items excluded and Total items](https://docs.vestislabs.com/assets/production/assets/order-aggregation/64-preview.webp)

### Columns in the list

| Column | What it shows |
|---|---|
| **Order #** | The wholesale order number. |
| **Customer** | The buyer who placed the order. |
| **# of Items** | The total number of items, with how many are already aggregated and how many are pending. |
| **# of Styles** | The number of different styles in the order. |
| **Total Quantities** | The total units. |
| **Order Value** | The value of the order. |
| **Order Date** | When the order was placed. |
| **Delivery Window** | The delivery window the buyer chose. |
| **Status** | *Pending Aggregation* or *Partially Aggregated*. |

### View the details of an order

Click the **⋮** icon at the end of a row, then **View Details**. The **Order Details** dialog shows the customer, the order date, the delivery window, the total quantity and value, the aggregation status (total, aggregated and pending items) and a table of every item with its sizes, unit cost, total value, suggested factory and a status of **Pending**, **Aggregated** or **Excluded**.

## Aggregate the items

1. **Click "Aggregate Selected Orders"**
   Click **Aggregate Selected Orders (N)**. The button is disabled until you select at least one order.

   ![The Aggregate Selected Orders button enabled once an order is selected](https://docs.vestislabs.com/assets/production/assets/order-aggregation/65-aggregate-button.webp)

2. **Review the aggregated items**
   The **Aggregated Items** table lists one row per style and colour with the **Size Breakdown**, **Total Qty**, **Unit Cost**, **Total Value**, **Suggested Factory**, **Lead Time** (in days) and the **Source Orders** it came from. The heading above shows the total units and value across all selected orders.

   ![The Aggregated Items table with one row per style and colour, its size breakdown, cost, factory and source order](https://docs.vestislabs.com/assets/production/assets/order-aggregation/66-aggregated-items.webp)

> [!TIP]
> Click **Start Over** at the top right at any time after the first step to discard your work and return to the order list.

## Group the items into production orders

1. **Click "Auto Group by Factory"**
   Click **Auto Group by Factory**. Items with the same style and colour are combined, then one group is created per suggested factory, named after the factory (for example *SUP-01 Production*). The group's lead time is the longest lead time of its items.

   ![The Auto Group by Factory and Manual Grouping buttons above the aggregated items](https://docs.vestislabs.com/assets/production/assets/order-aggregation/67-auto-group.webp)

2. **Review the groups**
   Each group card shows the factory, the number of items, units, value and lead time, with a table of its items. You can change the factory of a group with **Select factory**.

   ![The group created for the factory, with its items, units, value and lead time](https://docs.vestislabs.com/assets/production/assets/order-aggregation/68-review-groups.webp)

3. **Move items between groups (optional)**
   In a group's table, use the **Move To** dropdown (**Move to...**) on an item to send it to another group. Click **Add New Group** to create an empty **Custom Group** and move items into it, then assign a factory.

   ![The Move to dropdown open on an item of the group, offering the new Custom Group created with Add New Group](https://docs.vestislabs.com/assets/production/assets/order-aggregation/69-move-items.webp)

4. **Click "Proceed to Order Details"**
   When the groups look right, click **Proceed to Order Details**.

   ![The Proceed to Order Details button at the bottom of the grouping step](https://docs.vestislabs.com/assets/production/assets/order-aggregation/70-proceed.webp)

## Fill in the order details

The **Production Order Details** step has one card for every group that still contains items. The text *Configure production details for each order group. All fields are required to create the orders.* applies to the fields marked with an asterisk.

1. **Check the group badges**
   Each card shows **Ready to Create** when every required field is filled, or **Missing Required Fields** otherwise. Once the three dates are filled in, a second badge shows **Valid Timeline** or **Invalid Date Sequence**.

   ![The card of a group on the Production Order Details step with the Missing Required Fields badge](https://docs.vestislabs.com/assets/production/assets/order-aggregation/71-group-badges.webp)

2. **Choose the order details**
   Select the **Order Category \***, **Priority \*** and **Factory \***. You can type a new category, priority, payment term or shipment method into the dropdown to create it, and edit an existing one from the dropdown.

   ![The Order Category, Priority and Factory fields of a group](https://docs.vestislabs.com/assets/production/assets/order-aggregation/72-category-priority-factory.webp)

3. **Enter the dates**
   Pick **Production Start \***, **Production End \*** and **Ex Factory Date \***. The start date must be before the end date, and the end date must be on or before the ex-factory date.

   ![The Production Start, Production End and Ex Factory Date fields](https://docs.vestislabs.com/assets/production/assets/order-aggregation/73-dates.webp)

4. **Choose payment terms and shipment method**
   Select **Payment Terms \*** and **Shipment Method \***.

   ![The Payment Terms and Shipment Method fields](https://docs.vestislabs.com/assets/production/assets/order-aggregation/74-payment-shipment.webp)

5. **Enter the tax details (optional)**
   Fill in **Default VAT Rate (%)**, **VAT Registration Number**, **TAX Jurisdiction (Country/State)** and **Tax Status** (*Registered*, *Exempt* or *Special*). These are filled in from the factory when you choose one.

   ![The optional tax fields: VAT rate, VAT registration number, tax jurisdiction and tax status](https://docs.vestislabs.com/assets/production/assets/order-aggregation/75-tax.webp)

6. **Add notes (optional)**
   Type any extra requirements in **Notes**. The source wholesale order numbers are added to the notes of each production order automatically.

   ![The optional Notes box of a group](https://docs.vestislabs.com/assets/production/assets/order-aggregation/76-notes.webp)

7. **Check the Aggregation Summary**
   The **Aggregation Summary** shows the number of **Production Orders**, **Total Units**, **Total Value** and **Factories**, the **Source Wholesale Orders** and the **Factory Distribution** (orders, units and value per factory).

   ![The Aggregation Summary with the number of production orders, total units, total value and factories](https://docs.vestislabs.com/assets/production/assets/order-aggregation/77-summary.webp)

8. **Click "Create Production Orders"**
   Click **Create N Production Orders**. The button is disabled until every group has all required fields and a valid date sequence. Use **Back: Review Groups** to return to the previous step.

   ![The Back: Review Groups and Create Production Orders buttons at the bottom of the step](https://docs.vestislabs.com/assets/production/assets/order-aggregation/78-create.webp)

## After the orders are created

An **Aggregation Complete!** screen reports how many production orders were created from how many wholesale orders, with the **Production Orders**, **Total Units**, **Total Value** and **Factories**. The **Aggregation Status Summary** lists each wholesale order as **Fully Aggregated**, **Partially Aggregated** or **Not Aggregated**, with the number of items done and how many were added in this session.

- Click **Create Another Aggregation** to start again.
- Click **View in Order Management** to open the new production orders. See [Production orders](https://docs.vestislabs.com/production/production-orders/).

## Troubleshooting

**An order is missing from the list.** Orders whose items are all aggregated are hidden, and filters may be active. Click **Reset**.

**The Create button is disabled.** Open each group and check for the **Missing Required Fields** or **Invalid Date Sequence** badge.

## Related

- [Production orders](https://docs.vestislabs.com/production/production-orders/)
- [Create production order](https://docs.vestislabs.com/production/create-production-order/)
- [Materials breakdown](https://docs.vestislabs.com/production/materials-breakdown/)
