> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/relate/automation-flows/actions/automation-flow-splitting-departments-and-configuring-sending-cadence.md).

# Automation Flow - Splitting Departments and Configuring Sending Cadence

How to distribute the Leads from one department into two or more, and send messages on different days, to avoid bans on WhatsApp Web accounts.

#### Prerequisite: Have a segment containing the Leads that will receive the messages.

## Creating segments

For example purposes, 3 empty segments were created, but it could be any desired number, depending on the total number of Leads. Assuming the total number of Leads is 300, each segment should contain 100 of them.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FvkIVhJywjbHpjR0qgdwA%2F1267-1.png?alt=media&amp;token=740e4b03-f51d-4b58-8b1d-615ac997bc5c" alt=""><figcaption><p><em>"Subsegments" created.</em></p></figcaption></figure>

## Creating a Flow to distribute the Leads

A Flow was created and configured to run for all Leads present in the '🏠 Largest Segment'.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fx3hTV9KQ0Fy9H1Eduj1b%2F2.png?alt=media&amp;token=855c65b5-2023-4517-8bf4-42483619609f" alt=""><figcaption><p><em>Distribution flow.</em></p></figcaption></figure>

### Using the Alternator block

The alternator block was used within the Builder. This block switches between the different paths with each execution, ensuring that the Flow goes through all Leads and distributes them, one by one, among the segments sequentially. In the 'Modify lead segments' action, each block is configured to add its respective segment (Group 1, Group 2, Group 3...).

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F1s94zJBHbzUxIXdakzOM%2F3.png?alt=media&amp;token=df2ba5e2-ea9c-452b-8eee-46ea174e6679" alt=""><figcaption><p><em>Alternator block.</em></p></figcaption></figure>

## Creating a Flow to send messages

After the Flow runs and distributes all Leads into the smaller segments, a new Automation Flow was created to send the messages to each group on different days. The logic is simple: all Leads are checked according to the segment they belong to. If they are in the first group, the message is sent; otherwise, a 1-day Wait block is executed. After that period, the process checks whether the Lead is in the second group, and so on, successively.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fbf7c2fsMSV05imMni9t2%2FScreenshot_3.png?alt=media&amp;token=f7f164d7-f5a1-473e-a0d3-5bf6feb55ddd" alt=""><figcaption><p><em>Creating a trigger Flow.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FoyUiaJDw6eVFhZ1HasHm%2FScreenshot_4.png?alt=media&amp;token=411716f3-b2ce-4f6d-85c5-d3215c37f37f" alt=""><figcaption><p><em>Trigger blocks.</em></p></figcaption></figure>
