> For the complete documentation index, see [llms.txt](https://docs.dfinery.ai/user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dfinery.ai/user-guide/en/customer/audience/undefined.md).

# Audience Filter Rules

## **Create an audience group**

Audience groups are made up of a combination of filter conditions, which are broadly divided into event and user profile conditions.

<table><thead><tr><th width="161">Filter Conditions</th><th>Limit Rule</th></tr></thead><tbody><tr><td><strong>Event</strong></td><td>Up to 2 possible</td></tr><tr><td><strong>User Profile</strong></td><td>No limit on the number (but filter conditions cannot be added with the same properties)</td></tr></tbody></table>

At this time, you can only add with the same filter conditions within a group. ( [Related Guide](https://docs.dfinery.ai/user-guide/customer/audience#undefined-3) )

## **Event Filter**

### **Overview of how events are aggregated**

Events are broadly divided into **counts** and the way they aggregate **the sub-attributes** of the event . In the case of attribute aggregation **, the sub-attributes of the event must be registered to be used** .

{% embed url="<https://youtu.be/KDd-OUui7Nw>" %}

<table><thead><tr><th width="155">Aggregation Method</th><th width="274">Explanation</th><th>Note</th></tr></thead><tbody><tr><td><strong>Total Count</strong></td><td>You can filter conditions on the total number of events that occurred within a period.</td><td></td></tr><tr><td><strong>Attribute Aggregation</strong></td><td>You can filter by aggregating sub-properties of the selected event.</td><td>*Filtering by attribute aggregation is not possible for all events, all active events, and system events.</td></tr></tbody></table>

### **Number**

It refers to the number of times an event occurs.

#### **Example**

If you want to set a condition for **customers who have made more than 5 purchase events in the past 30 days, you can set it as follows.**

{% embed url="<https://youtu.be/lQrDJ1g-McQ>" %}

### **Attribute**

You can set more detailed conditions with sub-properties of the event.

#### **Example**

**If you want to set the customer as a customer who has purchased a total shipping fee of 5,000 won over the past 30 days,** you can set it as follows.

{% embed url="<https://youtu.be/__fSdU3mKS8>" %}

Shipping fees are collected as integer data, and you can choose aggregation methods such as sum, average, minimum, and maximum.\
**However, if the data type is different, the aggregation function provided will be different according to the table below.**

<table><thead><tr><th width="305">Attribute data type</th><th>Aggregate function</th></tr></thead><tbody><tr><td><strong>String</strong></td><td>• Number of attributes (Unique)</td></tr><tr><td><p><strong>Integer (Number)</strong></p><p><br><strong>Mistake (Double)</strong></p></td><td>• Sum<br>• Average<br>• Min<br>• Max</td></tr><tr><td><strong>List of strings</strong></td><td><code>Not supported</code></td></tr><tr><td><strong>True/False (Boolean)</strong></td><td><code>Not supported</code></td></tr><tr><td><strong>Date and Time (Datetime)</strong></td><td><code>Not supported</code></td></tr><tr><td><strong>Character (String enum)</strong></td><td><code>Not supported</code></td></tr><tr><td><strong>List of “Number | Double”</strong></td><td><code>Not supported</code></td></tr></tbody></table>

### **Add event filter**

After selecting an event, you can filter the event further by adding detailed conditions. There is no limit to the number of filters, but you cannot add duplicate properties that have already been added.

Basically, all events can be filtered by the DFINERY auto-collected properties, and additional filtering is also possible by sub-properties of the selected event.

#### **Example**

If you want to add a filter called **Customers who purchased in Gangnam-gu** to the previous example ( **Customers who made more than 5 purchase events in the past 30 days), you can set it up as follows.**

{% embed url="<https://youtu.be/w-jO8mUFdrQ>" %}

{% hint style="warning" %}
**Event Attributes Precautions**

* Not operator (does not include, excludes values, excludes starts with, excludes between values) is not supported.
* Only one List type can be used at most.
  {% endhint %}

## **User Profile**

Unlike event conditions, user profiles can be filtered directly by the always up-to-date user profile DB attribute values ​​without selecting events.

#### **Example**

If you want to set a condition for **customers who are female and have a membership level of 'Diamond' , you can set it as follows.**

{% embed url="<https://youtu.be/4xlc0CmzI6U>" %}

User profiles are broadly divided into categories: user properties, recent device properties, and behavioral properties. ( [Related Guide](https://docs.dfinery.ai/user-guide/customer/audience#undefined-3) )

There is no limit to the number of conditions you can add to a user profile, but you cannot add duplicate properties that have already been added.

## **Period Filter**

### **Viewable period**

* You can set up to 100 days per group.
* When the period is set to 'Relative', the selectable reference date can also be set to up to 100 days in advance.
* When combining two groups, you can search for up to 200 days. ( [Related Guide](https://docs.dfinery.ai/user-guide/customer/audience/samples#id-200) )


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.dfinery.ai/user-guide/en/customer/audience/undefined.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
