Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Default entry: For each Picker & Modifier Group, each group will have a property, “defaultSelection”. DefaultSelection will have an ID for an entry that is default for that groupGroups: The menu has four types: Combo, Item, Group and Modifier. The group type exists to wrap relevant references to walk through the menu. Only Combo, Item and Modifier will be passed to and committed to POS in Cart.

Types of Groups

Description

Display type

Menu

Group of Sections

List

Section

Section is a broad container. It can contain pickers, items , combos as well as other sections

List

Picker

Pickers allows an step by step selection process that ultimate resolve in Combos or Item. Pickers have only one immediate child, a reference to the first aspect.

Single entry

Picker Aspect

Group of Picker Aspect Options

Select

Picker Aspect Option

Group of picker Options - References the next aspect for the picker. The picker options of the last aspect reference the final selection result (combo/item)

Single entry

Combo Slot

Group of Combo Slot Options

Select

Combo Slot Option

References Combo Slot Option

Single entry

Modifier Group

Group of Modifiers

Multi-select

Group display type

Description

List

Group of Sections & Pickers(subsections)

Single-Entry

One option that maps to options to select from (Size, Choice of Prep)

Select

Group with Single Selection Option

Multi-Select

Group with Multiple Selection Options

...

This endpoint retrieves price & availability for all entries in the store's menu by PLU, as well as additional version metadata referring to the latest version of the menu.

The plus attribute within the endpoint allows users to specify a list of plus (array of strings) to filter the results in case the whole store menu is not needed.

...

Note that different than the https://rbictg.atlassian.net/wiki/spaces/RDP/pages/5285970207/Menu+Management+-+API+Actions#Menu-Event-Webhook, this event also contains information on which data has changed and therefore removes the need to have a full sync of the menu for every update as that is a lengthy process.

This Webhook Event will contain the following message body:

Code Block
{
  "brand": "BK",
  "data": {
    "created": [],
    "updated": [],
    "deleted": []
  },
  "region": "NZ",
  "serviceMode": "pickup",
  "storeId": "1234",
  "version": 20231026212510630,
  "eventTime": "2023-03-28T22:41:03.279Z",
  "eventType": "MENU_PRICES_AVAILABILITY_UPDATE"
}

There are two fields that require a deeper explanation here: version and eventTime.The version is a ISO 8601 UTC Date Time without the digits. So on our example the version 20231026212510630 equates the ISO Date Time 2023-10-26T21:25:10.630Z. For example, if you create PLU 501 at 2023-10-26T21:25:10.630Z ISO Date, the current menu version received in this webhook will be 20231026212510630. If another PLU is then updated, a new webhook event will be generated and a new version will be attached to the menu.

The eventTime is a ISO Date which refers to the moment the webhook event was generated. It is not related in any way to the menu versioning. The arrays within the data object will contain objects relative to the created, updated or deleted in this specific version. Here’s a sample of what one of these objects look like:

Code Block
{
  "availability": true,
  "channel": "whitelabel",
  "country": "US",
  "endDate": 1673872934,
  "hours": [
    {
      "start": "1700",
      "end": "2100"
    }
  ],
  "plu": "string",
  "price": 500,
  "priority": 1,
  "repetition": [
    "Mo",
    "Fr"
  ],
  "startDate": 1673872934,
  "serviceMode": "delivery",
  "storeId": "641234",
  "version": 20231026212510630
}

To see how it works, here is the step-by-step:

  1. Create or update by making a PUT call on the following Partners-API endpoint /api/v1/stores/{storeId}/menu/plus. For the sake of our example, let’s use the following payload:

    Code Block
    {
      "plus": [
        {
          "plu": "502",
          "prices": [
            {
              "price": {
                "currency": "USD",
                "amount": 100
              },
              "channel": "WHITELABEL_IN_STORE"
            }
          ]
        }
      ]
    } 
  2. This will asynchronously trigger a few internal processes that will generate the following MENU_PRICES_AVAILABILITY_UPDATE webhook event. This also generates a StoreMenuVersion

    record in our database, which will be kept for 7 days.

    Code Block
    {
      "brand": "BK",
      "channel": "whitelabel",
      "chunk": 0,
      "country": "NZ",
      "data": {
        "created": [
        {
          "channel": "whitelabel",
          "country": "NZ",
          "plu": "502",
          "price": 100,
          "serviceMode": "pickup",
          "startDate": 1680016297075,
          "storeId": "456471",
          "version": 20230328151137129
        }
        ],
        "deleted": [
        ],
        "updated": [
        ]
      },
      "serviceMode": "pickup",
      "storeId": "456471",
      "eventTime": "2023-03-28T22:41:03.279Z",
      "eventType": "MENU_PRICES_AVAILABILITY_UPDATE"
    }

This webhook

...