{"section":"tutorials","requestedLocale":"en","requestedSlug":"creating-promotion-for-a-customer-cluster","locale":"en","slug":"creating-promotion-for-a-customer-cluster","path":"docs/en/tutorials/promotions-and-taxes/promotions/creating-promotion-for-a-customer-cluster.md","branch":"main","content":"A promotion for a customer cluster is a promotion that is only valid for a group of customers previously determined in the Master Data module. This promotion will only apply to selected customers who are logged into the website, and it will only be displayed in the shopping cart.\n\nConfiguring customer clusters allows you to create a variety of promotions tailored to segmented audiences.\n\nBefore creating a promotion, you must define the property that determines whether a customer is part of the cluster. To do this, you can use fields that already exist in the customer profile (for example, `email`) or [create a customer cluster in the __Master Data__ module](/en/faq/como-criar-um-cluster-de-clientes/).\n\nAfter configuring the property, follow the instructions below.\n\n1. In the VTEX Admin, go to *Promotions > Promotions*, or type *Promotions* in the search bar at the top of the page.\n2. Search for the promotion you would like to configure (or [create a new promotion](/en/tutorial/como-criar-promocoes/)).\n3. Go to the section **What are the conditions for the promotion to be valid?**\n4. Check the box next to **Customer cluster**.\n5. Select the criteria you would like to configure:\n    *   **All of the following conditions:** the customer must meet all of the requirements to be included in the promotion.\n    *   **At least one of the following conditions:** if the customer meets any of the listed criteria, they will be included in the promotion.\n6. Fill in the field with the cluster you would like to link to the promotion. [See below for more information on how to fill in this field.](#filling-in-the-customer-cluster-field) You can add more than one cluster by clicking on the `+` button.\n7. Click on `Save`.\n\n> ℹ️ You can enter a maximum of 50 clusters in the **Customer cluster** option.\n\n## Filling in the Customer cluster field\n\nThere are two possible criteria for selecting a cluster for the promotion, and, therefore, two options for completing the **Customer cluster** field: \n\n*   with an [equality function](#equality-function): `{propertyname}={value}`\n*   with a [contains function](#contains-function): `{propertyname} contains {value}`\n\nNote that, in both options, `{propertyname}` must be replaced with the name of the field in the data entity, and `{value}` must be replaced with the value determined in the Master Data.\n\n### Equality function\n\nThe expression `{propertyname}={\"value\"}` must be used when the information contained in the customer profile for the given property must be exactly equal to the value entered in the expression.\n\nIn the configuration below, for example, only `employee` entries with the value `true` (used in a **[Boolean](/en/docs/tutorials/data-entity)** field, where values are always `true` or `false`) will receive the promotion.\n\nYou could also configure `employee=false`, where only `employee` entries with the value `false` in the field would receive the promotion.\n\n![Campo funcionário Master Data EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/promotions/creating-promotion-for-a-customer-cluster_1.png)\n\n![Cluster de clientes EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/promotions/creating-promotion-for-a-customer-cluster_2.png)\n\nGiven a field of type **[Varchar](/en/docs/tutorials/data-entity)**, we could configure `employee=\"yes\"` so that only customers with the value `\"yes\"` in the field receive the promotion.\n\n> ⚠️ For fields of type **Varchar**, the value entered in the **Customer cluster** section of the promotion is case-sensitive. This means that if you fill in the option **Customer cluster** in a way that differs from the one determined for the field in the Master Data, the promotion will not be applied.\n\nTherefore, considering the above example of a field of type **Varchar** with the values `\"yes\"` and `\"no\"`, the entry in the promotion must be `employee=\"yes\"`. When entering, for example, `employee=\"Yes\"` in the promotion, the customer cluster will not receive the promotion.\n\n### Contains function\n\nThe expression `{propertyname} contains {\"value\"}` must be used when the information in the customer profile for the given property must **contain** the `value` entered in the expression.\n\nFor example, if you want to create a cluster with only customers whose emails contain `@test.com`, the configuration will follow the example below.\n\n![Campo Email Master Data](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/promotions/creating-promotion-for-a-customer-cluster_3.png)\n\n![cluster email EN](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/promotions-and-taxes/promotions/creating-promotion-for-a-customer-cluster_4.png)\n\nIn this case, `email contains test.com` will be `true`, for example, when the value is `john@test.com`, and `false` when the value is `john@test.org`."}