> For the complete documentation index, see [llms.txt](https://limechatai.gitbook.io/limechat-product-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://limechatai.gitbook.io/limechat-product-guide/whatsapp-marketing/segments/creating-a-segment/segment-2-based-on-what-customer-did-in-a-event.md).

# Segment-2: Based on what customer did in a event

### Segment Definition:

*<mark style="color:green;">Customers who purchased product 'x' OR 'y' in May 2023.</mark>*

Let's breakdown this into the different filters:

1. Filter-1: Who performed the event: Order Created
2. Filter-2: Number of times the event was performed: Once or more
3. Filter-3: When the event was performed: In the month of May
4. Filter-4: Who bought product 'x' OR 'y'

\
Setting up the first three filters is what we learned in the previous example. This is how we can do it.

**Step-1: Setup the first three filters**

All customers who did `Order Created` where `total`  `is greater than or equal to` `1`  `in date range`  `May 1, 2023 - May 31, 2023`.

<figure><img src="/files/GcWnB1gxbOLg2270pDKY" alt=""><figcaption></figcaption></figure>

**Step-2: Add product filter**

Using the filter icon to the right of the first rule, choose `Products`

<figure><img src="/files/G9Is3QHfdJF2nYGtPOxa" alt=""><figcaption></figcaption></figure>

**Step-3: Specify the products 'x' and 'y'**

Add the *Product IDs* corresponding to product x and product y.&#x20;

This will filter all those purchase events where one of the purchased products was in the list of products IDs specified. These are comma separated values.

<figure><img src="/files/XmcfyHLjhJMGlgqQR9fA" alt=""><figcaption></figcaption></figure>

Give a name to your segment & save it. We are done!
