> For the complete documentation index, see [llms.txt](https://docs.flexikanban.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexikanban.ai/standard-kanban/groups-of-cards/how-to-configure-card-grouping.md).

# How to configure Card Grouping

### Introduction

Card Groups is a new layer of visualization and management of cards.&#x20;

One feature of these card groups is their customizable visual styles. This means that a stack of cards and an individual card can be visually distinct, making it easier to identify and differentiate.&#x20;

Another feature is a set of aggregation functions for calculating several kinds of totals:

* Maximum
* Minimum
* Sum
* Average

These functions are instrumental in providing meaningful insights into your data, aiding in more informed decision-making and efficient project management within the Salesforce CRM platform.

{% hint style="info" %}
This feature is available since release 3.1.37
{% endhint %}

To make card groups you just need to have a kanban with columns configured on some Data Source object.&#x20;

### Basic Configuration

Let's use Opportunities in the following example. The Kanban will have 4 columns for several Opportunity stages.

{% hint style="info" %}
Distributing cards by columns - is the top layer of records representation and management  in kanban. Card grouping offers a second layer.
{% endhint %}

Here how a kanban can look like without grouping:

<img src="/files/Zm9RxGAgROS1UP2mmN82" alt="" class="gitbook-drawing">

We can add grouping by some fields of Data Source object.&#x20;

{% hint style="info" %}
Groupable field types:

* Checkbox (boolean)

* Phone (string)

* Picklist (string)

* Email (string)

* Text (string)

* Text Area (string)

* URL (string)

* Number (int). Does not include custom fields, only standard Number fields with SOAP type <mark style="color:red;">`int`</mark>, like <mark style="color:red;">`Account.NumberOfEmployees`</mark>.

* Lookup (id)

* Master Detail (id)

* Id (id)

* Date (date)

* Formulas of type Checkbox and Date, including cross-object formulas across standard and custom relationships.
  {% endhint %}

* Open Column Config popup and go to "Grouping Configuration" tab.

* Click <img src="/files/b2ulYHojTiZ5k3BDHhIN" alt="" data-size="line"> button to select a Data Source field in "Group by" picker:

<img src="/files/sRFmsXGGv2NkfBpmHH4v" alt="" class="gitbook-drawing">

* A field picker will appear. Select a field (fields of up to 4 levels are available) and click "Apply" button:

<img src="/files/l2BQAyuaNZnNqAsgFHMY" alt="" class="gitbook-drawing">

* Save changes:

<img src="/files/KbmQHODBHc3CjpkXfGJN" alt="" class="gitbook-drawing">

This is enough to add groups to the column. These groups will automatically receive a header that will correspond to the value of selected field, and will contain only cards that have this value set.

Here how a kanban can look like with card grouping in the last column:

<img src="/files/JraYzEnPoHGLUKzOE2gl" alt="" class="gitbook-drawing">

{% hint style="warning" %}
If some cards have no value in the field which cards are grouped by, these cards will not be included in any group.
{% endhint %}

Card groups have the following features:

* They are collapsed by default and show only the first card. To expand a group click <img src="/files/UrFV1aVjN66kc0Bzk1V3" alt="" data-size="line"> button at the group header.
* Card grouping does not cancel column sorting order - it will be matched inside groups too.
* If group contains many cards, not all of them can be displayed - in this case a "load more" button will be shown at the bottom of expanded group.

{% hint style="warning" %}
Only one Card Group is allowed per column.
{% endhint %}

### Other Features

Card Groups offer following abilities:

* Styling
* Show totals
* Use conditions to include cards in the group

#### Styling

Add CSS styles using proper Styles picker:

<img src="/files/ABSwfZgIUmRO7Jf9BwFT" alt="" class="gitbook-drawing">

You can use merge fields in styles to make groups styled dynamically depending on different values.

#### Totals

* Click <img src="/files/piv2Q1ebOYTeX3IsD7gW" alt="" data-size="line"> button to show proper subform for Totals entry.
* Type Label (text that will be displayed left to value).
* Select aggregation method in "Details" column. Currently available methods are:
  * Sum (proper values from all cards belonging to the group will be added)
  * Minimum (will show minimal value)
  * Maximum (will show maximal value)
  * Average (will calculate and show average value)
* Select a field which Total will be aggregated by
* Set CSS styles (e.g., color) for this Total, if necessary

You can add several Totals:

<img src="/files/JL0lWTOguUNGCq5MfSVp" alt="" class="gitbook-drawing">

How can look card groups with styling and Totals:

<img src="/files/uZ7iSHsYoYgNcQVAE91r" alt="" class="gitbook-drawing">

#### Conditions

To make card grouped more efficiently, you can specify conditions. Only cards, whose records match conditions, will be grouped.

* Go to "Conditions" section of Grouping Configuration tab
* Click <img src="/files/i9YIUqHVClsSMPIfPTFY" alt="" data-size="line"> button to add condition
* Select Data Source Object field, operator and type
* Specify value to be matched
* Add more conditions, if necessary
* Set conditions Logic, if needed

In the example below Opportunity cards will be grouped by Account Name only for two specified accounts:

<img src="/files/G8aw8HFarNjCxweivif5" alt="" class="gitbook-drawing">

And how result will look like:

<img src="/files/gsFKYh61Sblh6xobzx2z" alt="" class="gitbook-drawing">


---

# 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 dynamically by asking a question.

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

```
GET https://docs.flexikanban.ai/standard-kanban/groups-of-cards/how-to-configure-card-grouping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
