How to handle Modifer Groups

Modifiers and modifier groups

To explain what modifiers and modifier groups are, consider the following example.

Say that a restaurant sells a product "Build your own pizza" and the restaurant wants to offer the first topping i.e., "Pepperoni" and also the ability to add extra topping "Bacon" and "Mushroom" which has a price.

In Deliverect, this will be modeled using modifiers and modifier groups. Each topping is a modifier, which will end up looking like this in the JSON sent in a menu push request:


"modifiers": {
  "63578d7b678870d57eb70996": {
                    "name": "Pepperoni",
                    "productType": 2,
                    "plu": "PEPP-#O0#-",
                    "price": 0,
                        }
...
 "63578d7b678870d57eb7099d": {
                    "name": "Bacon",
                    "productType": 2,
                    "plu": "BAC-#O1#-",
                    "price": 100,
                        }   
...
"63578d7b678870d57eb7099f": {
                    "name": "Mushroom",
                    "productType": 2,
                    "plu": "MUSH-#O1#-",
                    "price": 100,

To group the different choices (modifiers), we create a modifier group. The group should have a customer-facing name (e.g., "Choose your First Topping")

The IDs of the modifiers corresponding to each topping are in the subProductsarray,

"modifierGroups": {

"63578d7b678870d57eb7099b": {
                    "name": "Choose your First Two Toppings",
                    "productType": 3,
  ...
                    "plu": "FREE-TOP",
                    "subProducts": [
                        "63578d7b678870d57eb70996",
                        "63578d7b678870d57eb70997",
                        "63578d7b678870d57eb70998",
                        "63578d7b678870d57eb70999",
                        "63578d7b678870d57eb7099a"
                    ],
                    "max": 2,
                    "min": 2,
                    "multiMax":2
...
                },

Modifier groups can also contain regular products "productType": 1 inside apart from modifiers "productType": 2.

Minimum, Maximum and Multi-Max

In the example above, you will see the "max", "min" and "multiMax" attributes, these represent certain ordering constraints set when ordering from this group of options.

Certain scenarios as follows can be expected, depending on different configurations of these attributes;

Optional Choice

Where a choice is optional, then you should expect"min": 0to be set.

Required Choice

Where a choice is required, then you should expect"min": 1to be set

Maximum Total Limit (per group)

If customers want to limit the total number of extra toppings to five within any one product selection, you would expect "max": 5.

Maximum Total Limit (per individual option)

If customers want to limit the total number of any one topping to two you would expect "multiMax": 2

Nested Modifiers

These are modifiers that are part of a modifier group which is nested within another modifier group. In the specific example, Chicken Sate, you can select your dish and add a modifier from Rice or Noodles selection. After you do that, you will be asked to choose additional modifiers, like the sate or hot sauce which are nested.

  • Product Type: 1 Chicken Sate
    • Product Type 3: Rice Selection
      • Product Type 2: White Rice
        • Product Type 3: Choose a Sauce
          • Product Type 2: Sate Sauce
          • Product Type 2: Hot Sauce

subProducts, parentId, PLU

You can find the products that exist for each category and/or group (bundles, modifier groups) under subProducts. Do not reference the parentId parameter as this is deprecated.

Default Quantity (pre-selected)

An attribute "defaultQuantity" can be included to a sub-item to instructs whether it should be 'pre-selected'.

e.g. where "defaultQuantity": 1, or any quantity > 0 the channel should ensure the item is pre-selected. Typically this will only display '1', although higher default quantities can also be set if pre-selecting a specific quantity is supported.

Multi-select modifiers

In some cases, it must be possible for modifiers in a modifier group to be selected more than once.

Have a look at the JSON menu push example above. Look for the modifier group with PLU "FREE-TOP", more specifically, how max and multiMax are used.

The max field gets a value of two, which indicates the maximum number of modifiers. As there are only two modifiers in the group, this in itself wouldn't make much of a difference when the modifiers are only selectable once.

Adding multiMax indicates that modifiers in this modifier group should be selectable more than once. Because it has a value of two, each modifier should be selectable at most two times.

Maximum Total Limit per Product

Sometimes, merchants would like to restrict the number of products that can be sold within one order. For example, think of medicine products where only one of the medications is allowed to be sold per customer order. This will show in the menu push under the product information with the multiMax value. For example, "multiMax": 1, under a product (not a modifier or option), means that this product can only be sold one time in a given order basket.

To test this scenario, you can add this in the menu sample of your test account, using the Deliverect menu builder. For example, if the product can only be sold one time, then go to Edit menu and edit the product by adding 1 under "Max order limit".


Did this page help you?