# Trigger Advanced Settings

In the advanced settings of each trigger, you have the option to set the number of trigger events required within a specific time frame to activate the said Trigger.

<figure><img src="https://1346201199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4f6ZGVeTyRL9FmNULCt%2Fuploads%2FoDuZcFpy1pCyxJ8yMjxh%2FCleanShot%202023-06-13%20at%2010.46.11%402x.png?alt=media&#x26;token=2d07257d-3c5b-477a-9ab7-c15be0bed3d5" alt="" width="375"><figcaption><p>At least 5 tokens have to be received by any member of the Alpha group within within a 6 hour timeframe for for this trigger.</p></figcaption></figure>

The count by field determines what distinct values, or value combos to count. You can select one or multiple options from count by Token, Wallet and Collection

### The Count By mechanism with examples

In the following three examples, we've created a [Token Bought](https://docs.compass.art/automations/triggers/token-bought) trigger for a [Wallet Group](https://docs.compass.art/wallets/wallet-groups). We show how the different count-by settings activate the trigger.&#x20;

**Example 1**

Below we can see a table with the NFT purchases of the wallet group.&#x20;

Our Token Bought trigger has the following settings:\
**Min triggers to run:** 2\
**Count by:** Wallet

Let's see when and why our trigger activates.

<figure><img src="https://1346201199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4f6ZGVeTyRL9FmNULCt%2Fuploads%2FMQnuMIt6CvQsoOcAJvgK%2FCleanShot%202023-06-13%20at%2015.53.00%402x.png?alt=media&#x26;token=5cf68f8b-3190-492a-864e-95d34e674c98" alt="" width="343"><figcaption></figcaption></figure>

The with our trigger settings, the trigger is looking for wallets that make at least 2 purchases. Therefore it will trigger on Transaction 3, 5 and 6; as wallet A purchased 3 times and wallet B purchased 2 times. The trigger will only activate when a wallet buys at least 2 times from any collection and any token.

**Example 2**

In this example we've set the default settings for the Trigger.&#x20;

Our Token Bought trigger has the following settings:\
**Min triggers to run:** 1\
**Count by:** Token

<figure><img src="https://1346201199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4f6ZGVeTyRL9FmNULCt%2Fuploads%2F3J7ZcyNIwcpdr7ZzFImr%2FCleanShot%202023-06-13%20at%2015.59.44%402x.png?alt=media&#x26;token=b0ca56f2-ac57-4328-8161-0d1237dba20d" alt="" width="340"><figcaption></figcaption></figure>

The trigger is looking for transactions that have purchased a token. Therefore it will trigger for every single transaction.

**Example 3**

In this example, we've picked both Wallet and Collection as count-by values.

Our Token Bought trigger has the following settings:\
**Min triggers to run:** 2\
**Count by:** Wallet,Collection

<figure><img src="https://1346201199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ft4f6ZGVeTyRL9FmNULCt%2Fuploads%2FtBZcWrP3KbuPXAfOF5Ki%2FCleanShot%202023-06-13%20at%2016.01.42%402x.png?alt=media&#x26;token=ac4649b9-cbef-4c77-8266-794710ea75cb" alt="" width="317"><figcaption></figcaption></figure>

Here, the trigger is looking for the same wallet to have at least 2 purchases from the same collection. In other words it is looking at least 2 instances of the same Wallet-Collection pair.

It will trigger for transaction 5 as only Wallet A has purchased 2 or more times from the DOODLES collection.
