PricingRules

The PricingRules object is a multi-use object that provides pricing rules for:

  • A menu item or modifier option item reference that uses the Time Specific Price or Size Price pricing strategy.
  • A modifier group that uses the Size Price, Sequence Price, or Size/Sequence Price pricing strategy.
Array of objects (SizeSequencePricingRule)

An array of SizeSequencePricingRule objects that define the prices for the modifier options in a modifier group that uses the Size Price, Sequence Price, or Size/Sequence Pricing pricing strategy. If the modifier group does not use one of these pricing strategies, this array is empty.

sizeSpecificPricingGuid
string or null

The GUID of a Size modifier group that defines sizes and prices for a menu item or a modifier option item reference that uses the Size Price pricing strategy.

If the menu item or modifier option item reference does not use the Size Price pricing strategy, then sizeSpecificPricingGuid is null.

The Toast POS system automatically creates a Size modifier group when you choose the Size Price pricing strategy for a menu item or modifier option item reference and stores the sizes and prices you specify in it. You use the sizeSpecificPricingGuid value to locate the correct Size modifier group to use when pricing a menu item or modifier option item reference that uses size pricing. In the JSON fragment below, you can see that the Cheese Pizza menu item uses the SIZE_PRICE pricing strategy and the Size modifier group where the sizes and prices for Cheese Pizza are defined has a GUID that ends in 31b0.

