> For the complete documentation index, see [llms.txt](https://helpcenter.channable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.channable.com/manage-improve-product-data/rules-bulk-edit-and-enrich/how-to-use-actions-then-in-rules/item-actions/rule-action-build-item-group.md).

# Build item groups

Create field-value lists for items that share a group identifier.

Use **`Build item group`** to create a list of field values for items that share a group identifier.

This action is useful for tasks such as:

* Creating a list of available colors, sizes, or brands for each product group.
* Adding the same grouped list to every item with the same `item_group_id`.

***

## Example `Build item group` use cases

### Create brand and colour lists for each product group

In this example, `id` identifies each individual item. `item_group_id` identifies a product group, so several items can share the same value. When the rule runs, it collects the `brand` and `color` values from every item with the same `item_group_id`. It then writes those values as lists to `brand_list` and `color_list` for every item in that group.

#### How to build the rule

* Condition: **`For all items`**
* Action: THEN **`Build item group`** based on `item_group_id`
  * Store `brand` values in `brand_list`
  * Store `color` values in `color_list`

{% hint style="info" %}

#### Tip

Create empty fields, such as `brand_list` and `color_list`, before you run the rule. The action stores the generated lists in these fields.
{% endhint %}

Before you apply the action, the list fields are empty:

| id | item\_group\_id | brand       | color  | brand\_list | color\_list |
| -- | --------------- | ----------- | ------ | ----------- | ----------- |
| 1  | 1               | Nike        | White  |             |             |
| 2  | 1               | Adidas      | Purple |             |             |
| 3  | 1               | Puma        | Yellow |             |             |
| 4  | 2               | New Balance | Beige  |             |             |
| 5  | 2               | Vans        | Black  |             |             |
| 6  | 3               | Crocs       | Green  |             |             |

After you apply the action, items with the same `item_group_id` receive the same lists:

| id | item\_group\_id | brand       | color  | brand\_list        | color\_list           |
| -- | --------------- | ----------- | ------ | ------------------ | --------------------- |
| 1  | 1               | Nike        | White  | Nike, Adidas, Puma | White, Purple, Yellow |
| 2  | 1               | Adidas      | Purple | Nike, Adidas, Puma | White, Purple, Yellow |
| 3  | 1               | Puma        | Yellow | Nike, Adidas, Puma | White, Purple, Yellow |
| 4  | 2               | New Balance | Beige  | New Balance, Vans  | Beige, Black          |
| 5  | 2               | Vans        | Black  | New Balance, Vans  | Beige, Black          |
| 6  | 3               | Crocs       | Green  | Crocs              | Green                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
