---
title: Contact segmentation
related:
  - https://docs.kentico.com/k8/on-line-marketing-features/contact-management/working-with-contacts.md
  - https://docs.kentico.com/k8/on-line-marketing-features/contact-management/working-with-contacts/organizing-contacts-into-accounts.md
  - https://docs.kentico.com/k8/macro-expressions/writing-macro-conditions.md
  - https://docs.kentico.com/k8/on-line-marketing-features/on-line-marketing-macros.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

> **Info:** **Kentico EMS required**
>
> Features described on this page require the **Kentico EMS** license.

You can organize [contacts](https://docs.kentico.com/k8/on-line-marketing-features/contact-management/working-with-contacts.md) into segments called **contact groups**. Segmentation allows you to divide your website's visitors and users into groups of people with shared characteristics, which you can then accurately target in your on-line marketing efforts (such as [E-mail marketing](https://docs.kentico.com/k8/on-line-marketing-features/e-mail-marketing.md)). You can either add contacts to groups manually or set up the system to assign contacts to groups automatically based on macro conditions.

> **Tip:** **Segmenting contacts using Personas**
>
> [Personas](https://docs.kentico.com/k8/on-line-marketing-features/content-personalization/personas.md) are a different approach to segmenting contacts. _Contact groups_ differ from _personas_ in the following:
>
> - Contacts are assigned to contact groups based on macro conditions. In personas, you can additionally make use of attributes and activities.
> - Visitors are assigned to the most relevant persona only, while they can be in multiple contact groups at a time.
> - You can assign personas to content (tagging by personas). You can then have the content served to visitors based on their personas.

Contact groups can be site-specific or shared across all websites in the system ([global contact groups](https://docs.kentico.com/k8/on-line-marketing-features/contact-management/allowing-global-contact-management-objects.md)). Contacts can belong to any number of different contact groups.

You can manage contact groups in the **Contact groups** application.

![Viewing contact groups](https://docs.kentico.com/docsassets/k8/contact-segmentation/viewing_contact_groups.png "Viewing contact groups")

Click **New contact group** to create contact groups.

## Manually adding contacts to groups

To add individual [contacts](https://docs.kentico.com/k8/on-line-marketing-features/contact-management/working-with-contacts.md) to contact groups:

1. Edit a contact group.
2. Open the **Contacts** tab.
3. Click **Add contacts**.
4. Select the contacts and click **OK**.

You can find all contacts in the contact group listed on the **Contacts** tab.

### Adding accounts

You can add entire [contact accounts](https://docs.kentico.com/k8/on-line-marketing-features/contact-management/working-with-contacts/organizing-contacts-into-accounts.md) to groups:

1. Edit the contact group.
2. Open the **Accounts** tab.
3. Click **Add accounts**.
4. Select the accounts and click **OK**.

Adding an account automatically assigns all of the account's contacts into the group. You can find all contacts added via accounts on the group's **Contacts** tab (identified by the Yes value in the **From account** column).

## Removing contacts from groups

To remove individual contacts from contact groups:

1. Edit the contact group.
2. Open the **Contacts** tab.
3. Click **Remove** () next to the given contact.

You can remove multiple contacts using the options below the list:

1. Choose which contacts to remove:
   1. _All contacts_
   2. _Selected contacts_ - mark specific contacts using the checkboxes on the left side of the list.
2. Select the _Remove_ action.
3. Click **OK**.

## Setting up dynamic contact groups

Dynamic contact groups automatically gather all contacts that fulfill certain criteria (defined through a [macro condition](https://docs.kentico.com/k8/macro-expressions/writing-macro-conditions.md)).

1. Edit the contact group.
2. Check the **Dynamic condition** box on the **General** tab.
3. [Specify the condition](https://docs.kentico.com/k8/macro-expressions/writing-macro-conditions/building-conditions-using-macro-rules.md) in the **Macro condition** field.
   - If you write the macro condition manually, your expression must return either _true_ or _false_.
4. (Optional) Check the **Schedule rebuild** box and set a time interval according to which the system periodically rebuilds the group.

   > **Info:** Rebuilding ensures that the group only contains contacts that fulfill the current condition. You only need to rebuild after modifying the group's condition. When a contact is created or updated, the system automatically checks if the contact fulfills the conditions of contact groups and adds or removes them accordingly.
   >
   > You can manually rebuild the contact group at any time by clicking **Rebuild contact group**.
5. Click **Save**.

![Creating and scheduling a dynamic contact group](https://docs.kentico.com/docsassets/k8/contact-segmentation/dynamic_contact_group.png "Creating and scheduling a dynamic contact group")

You can find all contacts added through the condition on the group's **Contacts** tab (identified by the Yes value in the **Dynamic** column).
