# Conditions # ![Screenshot_2020-04-29_at_19.12.41.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Yqlscreenshot-2020-04-29-at-19-12-41-png.png) Getting started This article will teach you about conditions, their types, and how to configure them. Conditions are used to determine whether a customer is eligible to get a promotion. Conditions can be found in the ***Promotions > Conditions / list*** At the **Conditions / list** window **Filters (1)** can be found which will help search for a specific type of conditions, and the list of **Conditions (2)** itself, which allows for searching conditions by name, editing, deleting, and adding new ones.
![Screenshot_2022-09-14_154342.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/screenshot-2022-09-14-154342-png.png)
*Visualization of the Promotions, Conditions / list*
![info2.svg](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Blminfo2-svg.png) **Remember****Conditions** and **Actions** are integral to **Promotion Rules**. All three can't be used individually. You can learn more about actions and rules in the [Actions](https://knowledge.tauceti-digital.com/books/e-commerce/page/actions) and [Rules](https://knowledge.tauceti-digital.com/books/e-commerce/page/rules) articles Table of contents: 1. [Conditions / list](#bkmrk-conditions-%2F-list) 1. [Filters](#bkmrk-filters) 2. [Conditions](#bkmrk-conditions) 2. [Creating new condition](#bkmrk-creating-new-conditi) 3. [Condition types](#bkmrk-condition-types) 1. [Discount code in cart](#bkmrk-discount-code-in-car) 2. [Discount code is empty in cart](#bkmrk-discount-code-is-emp) 3. [Order value](#bkmrk-order-value) 4. [Check if SKU(s) exist](#CON4) 5. [Active alt shop](#bkmrk-check-if-sku%28s%29-exis) 6. [Sum of quantities from SKU list](#bkmrk-active-alt-shop) 7. [Prima port ID in cart](#bkmrk-sum-of-quantities-fr) 8. [Count of orders](#bkmrk-prima-port-id-in-car) 9. [Days from last order](#bkmrk-count-of-orders) 10. [Voucher in cart](#bkmrk-days-from-last-order) 11. [Empty gift of choice in the cart](#bkmrk-voucher-in-the-cart) 12. [Delivery method](#bkmrk-empty-gift-of-choice) 13. [Payment method](#bkmrk-delivery-method) 14. [Customer title](#bkmrk-payment-method) 15. [Regular account](#bkmrk-customer-title) 16. [Order items count](#bkmrk-regular-account) 17. [Promotion rules active in cart](#bkmrk-promotion-rules-acti) --- # ![Screenshot_2020-04-29_at_19.12.41.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Yqlscreenshot-2020-04-29-at-19-12-41-png.png) Conditions / list ## Filters Filters are the first tab in **Conditions / list**. It is used to narrow the results in the **Conditions** list. **(1)** **Is active?** - Shows only active or inactive conditions. **(2) Type** - Shows only active or inactive conditions. **(3) Two buttons:** - **Apply filters** - Applies chosen filters to **Conditions** - **Clear filters** - Clears chosen filters and refreshes **Conditions**
![Screenshot_2022-09-14_161027.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/screenshot-2022-09-14-161027-png.png)
*Visualization of Filters, Conditions / list*
## ## Conditions The conditions list is the main tab in this module. Here new conditions can be added **(1)**, bellow there is a search field **(2)** that will filter out conditions names to typed letters. The table list itself **(3)** contains several columns, these are: - **ID** - The number given after the creation of the condition, it cannot be changed. Used only for database listing. - **Type** - Type of condition that determines its behavior (more about types in this section**\[LINK\]**) - **Name** - Name of the condition, used as the main identification. Its name is used for rules and in the search bar. - **Is active?** - Mark that shows whether a condition is active or inactive - **Actions** - Four buttons: - **Edit** - Edit condition, its name, description, whether it's active, and parameters. - **Duplicate** - Duplicates condition with exact same parameters, the name will be edited by gaining (copy) as a suffix and changing its activation status to inactive. - **Show** - Shows details of the condition without permission to edit. - **Delete** - Erase condition, it won't be recoverable.
![Screenshot_2022-09-14_163202.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/screenshot-2022-09-14-163202-png.png)
*Visualization of Filters, Conditions / list*
--- # ![Screenshot_2020-04-29_at_19.12.41.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Yqlscreenshot-2020-04-29-at-19-12-41-png.png) Creating new condition The condition has three fixed options that will stay the same **(1)**, these are: - **Name** - Name of the condition, used as the main identification. Its name is used for rules and in the search bar. - **Description** - Description serves as an additional source of information about the condition and its mechanics - **Is active?** - ON/OFF - switch to turn the condition active or inactive. There are also two **(2)** configurable options that determine its behavior, these are: - **Type** - Determines the main target of verification. Types are: - **Discount code in cart (link do każdego, scrollujący do danego typu)** - **Discount code is empty in cart** - **Order value** - **Check if SKU(s) exist** - **Active alt shop** - **Sum of quantities from SKU list** - **Prima port ID in cart** - **Count of orders** - **Days from last order** - **Voucher in the cart** - **Empty gift of choice in the cart** - **Delivery method** - **Payment method** - **Customer title** - **Regular account** - **Order items count** - **Promotion rules active in cart** - **Parameters** - JSON code used for parametrization of the condition.
![Screenshot_2022-09-15_152600.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/screenshot-2022-09-15-152600-png.png)
*Visualization of Filters, Conditions / list*
![info2.svg](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Blminfo2-svg.png) **Remember****JSON** is a light-weighted format to exchange data. More about this format you can learn from here. # ![Screenshot_2020-04-29_at_19.12.41.png](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Yqlscreenshot-2020-04-29-at-19-12-41-png.png) Condition types The type of condition defines what it's supposed to look for when calculating cart items and values. Here are described all types of conditions and their parameters ### ### Discount code in cart This condition checks if there is a discount code in the cart (more about discount codes can be found in the [Discount codes](https://knowledge.tauceti-digital.com/books/e-commerce/page/discount-codes) article). Parameters: - **None** Logic operators: - **=** - **!=** Logic values: - **Discount code name** ![info2.svg](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Blminfo2-svg.png) **Remember** Since this condition type is so general and lacks any parameters. There is usually one of this type in the environment. ### ### Discount code is empty in cart This condition checks if there isn't a discount code in the cart. Parameters: - **Discount code name** - it is not used in the condition itself since adding this type of condition to the rule will require naming it. Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** ![info2.svg](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/Blminfo2-svg.png) **Remember**Since this condition type is so general and lacks any parameters. There is usually one of this type in the environment. ### ### Order value This condition checks the current cart value. Parameters: - **prices**: - **promotion** - used by default, counts the value of products by promotion prices - **catalog** - counts values of products by their standard prices - **consider\_discounts**: - **FALSE** - used by default, counts the value before all discounts - **TRUE** - calculate order value after all discounts - **use\_default\_excluded\_list**: - **TRUE** - used by default, uses global excluded SKU list - **FALSE** - excluded SKUs will also be counted toward the cart value - **include\_payed\_gifts**: - **TRUE** - consider the value of payed gifts - **FALSE** - used by default, do not count payed gifts - **include\_opensets**: - **TRUE** - opensets count into the cart value - **FALSE** - used by default, do not count value of opensets - **exclude\_products**: - **Array** - SKU numbers, these will be excluded from the order value. This parameter is above and will exclude products regardless of **use\_default\_excluded\_list** parameter. - **exclude\_fid\_discounted\_products**: - **TRUE** - Products discounted by the fidelity program will not be counted. - **FALSE** - used by default, do not count value of products discounted by fidelity points Logic operators: - **=** - **!=** - **>** - **<** - **>=** - **<=** Logic values: - **Number** - cart value Example: - {"prices":"catalog","consider\_discounts":"TRUE","exclude\_products":\["12345","54321"\]} ### ### Check if SKU(s) exist This condition checks if the product SKUs from the selected array are present in the cart. Parameters: - **SKU**: - **Array** - SKU numbers, without this parameter the condition won't work. - **required\_quantity**: - **all** - All SKUs from the **SKU** parameter have to be present in the cart - **number** - Number of SKUs from the SKU parameter that has to be present. - **consider\_quantity**: - **TRUE** - The number of pieces counts towards the **SKU** parameter (for example if the **SKU** parameter has 3 SKU's in the list then one of these SKU's added 3 times to the cart will return **TRUE** value in the promotion rule) - **FALSE** - Used by default, doesn't count the number of pieces Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Example: - {"SKU":\["12345","54321"\],"required\_quantity":"5"} ### ### Active alt shop This condition checks the altshop. This type is deprecated and unused. Promotion rules already are able to filter altshops. ### ### Sum of quantities from SKU list This type sums up all pieces from the SKU list set in the parameters. Parameters: - **SKU**: - **Array** - SKU numbers, without this parameter the condition won't work. Logic operators: - **=** - **!=** - **>** - **<** - **>=** - **<=** Logic values: - **Number** - Quantity of products Example: - {"SKU":\["54321","12345"\]} ### ### Prima port ID in cart This type of condition is no longer supported since Prima port is no longer used. ### ### Count of orders This type count the number of orders in the customer account. Parameters: - **orders**: - **all** - All orders from the customer account will be counted (still regulated by the rest of the parameters) - **all\_mc** - All orders are counted but since the date of gaining a title. You can learn more about customer titles in the [Campaigns and titles](https://knowledge.tauceti-digital.com/books/e-commerce/page/campaigns-and-titles) article. - **current\_title **- Orders are counted since the date of gaining the current customer title. - **active\_rule** - Orders are counted only if they used certain promotion rules (list from parameter **rule id**) - **campaigns**: - **Array** - List of campaigns short names (more about campaigns in this article **\[UNDER CONSTRUCTION\]** - **date\_from**: - **date** - The format for the date is YYYY-MM-DD (for example 2018-12-31). Orders will be counted from this date onwards. - **date\_to**: - **date** - The format for the date is YYYY-MM-DD (for example 2018-12-31). Counted will be orders placed only before this date. - **titles**: - **Array** - List of title short names. Orders will be counted only if they were placed while the customer had these titles. Only used when parameter **"orders":"current\_title"** - **rule\_id**: - **Array** - List of **Rules** id's. This parameter only works with **"orders":"active\_rule"** - **only\_paid**: - **TRUE** - Only COD or fully paid orders are counted. - **FALSE** - Orders with pending payment are also counted - **altshop\_id**: - id of altshop only from which orders are considered. The parameter value can only be one altshop/one ID. You can't use an array of altshop ID's. **Syntax example:** - {"altshop\_id":"122"} Logic operators: - **=** - **!=** - **>** - **<** - **>=** - **<=** Logic values: - **Number** - Orders Example: - {"orders":"all\_mc","campaigns":\["Campaign1","Campaign2"\],"date\_from":"2023-01-12","date\_to":"2023-02-22"} ### Days from last order This condition count passed days from the last order. Parameters: - **orders**: - **all** - All orders from the customer account will be counted (still regulated by the rest of the parameters) - **all\_mc** - All orders are counted but since the date of gaining a title. You can learn more about customer titles in the [Campaigns and titles](https://knowledge.tauceti-digital.com/books/e-commerce/page/campaigns-and-titles) article. - **current\_title **- Orders are counted since the date of gaining the current customer title. - **active\_rule** - Orders are counted only if they used certain promotion rules (list from parameter **rule id**) - **campaigns**: - **Array** - List of campaigns short names (more about campaigns in this article **\[UNDER CONSTRUCTION\]** - **date\_from**: - **date** - The format for the date is YYYY-MM-DD (for example 2018-12-31). Orders will be counted from this date onwards. - **date\_to**: - **date** - The format for the date is YYYY-MM-DD (for example 2018-12-31). Counted will be orders placed only before this date. Logic operators: - **=** - **!=** - **>** - **<** - **>=** - **<=** Logic values: - **Number** - Orders Example: - {"orders":"all\_mc","campaigns":\["Campaign1","Campaign2"\],"date\_from":"2023-01-12","date\_to":"2023-02-22"} ![caution.svg](https://knowledge.tauceti-digital.com/uploads/images/gallery/2024-11/vDBcaution-svg.png) **Warning** If there are no order-matching rules defined by parameters, the condition will return 999 days. We strongly recommend pairing this condition with "Count of closed orders > 0" ### ### Voucher in the cart This condition verifies whether there is applied promotion code in the cart. Parameters: - **type**: - **1** - Fiden2 code, this type is set as default. - **2** - Promotion code from ***Promotions > Discount codes / list***. You can learn more about discount codes in the [Discount codes](https://knowledge.tauceti-digital.com/books/e-commerce/page/discount-codes) article. Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Example: - {"type":"2"} ### ### Empty gift of choice in cart This condition will check if the customer chooses a certain, empty gift from the **Gift of choice** action type. You can learn more about actions in the [Actions](https://knowledge.tauceti-digital.com/books/e-commerce/page/actions) article. Parameters: - **rule\_id**: - **1** - Fiden2 code, this type is set as default. - **2** - Promotion code from ***Promotions > Discount codes / list*** (More about codes in this article**\[UNDER CONSTRUCTION\]**) Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Example: - {"rule\_id":"2"} ### ### Delivery method This type checks chosen delivery method. Parameters: - **name**: - **Array** - List of delivery method names. Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Example: - {"name":\["Delivery1","Delivery2"\]} ### ### Payment method This type checks chosen payment method. Parameters: - **name**: - **Array** - List of delivery method names. Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Example: - {"name":\["Payment1","Payment2"\]} ### ### Customer title This type checks current customer title. Parameters: - **include\_title**: - **Array** - List of **shortcut title names** that will count into the **TRUE** value during calculation. - **exclude\_title**: - **Array** - List of **shortcut title names** that will count into the **FALSE** value during calculation. Logic operators: - **=** - **!=** - Logic values: - **TRUE** - **FALSE** Example: - {"include\_title":\["T0","TS"\]} ### ### Regular account This type checks if a customer is logged in to a registered account (not one-time). Parameters: - **None** Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** ### ### Orders item count This type checks the number of items in the cart. Parameters: - **consider\_quantity:** - **TRUE** - Set by default, every piece in each row will be counted. - **FALSE** - Only unique SKUs will be counted. - **consider\_gifts**: - **TRUE** - Gifts will be counted to this condition. - **FALSE** - Set by default, gifts won't be counted to this condition. - **consider\_sets**: - **TRUE** - All sets will be counted. - **FALSE** - Set by default, sets won't be counted. - **consider\_outlet**: - **TRUE** - Discounted products with the flag outlet will count toward this condition. - **FALSE** - Set by default, products with the flag outlet won't be counted. - **consider\_greenpoint**: - **TRUE** - Products with the flag greenpoint will count toward this condition. - **FALSE** - Set by default, products with the flag greenpoint won't be counted. Logic operators: - **=** - **!=** - **>** - **<** - **>=** - **<=** Logic values: - **Number** - Products in a cart Example: - {"consider\_quantity":"FALSE","consider\_greenpoint":"TRUE"} ### Promotion rules active in cart This type checks if a set of rules is active in a cart. A rule is considered an active one when its conditions are met. A rule with no conditions is always considered as active. It is important to remember to set a sort order in a rule with this condition to a high value, so it is read last by the promotion module. Parameters: - **rule\_ids:** - **Array**- list of rules' IDs that are checked for activity. Set by default, every piece in each row will be counted. - **mode (Default "all")**: - **"all"** means *all of the rules must be active*, - **"any"** means *any of the rules must be active.* Logic operators: - **=** - **!=** Logic values: - **TRUE** - **FALSE** Examples: - **Rule 123 is active:** - {"rule\_ids": \[123\]} - **All the rules 123 and 321 are active**: - {"rule\_ids": \[123, 321\]} - **Any of the rules 123 and 321 is active:** - {"rule\_ids": \[123, 321\], "mode": "any"\]}