# Collections

> A collection is a list of items of your choice that you can use as an attribute in rules or cart item filters.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

Typically, you can use a collection to create a large list of SKUs or items that you want
to whitelist or blacklist for a campaign.

For example, let's imagine we want to create an end-of-season campaign that gives a 40% discount
on all beachwear items. To achieve this, we can create a collection containing all our
items and use it to create a [cart item filter](/docs/product/rules/cart-item-filters/overview.md).

Collections can be created within a campaign or at the account level.
[Campaign-level collections](#create-a-campaign-level-collection)
are available only in the campaign where they are created.
[Account-level collections](/docs/product/account/manage-collections.md) can be enabled
for different Applications and used in different campaigns at the same time.

:::tip
To target specific groups of customers in your campaigns, use [audiences](/docs/product/audiences/overview.md).
:::

## Create a campaign-level collection

You can create a collection in a [standard campaign](/docs/product/campaigns/overview#standard-campaigns) at any time.
Before you create one, check if the list of items you need is already managed
in an [account-level collection](/docs/product/account/manage-collections.md).

To create a collection:

1. Prepare a UTF-8 CSV file containing the items in your collection.

   :::important
   Only one column is required and its header **must** be `item`. The maximum number of items
   is 500,000.
   :::

1. On the left-side menu of a campaign, click <RuleBuilder className="icon"/>  **Rule Builder**.
1. In the top-right corner of the page, click <Collections className="icon"/> **Collections**.
1. Define a name and description for the collection.
1. In **Import items**, upload the CSV file.
1. Click **Create Collection**.

## Use a collection to create a cart item filter

After creating a collection, you can use it to create a [cart item filter](/docs/product/rules/cart-item-filters/overview.md)
We can add a condition that checks if the item belongs to the collection
we created in the previous step.

To use a collection:

1. Click **Cart Item Filters** > <Add className="icon"/> **Add Filter Step**.
1. Select **Filter items by conditions**, and select an attribute of `string` type,
   for example, <Attribute name="SKU of item (Item)" type="builtin" />.
1. Select the **is in collection** operator.
1. Select the collection [you created](#create-a-campaign-level-collection).
1. Name your filter and click **Save Filter**.

You can [use the cart item filter](/docs/product/tutorials/coupons/cart-item-filters-discount.md)
in your rules to give, for example, a 40% discount on all beachwear items in the customer's cart when
they add at least one item.

## Edit a collection

You can edit the details of a collection at any point. You can also download a CSV file
with the items in the collection, or upload a new list of items.

To edit a collection:

1. On the left-side menu of your campaign, click <RuleBuilder className="icon"/> **Rule Builder**.
1. In the top-right corner of the page, click <Collections className="icon"/> **Collections**.
1. Next to the collection you want to edit, click <Edit className="icon" />.
1. Edit the collection description, download a CSV file with the list of items in the collection,
   or upload a new CSV file with more items.

   :::note
   Uploading a new CSV file overwrites any items already contained in the collection.
   :::
1. Click **Save Changes**.

## Delete a collection

You can delete a collection when you don't need it anymore.

To delete a collection:

1. On the left-side menu of your campaign, click <RuleBuilder className="icon"/> **Rule Builder**.
1. In the top-right corner of the page, click <Collections className="icon"/> **Collections**.
1. Next to the collection you want to delete, click <Delete className="icon" />.
1. In the pop-up that appears, click **Delete**.

## Related pages

- [Manage account-level collections](/docs/product/account/manage-collections.md)
- [The Rule Builder](/docs/product/rules/overview.md#attribute-selector)
- [Audiences](/docs/product/audiences/overview.md)
- [Manage a value map](/docs/product/rules/manage-value-map.md)
