Do you want to learn interactively how to use the rules in Channable? Learn how to create a Channacademy account in the Channable app through this Help Center article and start with the Basic Rules course.
Used for: The “build item group” rule allows users to create feed-wide lists based on a given grouping identifier.
Used in: “THEN”-statements and “ELSE”-Statements.
As shown in the screenshot below, lists are built based on the specified grouping identifier. This rule compiles values from designated fields within the same group.
For more understanding, let us consider the following data:
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 |
The application of the "build item group" rule would yield the following result:
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 |
This rule combines the “brand” and “color” values for each item_group_id, providing a consolidated list for each group.