How to configure Modifier Groups

Introduction

Modifier groups support the most common product structure where standard modifications to a product e.g. allowing 'Rare', 'Medium' or 'Well Done' modifiers (productType:2) to be offered within a Steak product. It can also group together additional product options (productType:1) typically where 'Upsells' apply.

Format

1.Modifier Group with Modifiers

The first example below represents a simple Product (productType:1) with three modifier groups attached (productType:3) where each modifier group contains an amount of modifiers (productType:2)

%%{init: { "theme": "base", "themeVariables": { "fontSize": "13px", "background": "transparent", "lineColor": "#64748b", "edgeLabelBackground": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "flowchart": { "nodeSpacing": 25, "rankSpacing": 35, "padding": 8, "useMaxWidth": true }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
flowchart TD
    Product["<b>Product</b><br/>'productType': 1"]
    MG1["<b>Modifier Group</b><br/>'productType': 3"]
    MG2["<b>Modifier Group</b><br/>'productType': 3"]
    MG3["<b>Modifier Group</b><br/>'productType': 3"]
    M1["<b>Modifier</b><br/>'productType': 2"]
    M2["<b>Modifier</b><br/>'productType': 2"]
    M3["<b>Modifier</b><br/>'productType': 2"]

    Product --> MG1
    Product --> MG2
    Product --> MG3
    MG1 --> M1
    MG2 --> M2
    MG3 --> M3

    classDef product fill:#fdf1dc,stroke:#8a7a4f,color:#3a2f1a,stroke-width:2px;
    classDef modgroup fill:#038851,stroke:#026139,color:#ffffff,stroke-width:2px;
    classDef modifier fill:#EBFBF1,stroke:#8fc9a8,color:#02502f,stroke-width:2px;

    class Product product;
    class MG1,MG2,MG3 modgroup;
    class M1,M2,M3 modifier;
{
  "products": [
    {
      "productType": 1,
      "plu": "STK-01",
      "price": 1500,
      "name": "Delicious Steak Frites",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000,
      "subProducts": [
        "MOD"
      ]
    },
    {
      "productType": 3,
      "plu": "MOD",
      "name": "Add a side",
      "description": "Pizza made for cheese fanatics",
      "subProducts": [
        "SI-01",
        "SI-02",
        "SI-03"
      ],
      "min": 0,
      "max": 0,
      "multiMax": 3
    },
    {
      "productType": 2,
      "plu": "SI-01",
      "price": 0,
      "name": "Fries",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 2,
      "plu": "SI-02",
      "price": 200,
      "name": "Salad",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 2,
      "plu": "SI-03",
      "price": 100,
      "name": "Mashed Potato",
      "description": "Mashed Potato",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    }
  ]
}

2.Modifier Group with Products

This same structure can also be applied to group together products (productType:1) within modifier groups (productType:3)

%%{init: { "theme": "base", "themeVariables": { "fontSize": "13px", "background": "transparent", "lineColor": "#64748b", "edgeLabelBackground": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "flowchart": { "nodeSpacing": 25, "rankSpacing": 35, "padding": 8, "useMaxWidth": true }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
flowchart TD
    Product["<b>Product</b><br/>'productType': 1"]
    MG1["<b>Modifier Group</b><br/>'productType': 3"]
    MG2["<b>Modifier Group</b><br/>'productType': 3"]
    MG3["<b>Modifier Group</b><br/>'productType': 3"]
    P1["<b>Product</b><br/>'productType': 1"]
    P2["<b>Product</b><br/>'productType': 1"]
    P3["<b>Product</b><br/>'productType': 1"]

    Product --> MG1
    Product --> MG2
    Product --> MG3
    MG1 --> P1
    MG2 --> P2
    MG3 --> P3

    classDef product fill:#fdf1dc,stroke:#8a7a4f,color:#3a2f1a,stroke-width:2px;
    classDef modgroup fill:#038851,stroke:#026139,color:#ffffff,stroke-width:2px;

    class Product,P1,P2,P3 product;
    class MG1,MG2,MG3 modgroup;
{
  "products": [
    {
      "productType": 1,
      "plu": "STK-01",
      "price": 1500,
      "name": "Delicious Steak Frites",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000,
      "subProducts": [
        "DRK"
      ]
    },
    {
      "productType": 3,
      "plu": "DRK",
      "name": "Add a Drink",
      "subProducts": [
        "DR-01",
        "DR-02",
        "DR-03"
      ],
      "min": 0,
      "max": 0,
      "multiMax": 3
    },
    {
      "productType": 1,
      "plu": "DR-01",
      "price": 0,
      "name": "Coke",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 1,
      "plu": "DR-02",
      "price": 200,
      "name": "Ginger Beer",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    },
    {
      "productType": 1,
      "plu": "DR-03",
      "price": 100,
      "name": "Fanta",
      "deliveryTax": 9000,
      "takeawayTax": 9000,
      "eatInTax": 9000
    }
  ]
}

Ordering Group Rules

Both Modifier Groups and Bundles allow certain ordering "rules" to be applied as follows;

RulePurposeType
minSetting a minimum value to a group of options e.g. 0would be equivalent to 'optional'and1or more would be 'required'Integer
maxSetting a maximum value limits how many items in a group can be orderedInteger
multiMax

Setting the attribute multiMax allows control over the maximum quantity of any single item in a group.

A value of '2' for example, means that each item in a group can be selected at most 2 times. The selection of a single item will still be limited by the overall max value allowed in a group

Integer

Item Rules

Individual items can also have rules set against them to control how they can be ordered online

RulePurposeType
multiMaxTo restrict the number of products that can be sold within one order e.g. pharmaceuticals. You can achieve this by adding the attribute "multiMax" e.g. "multiMax": 1, prevents more than one of the items being added to the basket.Integer
defaultQuantityThis attribute makes a modifier preselected by default, where a value of 1 is equivalent to a pre-selected item. Most channels can handle a pre-selection, but not with a pre-selected quantity of more than 1Integer

Nested Modifiers

A product configuration can include a sub-group of options to be selected. These options themselves can also contain their own sub-groups, this is reffered to as 'Nested Modifiers'.

%%{init: { "theme": "base", "themeVariables": { "fontSize": "13px", "background": "transparent", "lineColor": "#64748b", "edgeLabelBackground": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "flowchart": { "nodeSpacing": 25, "rankSpacing": 35, "padding": 8, "useMaxWidth": true }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
flowchart TD
    Product["<b>Product</b><br/>'productType': 1"]
    MGTop["<b>Modifier Group</b><br/>'productType': 3"]
    ProdOrMod["<b>Product</b><br/>'productType': 1<br/>or<br/><b>Modifier</b><br/>'productType': 2"]
    MG1["<b>Modifier Group</b><br/>'productType': 3"]
    MG2["<b>Modifier Group</b><br/>'productType': 3"]
    MG3["<b>Modifier Group</b><br/>'productType': 3"]
    M1["<b>Modifier</b><br/>'productType': 2"]
    M2["<b>Modifier</b><br/>'productType': 2"]
    M3["<b>Modifier</b><br/>'productType': 2"]

    Product --> MGTop
    MGTop --> ProdOrMod
    ProdOrMod --> MG1
    ProdOrMod --> MG2
    ProdOrMod --> MG3
    MG1 --> M1
    MG2 --> M2
    MG3 --> M3

    classDef product fill:#fdf1dc,stroke:#8a7a4f,color:#3a2f1a,stroke-width:2px;
    classDef modgroup fill:#038851,stroke:#026139,color:#ffffff,stroke-width:2px;
    classDef modifier fill:#FDECEC,stroke:#d98a8a,color:#5a1f1f,stroke-width:2px;
    classDef prodormod fill:#17a89a,stroke:#0f766e,color:#ffffff,stroke-width:2px;

    class Product,MGTop product;
    class MG1,MG2,MG3 modgroup;
    class M1,M2,M3 modifier;
    class ProdOrMod prodormod;

Did this page help you?