{
  "restaurantGuid": "2071fb81-988b-4d75-b8dc-c5c17cff9706",
  ...
  "menus": [
    {
      "name": "Dinner",
      "guid": "ddd681de-3c12-4d45-b8b1-a5b2ea898210",
      ...
      "menuGroups": [
        {
          "name": "Pizza",
          "guid": "dc868006-919a-4950-a4cc-3a03f9770fd7",
          ...
          "menuItems": [
            {
              "name": "Cheese Pizza",
              "guid": "95c5d500-8d92-46f2-bec4-fb2a42a46621",
              ...
              "price": null,
              "pricingStrategy": "SIZE_PRICE",
              "pricingRules": {
                "timeSpecificPricingRules": [],
                "sizeSpecificPricingGuid": "23c02762-9d6a-4d3f-a298-71c989bf31b0",
                "sizeSequencePricingRules": []
              },
              ...
              "modifierGroupReferences": [
                2,
                6,
                ...
              ],
              ...
            }
          ]
        }
      ]
    }
  ],
  "modifierGroupReferences": {
    ...
    "2": {
      "referenceId": 2,
      "name": "Size",
      "guid": "23c02762-9d6a-4d3f-a298-71c989bf31b0",
      ...
      "pricingStrategy": "NONE",
      "pricingRules": null,
      ...
      "modifierOptionReferences": [
        12,
        13
      ],
      ...
    },
    ...
  },
  "modifierOptionReferences": {
    ...
    "12": {
      "referenceId": 12,
      "name": "Small",
      "guid": "352244f2-a952-4a3a-a3ae-7775fa221ce7",
      ...
      "price": 8.0,
      "pricingStrategy": "BASE_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    },
    "13": {
      "referenceId": 13,
      "name": "Large",
      "guid": "4ff89bca-b448-4892-bc4c-62c37a28ac44",
      ...
      "price": 10.0,
      "pricingStrategy": "BASE_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    }
    ...
  }
}

When the PricingRules object appears in the context of a modifier group, the sizeSpecificPricingGuid value it contains is also used to find matching sizes between menu items and any modifier options that use the Size Price or Size/Sequence Pricing pricing strategies (for example, toppings on a small pizza cost $1 while toppings on a large pizza cost $2). In this scenario, the Toast POS system locates the modifier option size that matches the menu item size and uses the price defined for that size of the modifier option. The sizes for the menu item are defined in the Size modifier group specified by the sizeSpecificPricingGuid value. The sizes for the modifier options are defined in objects contained in the sizeSequencePricingRules array that is contained in the modifier group's PricingRules object. Sizes are considered matching when their names are identical. See “Pricing Strategies” in the Toast Administrator’s Guide (https://doc.toasttab.com/0IV1p/adminPricingStrategies.html) for detailed information on the Size Price and Size/Sequence Price pricing strategies.

In the example below, the Cheese Pizza menu item and the Toppings modifier group use the SIZE_PRICE pricing strategy. The menu item sizes and prices are defined in the Size modifier group with a GUID ending in 31b0. The sizes and prices for the modifier options are defined in the sizeSequencePricingRules value that is a child of the Toppings modifier group.

{
  "restaurantGuid": "2071fb81-988b-4d75-b8dc-c5c17cff9706",
  ...
  "menus": [
    {
      "name": "Dinner",
      "guid": "ddd681de-3c12-4d45-b8b1-a5b2ea898210",
      ...
      "menuGroups": [
        {
          "name": "Pizza",
          "guid": "dc868006-919a-4950-a4cc-3a03f9770fd7",
          ...
          "menuItems": [
            {
              "name": "Cheese Pizza",
              "guid": "95c5d500-8d92-46f2-bec4-fb2a42a46621",
              ...
              "price": null,
              "pricingStrategy": "SIZE_PRICE",
              "pricingRules": {
                "timeSpecificPricingRules": [],
                "sizeSpecificPricingGuid": "23c02762-9d6a-4d3f-a298-71c989bf31b0",
                "sizeSequencePricingRules": []
              },
              ...
              "modifierGroupReferences": [
                2,
                3,
                ...
              ],
              ...
            }
          ]
        }
      ]
    }
  ],
  "modifierGroupReferences": {
    ...
    "2": {
      "referenceId": 2,
      "name": "Size",
      "guid": "23c02762-9d6a-4d3f-a298-71c989bf31b0",
      ...
      "pricingStrategy": "NONE",
      "pricingRules": null,
      ...
      "modifierOptionReferences": [
        12,
        13
      ],
      ...
    },
    "3": {
      "referenceId": 3,
      "name": "Toppings",
      "guid": "58b79986-f88f-411d-ba18-14b1e2441e9d",
      ...
      "pricingStrategy": "SIZE_PRICE",
      "pricingRules": {
        "timeSpecificPricingRules": [],
        "sizeSpecificPricingGuid": "23c02762-9d6a-4d3f-a298-71c989bf31b0",
        "sizeSequencePricingRules": [
          {
            "sizeName": "Small",
            "sizeGuid": "352244f2-a952-4a3a-a3ae-7775fa221ce7",
            "sequencePrices": [
              {
                "sequence": 1,
                "price": 2.0
              }
            ]
          },
          {
            "sizeName": "Large",
            "sizeGuid": "4ff89bca-b448-4892-bc4c-62c37a28ac44",
            "sequencePrices": [
              {
                "sequence": 1,
                "price": 4.0
              }
            ]
          }
        ]
      },
      ...
      "modifierOptionReferences": [
        10,
        11
      ],
      ...
    },
    ...
  },
  "modifierOptionReferences": {
    ...
    "10": {
      "referenceId": 10,
      "name": "Mushrooms",
      "guid": "fa24fee9-76c4-40ba-ae3c-7dfccafdd8d3",
      ...
      "price": null,
      "pricingStrategy": "GROUP_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    },
    "11": {
      "referenceId": 11,
      "name": "Onions",
      "guid": "afee6be7-8280-4c69-a170-9fdf4c76bf7b",
      ...
      "price": null,
      "pricingStrategy": "GROUP_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    },
    "12": {
      "referenceId": 12,
      "name": "Small",
      "guid": "352244f2-a952-4a3a-a3ae-7775fa221ce7",
      ...
      "price": 8.0,
      "pricingStrategy": "BASE_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    },
    "13": {
      "referenceId": 13,
      "name": "Large",
      "guid": "4ff89bca-b448-4892-bc4c-62c37a28ac44",
      ...
      "price": 10.0,
      "pricingStrategy": "BASE_PRICE",
      "pricingRules": null,
      ...
      "modifierGroupReferences": []
    },
    ...
  }
}  
Array of objects (TimeSpecificPrice)

An array of TimeSpecificPrice objects that define the time-specific prices for a menu item or modifier option item reference that uses the Time Specific Price pricing strategy. If the menu item or modifier option item reference does not use time-specific prices, this array is empty.

{
  • "timeSpecificPricingRules": [
    ],
  • "sizeSpecificPricingGuid": "string",
  • "sizeSequencePricingRules": [
    ]
}