Skip to content

LA advanced conditions #6827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 67 additions & 20 deletions src/engage/audiences/linked-audiences.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Before you begin setting up your Linked Audience, ensure you have:
- [Set up Profiles Sync](/docs/unify/profiles-sync/profiles-sync-setup/).
- Set up your warehouse permissions using [Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake-setup/).
- [Ensure someone has set up your data graph](/docs/unify/linked-profiles/data-graph/).
- Workspace Owner or Unify Read-Admin, Entities Admin, and Source Admin [roles in Segment](/docs/segment-app/iam/roles/).
- Workspace Owner or Unify Read-only, Engage User, Entities Read-only, and Source Admin [roles in Segment](/docs/segment-app/iam/roles/).

## Setting up Linked Audiences

Expand All @@ -49,29 +49,77 @@ To build a Linked Audience:
2. Select **+ New audience > Audience**.
3. On the **Select Audience Type** screen, select **Linked audience**, then click **Next**.
**Note:** If you cannot select **Linked audience**, ensure you’ve [set up your Data Graph](/docs/unify/linked-profiles/data-graph/) in Unify.
4. Select the [profiles conditions](#Linked-Audience-profiles-conditions) on which to build your audience.
5. Click **Preview** to view your audience selection and see a count of audience members who meet the criteria.
4. Select the [conditions](#Linked-Audience-conditions) on which to build your audience.
5. Click **Preview** to view your audience selection and see a count and list of audience members who meet the criteria.
6. When your audience is complete and accurate, click **Next**.
7. Enter an audience name and description to identify this configuration.
Optionally, select a folder to add this audience.
8. Click **Create Audience**.

### Linked Audience profiles conditions
### Maintaining Linked Audiences

As you're building your Linked Audience, you can choose from the following profiles conditions:
After creating your Linked Audience, you will be brought to the Overview page with the Linked Audience in a disabled state. On the Overview page, you can view relevant audience information, such as Profiles in Audience, Run Schedule, Latest run, Next compute. You can edit or delete your Linked Audience.

If you edit an audience with configured activation events, you should disable or delete impacted events for your audience to successfully compute. Events are impacted if they reference entities that are edited or removed from the audience definition.

You can also clone your linked audience to the same space from the List and Overview pages. Cloning a linked audience creates a new linked audience in the builder create flow with the same conditions as the linked audience that was cloned.

### Linked Audience conditions

The linked audiences builder sources profile trait and event keys from the data warehouse. This data must be synced to the data warehouse through [Profiles Sync](/docs/unify/profiles-sync/overview/) before you can reference it in the linked audience builder. If there is a profile trait that exists in the Segment Profile that hasn’t successfully synced to the data warehouse yet, it will be grayed out so that it can’t be selected.

The linked audience builder also returns a subset of available entity property key values, event property and context key values, and profile trait key values that you can select in the input field drop-down so that you don’t need to type in the exact value that you want to filter on.If you don’t see the value you’re looking for, you can manually enter it into the input field. Segment displays

* the first 100 unique string entity property values from the data warehouse.
* If you want to opt out of displaying entity property values from the data warehouse, contact Segment Support.
* the top 65 event property and context key values.
* the top 65 profile trait key values.

You can only create nested entity conditions up to six levels in depth. For example, an entity condition that queries for relationships between Profiles, Accounts, Credit Cards, and Transactions has four levels of depth.

As you're building your Linked Audience, you can choose from the following conditions:

| Profiles Conditions | Description |
|---------------------------|---------------------------------------|
| associated with an entity | Creates a condition that filters profiles associated with entity relationships defined in the [Data Graph](/docs/unify/linked-profiles/data-graph/). With this condition, you can navigate the full nested entity relationship and filter your audience on entity column values.
| not associated with an entity | Creates a condition that filters profiles that are not associated with entity relationships defined in the [Data Graph](/docs/unify/linked-profiles/data-graph/).
| with [profile trait](/docs/unify/#enrich-profiles-with-traits) | Creates a condition that filters profiles with a specific trait. |
| without [profile trait](/docs/unify/#enrich-profiles-with-traits) | Creates a condition that filters profiles without a specific trait. |
| part of an [audience](/docs/glossary/#audience) | Creates a condition that filters profiles that are part of an existing audience. |
| not part of an [audience](/docs/glossary/#audience) | Creates a condition that filters profiles that are not part of an existing |
| that performed [event](/docs/glossary/#event) | Creates a condition that filters profiles that have a specific event in their event history. You can also filter on event property values.|
| that did not performed [event](/docs/glossary/#event) | Creates a condition that filters profiles that do not have a specific event in their event history. You can also filter on event property values.|
| with entity | Creates a condition that filters profiles associated with entity relationships defined in the [Data Graph](/docs/unify/data-graph/). With this condition, you can navigate the full, nested entity relationships, and filter your audience on entity column values. The event condition type supports these configurations: at least: supports 1 or greater, exactly: supports 0 or greater, at most: supports 0 or greater* *When filtering by 0, you can’t filter on by entity properties or on additional nested entities.
| without entity | Creates a condition that filters profiles that are not associated with entity relationships defined in the [Data Graph](/docs/unify/linked-profiles/data-graph/).
| with [ trait](/docs/unify/#enrich-profiles-with-traits) | Creates a condition that filters profiles with a specific trait. |
| without [ trait](/docs/unify/#enrich-profiles-with-traits)| Creates a condition that filters profiles without a specific trait.|
| part of [audience](/docs/glossary/#audience) | Creates a condition that filters profiles that are part of an existing audience. |
| not part of [audience](/docs/glossary/#audience) | Creates a condition that filters profiles that are not part of an existing audience. |
| with [event](/docs/glossary/#event) | Creates a condition that filters profiles that have a specific event in their event history. You can also filter on event property values. The event condition type supports these configurations: at least: supports 1 or greater, exactly: supports 0 or greater, at most: supports 0 or greater|
| without [event](/docs/glossary/#event) | Creates a condition that filters profiles that do not have a specific event in their event history. You can also filter on event property values. You can also duplicate your conditions in the audience builder into the same condition group.|

#### Operator Selection

You can create audience definitions using either `AND` or `OR` operators across all condition levels. You can switch between these operators when filtering on multiple entity or event properties, between conditions within a condition group, and between condition groups.

**Example:**

**Note:** you can only create nested entity conditions up to four levels in depth. For example, an entity condition that queries for relationships between Profiles, Accounts, Credit Cards, and Transactions has four levels of depth.
![An example of the operator selection filled out.](/docs/engage/images/operator_selection.png)

#### Entity Explorer

If you have defined entity conditions in your audience definition, you will see a “Matched Entities” tab in the audience preview to help you understand what entities qualified a user to be a part of an audience.

This information appears when you click the user profile generated from the audience preview. The contextual information encompasses entity relationships as well as entity column values that were used as filtering criteria in the audience definition. By default, Segment includes the entity ID.The data being returned is truncated - 10 entities at each level, 6 levels of depth. If you want to opt out of this functionality, contact Segment Support.

![A screenshot of the Entity Explorer.](/docs/engage/images/entity_explorer.png)

#### Dynamic References

**Event Conditions**

When filtering on event properties, you can dynamically reference the value of another profile trait, or enter a constant value. These operators support dynamic references:
equals, not equals, less than, greater than, less than or equal, greater than or equal, contains, does not contain, starts with, ends with.

**Entity Conditions**

When filtering on entity properties, you can dynamically reference the value of another entity column (from the same entity branch at the same level or above it), profile trait, or enter a constant value.
You can only dynamically reference properties of the same data type. Dynamic references are only supported for certain operators depending on the data type:
NUMBER data type: equals, not equals, less than, greater than, less than or equal, greater than or equal
STRING data type: equals, not equals, contains, does not contain, starts with, ends with
TIMESTAMP data type: equals, not equals, less than, greater than, less than or equal, greater than or equal

## Step 2: Activate your Linked Audience

Expand Down Expand Up @@ -155,22 +203,21 @@ After building your Linked Audience, choose **Save and Enable**. You'll be redir
To enable your audience:
Select the **Enabled** toggle, then select **Enable audience**.

### Compute Now
### Run Now

You can trigger a compute for your audience if you want to send events to your destination without waiting for the next scheduled compute run. To do so, select **Compute Now**. This triggers a compute for the audience and sends events downstream.
You can trigger a run for your audience if you want to send events to your destination without waiting for the next scheduled run. To do so, select **Run Now**. This triggers a run for the audience and sends events downstream.

### Set a run schedule

Use the Audience Overview page to view the audience profile count, current run schedule, run status, and upcoming run time.

Determine when an audience should run and send data to enabled destinations with a run schedule:

- **Manual**: Trigger audience runs manually by clicking **Run Now** on the Audience Overview page.
- **Interval**: Trigger audience runs based on a predefined set of time intervals. Supported intervals are: 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 6 hours, 8 hours, 12 hours, or 1 day. If you select this option, Segment runs your audience after you enable the audience.
- **Day and time**: Trigger audience runs at specific times on selected days of the week. If you select this option, Segment runs your audience at the first selected date and time.
- **Interval**: Trigger audience runs based on a predefined set of time intervals. Supported intervals are: 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 6 hours, 8 hours, 12 hours, 1 day. If you select this option, Segment will run your audience after you enable the audience.
- **Day and time**: Trigger audience runs at specific times on selected days of the week. If you select this option, Segment will run your audience at the first selected date and time.

You can maintain your run schedule at any time from the audience's **Settings** tab.

You can also click **Run Now** on the Audience Overview page at any time (even if the run schedule is **Interval** Overview **Day and time**) to manually trigger a run on your warehouse and send data to enabled destinations.

There may be up to a 5 minute delay from the configured start time for audiences that are configured with the **Interval** and **Day and time** run schedules. For example, if you configured an audience with the **Day and time** compute schedule to run on Mondays at 8:00 AM, it can compute as late as Monday at 8:05 AM. This is to help Segment better manage system load.
There may be up to a 5 minute delay from the configured start time for audiences that are configured with the **Interval** and **Day and time** run schedules. For example, if you configured an audience with the **Day and time** compute schedule to run on Mondays at 8am, it can compute as late as Monday at 8:05am. This is to help us better manage our system load.
Binary file added src/engage/images/entity_explorer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/engage/images/operator_selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading