> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Message grouping

> Group an agent's consecutive messages into a single message for the customer, separated by line breaks, and cut down notifications and billable messages.

When an agent types several ideas in a row, the customer gets one block of content instead of several separate notifications.

<Note>
  The feature is configured at the **company** level. Companies that do not turn it on keep the current behavior, with no changes.
</Note>

## When to use this feature

Grouping helps when your agents tend to send several consecutive messages within the same conversation. Turning it on lets you:

* **Reduce the notifications** the customer receives.
* **Lower the billable messages** per conversation.
* **Keep the conversation cleaner** and easier to read.
* **Hold together** several messages that are part of the same reply.

## How it works

When an agent sends their first message, the system opens a **time window**. Every text message they send inside that window is collected and, once the window closes, goes out to the customer as a single message with line breaks.

For example, the agent sends **three messages in a row**:

```text Message 1 theme={null}
Hi, how are you?
```

```text Message 2 theme={null}
I can help you with your request.
```

```text Message 3 theme={null}
To continue, I need to verify a few details.
```

And the customer receives **a single message** with that same content:

```text What the customer receives theme={null}
Hi, how are you?
I can help you with your request.
To continue, I need to verify a few details.
```

<Warning>
  The window starts with the **first message** and has a fixed duration. The system does **not** restart the wait time each time a new message arrives, so the block never waits indefinitely.
</Warning>

## Configuration

Open **Inbox** or **Monitoring** and, in the shortcuts on the right-hand side of the screen, go to **Message grouping**.

<Frame>
  <img src="https://mintcdn.com/jelouai/Ryf_VxEWQw2sZbD1/assets/images/configuracion/agrupacion-mensajes-en.png?fit=max&auto=format&n=Ryf_VxEWQw2sZbD1&q=85&s=0eeccf769f901f34520c048c6cb21ff1" alt="Message grouping dialog with the Group consecutive messages switch turned on and the Wait time in seconds field set to 5" width="970" height="660" data-path="assets/images/configuracion/agrupacion-mensajes-en.png" />
</Frame>

<Steps>
  <Step title="Turn on Group consecutive messages">
    Switch **Group consecutive messages** on. From then on, your agents' back-to-back messages are grouped according to the configured time.
  </Step>

  <Step title="Set the wait time">
    In **Wait time (seconds)** you set how long the system waits before sending the block to the customer, and therefore how long the window that collects messages lasts.

    It accepts values between **1 and 20 seconds**.
  </Step>

  <Step title="Save your changes">
    Click **Save**. The setting applies to the whole company.
  </Step>
</Steps>

## Which messages are grouped

The agent's **consecutive text messages** become part of the same block as long as they fall inside the configured window. Other message types do not wait for the window to end:

| Message type                         | Behavior                                              |
| ------------------------------------ | ----------------------------------------------------- |
| Consecutive text messages            | Collected and sent together when the window closes.   |
| Images and other attachments         | Sent **immediately**, without waiting for the window. |
| Replies or quotes to another message | Sent **immediately**, without waiting for the window. |

The system preserves the corresponding order of the messages sent.

## What the agent sees

<Frame>
  <img src="https://mintcdn.com/jelouai/Ryf_VxEWQw2sZbD1/assets/images/configuracion/agrupacion-mensajes-asesor-en.png?fit=max&auto=format&n=Ryf_VxEWQw2sZbD1&q=85&s=95d1ee2a059fae14a5d380adc9a8da38" alt="Grouped message in the agent's conversation: four lines of text in a single bubble, with the clock icon next to the timestamp" width="450" height="204" data-path="assets/images/configuracion/agrupacion-mensajes-asesor-en.png" />
</Frame>

While a message is inside the grouping window, the agent sees a **clock** next to it: the indicator that it is still waiting to go out.

When the block is sent to the customer, the clock turns into a **check**, confirming the message went out correctly.

## What the customer sees

<Frame>
  <img src="https://mintcdn.com/jelouai/Ryf_VxEWQw2sZbD1/assets/images/configuracion/agrupacion-mensajes-cliente-en.png?fit=max&auto=format&n=Ryf_VxEWQw2sZbD1&q=85&s=770fe7aba1d2de2516be86f3c7921809" alt="Customer's WhatsApp conversation showing the agent's four messages received in a single bubble, with one delivery time" width="634" height="340" data-path="assets/images/configuracion/agrupacion-mensajes-cliente-en.png" />
</Frame>

The customer receives the grouped text messages as a single message, with each piece of content on its own line. They stop getting several notifications in a row while the agent writes one reply across multiple messages.
