# Rule action: Group items

**Used for:** Merging the individual sizes of items together into a single item.

**Used in:** "THEN"-statements and "ELSE"-statements.

Most channels want every size of a product to be an individual item in the export feed. Some channels want the sizes grouped together into main products, with the available sizes in a list (e.g. Spartoo, Fashionchick, Mentoday). To group the sizes together in one product you can use the "group items" rule.

For this rule to work you need a field that is exactly the same for all different sizes of a product. If you're using Lightspeed, this field is called "parent\_id". If you're using Magento, this field is called item\_group\_id. If you're using another webshop platform, you will need to look for a value that is the same for the products you want to group together. If these products have the same title for example, you could group these products together on the title field.

<figure><img src="/files/2a59ac8bbf28d7c57539601e3daa2ab113f6ea7f" alt=""><figcaption></figcaption></figure>

In the screenshot above we show an example of 4 different sizes of a product. The sizes all have a unique ID, but have the same item\_group\_id. In this case we can use the item\_group\_id to combine these products into one main product. Additionally, we want to add the sizes of the original products together in a list. This is done in the screenshot below.

<figure><img src="/files/11e30ce286c402dbe40505ae998c0267ba178f36" alt=""><figcaption></figcaption></figure>

This will result in one product, instead of four separate products. In the screenshot below you can see the result of this rule.

<figure><img src="/files/5aacd9c4be847a6b19d1eaed606da7e044b60596" alt=""><figcaption></figcaption></figure>

Four products are now combined into one product. This is why after a "group products" rule your number of products will automatically be a lot smaller than before the rule.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/rule-action-group-items.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
