# Rule action: Remove duplicate items

### Use cases

* Exclude all items with duplicate identifiers
* Exclude all but one item with duplicate identifiers. For example, keep the item with the lowest price
* Exclude the items with higher prices

Use the **Remove duplicate items** action to manage duplicate items in your product data. For example, most channels do not accept reuse of GTIN codes for different items, because they are meant to be unique identifiers.

### Exclude all items with duplicate identifiers

Choose the field to use for removing duplicate items. For example, you can exclude all items with duplicate values in the **id** field.

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/T33INVFZHAvns6ur7QAM/360007537340" alt=""><figcaption></figcaption></figure>

Applying this rule to this example data, both "Nike Air Max sneaker" and "Adidas Classic sneaker" are excluded because they have the same id.

| id  | title                  |
| --- | ---------------------- |
| 123 | Nike Air Max sneaker   |
| 123 | Adidas Classic sneaker |
| 654 | New Balance sneaker    |

### Exclude all but one item with duplicate identifiers

In some cases, you may want to keep one of the duplicate items. For example, when you want to advertise only one variant with the lowest price.

<figure><img src="https://content.gitbook.com/content/u8whzIfip72Kvn3M1bsc/blobs/iNwZGzOanzQag8rnPL1v/360007537400" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: Check the "Sort numbers" box if you want to compare numeric amounts. If you want to compare text values, make sure the "Sort numbers" box is not checked.
{% endhint %}

### Exclude the items with the higher prices

The Round Design Tables are different sizes but share the same id. If you want to advertise only the lowest price, use **Remove duplicate items** to **exclude the items with the higher prices**.

| id  | title                            | price  |
| --- | -------------------------------- | ------ |
| 234 | The Round Design Table 100x100cm | 650.00 |
| 234 | The Round Design Table 120x120cm | 750.00 |
| 234 | The Round Design Table 140x140cm | 850.00 |
| 653 | The Square Design Table 50x50cm  | 500.00 |

After applying the deduplicate rule, the output data looks like:

| id  | title                            | price  |
| --- | -------------------------------- | ------ |
| 234 | The Round Design Table 100x100cm | 650.00 |
| 653 | The Square Design Table 50x50cm  | 500.00 |
