# Manage Advocate User Segments

Segmentation is the process of dividing your Advocate program's participants into user segments, or groups, that are based on shared characteristics. By segmenting your participants you can better understand their interests, follow their activity, and more accurately provide value that matches their needs.

{% tabs %}
{% tab title="Demographic factors" %}
Common segmentation criteria include demographic factors like:

* Age
* Gender
* Location
* Job Industry
* Place of employment
* Income
  {% endtab %}

{% tab title="Relationship factors" %}
You might also segment users based on a number of characteristics related to their relationship with your business like:

* Membership status
* Subscription plan tier
* Last purchase date
* Signup date
* Device
  {% endtab %}
  {% endtabs %}

#### Manage user segments

In your Advocate program, you can create new user segments, add individual participants to user segments, add participants to user segments in bulk, and remove participants from user segments.

{% stepper %}
{% step %}

#### **Step 1: Create a user segment**

1. In the left navigation menu, select ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2) **\[Engage] → Data Sources → Segments**.
2. Select **Add Segment**.
3. In the **Name** field, enter a descriptive name for the segment.
4. Select **Add**.
   {% endstep %}

{% step %}

#### **Step 2: Add a single participant to a user segment**

1. In the left navigation menu, select ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2) **\[Engage] → Participants**.
2. Search for the specific participant you want to add to a user segment.
3. Select their name to load their participant profile.
4. On the *Segments* card, select **Add Segment**.
5. Choose the user segment you would like to include this participant in.
   {% endstep %}

{% step %}

#### **Step 3: Bulk add participants to a user segment**

1. In the left navigation menu, select ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2) **\[Engage] → Data Sources→ Segments**.
2. Find the name of the segment to which you want to add users.
3. Hover your cursor over the name of the segment to which you want to add participants and select **Add Users**.
4. Choose the import type **Users**.
5. Using the [example CSV](https://assets.ctfassets.net/s68ib1kj8k5n/37p9zl8fMQvjSW05TRpEiO/8e7f524130ac29092be52f54ba04c7cb/sample-user-upload-hideClassic.csv), create a list of all participants you would like to be included in a specific user segment.
6. Select **Select File** and choose your prepared CSV file.
7. Use the dropdown list to select the segment you want to add these participants to.
8. Select **Start Import**.
   {% endstep %}

{% step %}

#### **Step 4: Remove a participant from a user segment**

1. In the left navigation menu, select ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2) **\[Engage] → Participants**.
2. Find the specific participant you want to add to a user segment.
3. Select their name to load their participant profile.
4. In the bottom left of the user overview, select ![](https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-d05e21635c52fff94d35ca4c6b05c1deecc699ef%2F768d04f4d7e1b5b745577812f7d67db99d988bfc34749b6e575a04438d6cee36.svg?alt=media) **\[Cancel]** to the right of the segment that the participant should no longer be in.
   {% endstep %}
   {% endstepper %}

#### Advocate API and UTT segmentation

The Advocate REST API and UTT Javascript library can also be used to programmatically manage which segments participants are members of.

This functionality can be accessed by including one or more of the following "operations" (a combination of the name of the segment and an operator) in the user object of the API call or UTT method.

You can find further details about using these Operations in our UTT Javascript library and API methods in our [User API Documentation](https://integrations.impact.com/impact-brand/reference/user).

{% tabs %}
{% tab title="Operators" %}
The following operators are the basis for the user segmentation *Operations*, which are used to manage which segments a participant is a member of.

| Operator     | Description                                                                                                                                                                                                 | Example         |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| Add          | Providing just the segment key will attempt to add the participant to the segment. If the participant is already part of the segment, then no action will be taken.                                         | `mySegmentKey`  |
| Delete       | Including the *segment key* with a `~` in front of it will inform Advocate to remove the participant from the segment. If the participant is already not part of the segment, then no action will be taken. | `~mySegmentKey` |
| Clear        | Including a *key*, with a `~` in front of it, will inform Advocate to remove the participant from all segments they are currently part of.                                                                  | `~`             |
| {% endtab %} |                                                                                                                                                                                                             |                 |

{% tab title="Operations" %}
The following Operations, built using the available *Operators*, enable you to manage which segments a user is a member of.

| Operation     | Description                                                                                                                                                                                                                                    | Example                                             |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| Add           | Adds a participant to a segment. Any other existing segments will be retained.                                                                                                                                                                 | `{ "id" : "abc_123", ... "segments" : ["A"] }`      |
| Set           | <p>Set the segment(s) for a participant. Any other existing segments will be removed.</p><p><strong>Important:</strong> The order matters! To perform a set operation, the clear <em>Operator</em> <em>(\~)</em> should be included first.</p> | `{ "id" : "abc_123", ... "segments" : ["~","A" ] }` |
| Remove        | Remove a participant from a segment. Any other existing segments will be retained.                                                                                                                                                             | `{ "id" : "abc_123", ... "segments" : ["~A"] }`     |
| Clear         | Clear all segments configured for a participant.                                                                                                                                                                                               | `{ "id" : "abc_123", ... "segments" : ["~*"] }`     |
| {% endtab %}  |                                                                                                                                                                                                                                                |                                                     |
| {% endtabs %} |                                                                                                                                                                                                                                                |                                                     |


---

# Agent Instructions: 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:

```
GET https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/manage-advocate-user-segments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
