Adding a Freebie Condition with the List Based Method (3.2)

Set the conditions to determine how freebies should be shared in the order based on the added products.

  • One condition is to distribute certain freebies in the first delivery when the minimum number of required promotional products are added to the order cart.

  • Products that will be distributed as freebies must be separate related records.

To create a priority Freebie Condition record:

  1. Go to the created Freebie Type record → click the Related tab → click New in the Freebie Condition section.

  2. Enter the following:

    • Freebie Condition Name: All. Bio Balance.Kefir.

    • Delivery Control: select First to share freebies in the first delivery.

    • Order: 1.

      The field is responsible for the order in which Freebie Conditions of Freebie Type are applied. Since we only use one Freebie Condition in the workshop, you can specify any value in this field.
    • Select a Promotion for which you are creating a condition. Promotion is required for the correct distribution of freebies for the Selective freebie type.

    • Set Active.

    • Condition Details: add this JSON, according to which the condition will trigger for the certain promotion product if the required number of such products is added to the order cart.

      Click to view JSON
      { "levelConditions": {
        "operator": "AND",
        "productCount": {
          "filter": {
            "operator": "AND",
            "items": [
              {
                "field": "orders__PromotionId__r.orders__ExternalId__c",
                "operator": "equal",
                "value": "all_bb_kefir"
              },
              {
                "field": "orders__PromotionLineItemId__r.RecordType.DeveloperName",
                "operator": "equal",
                "value": "Product"
              }
      
            ]
      
          },
          "minCount": 1
        },
        "requiredProducts": {
          "productIdField": "ProductId__r.CTCPG__ExternalId__c",
          "operator": "AND",
          "items": [
      
          ]
      
        }
      
      },
       "levelBasedOnFilter": {
         "operator": "AND",
         "items": [
           {
             "field": "orders__PromotionId__r.orders__ExternalId__c",
             "operator": "equal",
             "value": "all_bb_kefir"
           },
           {
             "field": "orders__PromotionLineItemId__r.RecordType.DeveloperName",
             "operator": "equal",
             "value": "Product"
           }
      
         ]
      
       }
      }
    • Adding Method: select List Based to distribute certain products.

      2021 08 06 18 30 07
  3. Click Save.

The Freebie Condition record is created.

``