Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The main goal of this document is to explain how to use the Channel Extension (channel-level P&A management) from a partner and FZ perspective.

\uD83D\uDCD8 Notes

  1. To be notified about changes regarding Channels, you will need to subscribe to the MENU_PRICES_AVAILABILITY_UPDATE webhook. This webhook contains information about which Channel P&A has been updated.

  2. Channels P&A can be changed either through Partners API or FZ Portal, but they must be configured in Sanity first.

  3. Content is not handled for Channels, only P&A.

  4. To consume and edit data through partners-api, you must use the newer APIs
    GET /api/v1/stores/{storeId}/menu/{serviceMode}/{channel}/plus - getStoreMenuPlus
    PUT /api/v1/stores/menu/plus - updateMenuPlus
    GET /api/v1/stores/{storeId}/menu/{serviceMode}/{channel}/plus/diff/{version} - getStoreMenuDiff

\uD83D\uDCD8 Step by Step - Fz Portal

For this example we’re going to use the Channel Uber.

  1. On Sanity, Go to CTG Configs > Channels Configuration and add the Uber Channel.

Please, note that we have the toggles for delivery and pickup(eat in) serviceModes. When adding or editing a new Channel, change the toggles accordingly. For this example, we’re using delivery.

  1. Once enabled, Uber with the delivery service mode will show up on the Editor in Franchisee’s Portal.

The first fields Eat in(App/In-Store) and Delivery(App/In-Store) refer to the already existing regular Channels. To the side there will be the newly added Uber Channel with delivery service mode. If lateNight is enabled for the market, there will be a Uber - LateNight option to the side.

  1. The user will be able to edit P&A Uber and in-store/app using the Editor as usual, including the QuickFill and LateNight features. Remember that P&A changes are async, so it may take some time to reflect in the user-facing touchpoints where applicable).

  2. In this example, we’re setting the item Patatas Cajún as available for Uber delivery with price 10.

This will undergo validations and afterwards be saved async.

  1. If a Partner has subscribed to the MENU_PRICES_AVAILABILITY_UPDATE webhook, they will receive the following call confirming the updates.

    {
      "brand": "PLK",
      "channel": "uber",
      "chunk": 0,
      "data": {
        "deleted": [],
        "created": [],
        "updated": [
          {
            "country": "ES",
            "channel": "uber",
            "availability": true,
            "overrides": [
              {
                "price": 2000,
                "id": "lateNight"
              }
            ],
            "priority": 1,
            "repetition": [],
            "storeId": "1111",
            "version": 20231215164756576,
            "serviceMode": "delivery",
            "price": 1000,
            "draft": "approved",
            "plu": "942214",
            "sanityId": "item_50929"
          }
        ]
      },
      "eventTime": "2023-12-15T16:48:17.612Z",
      "eventType": "MENU_PRICES_AVAILABILITY_UPDATE",
      "region": "ES",
      "serviceMode": "delivery",
      "storeId": "1111",
      "version": 20231215164756576
    }

\uD83D\uDCD8 Step by Step - Partners API

  1. Make a call to GET /api/v1/stores/1111/menu/delivery/uber/plus - this will return the newly setup prices for Patatas Cajun that was just edited through the DOP.

    {
      "meta": {
        "version": 20231215164756576
      },
      "data": [
        {
          "version": 20231215164756576,
          "priority": 1,
          "storeId": "1111",
          "draft": "approved",
          "country": "ES",
          "availability": true,
          "sanityId": "item_50929",
          "repetition": [],
          "overrides": [
            {
              "price": 2000,
              "id": "lateNight"
            }
          ],
          "channel": "uber",
          "plu": "942214",
          "serviceMode": "delivery",
          "price": 1000
        }
      ]
    }
  2. To edit this product through Partners API, a call could be made to PUT /api/v1/stores/menu/plus with the following payload

    {
      "channel": "uber",
      "plus": [
        {
          "priority": 1,
          "draft": "approved",
          "availability": true,
          "overrides": [
            {
              "price": 1500,
              "id": "lateNight"
            }
          ],
          "plu": "942214",
          "price": 500
        }  
      ],
      "region": "ES",
      "serviceMode": "delivery",
      "storeIds": [
        "1111"
      ]
    }

This will return a version and, similar to the changes made through the DOP, it will happen async.

  1. Similarly, if subscribed to the MENU_PRICES_AVAILABILITY_UPDATE webhook, the partner(s) will be notified of this change with the following payload.

    {
      "brand": "PLK",
      "channel": "uber",
      "chunk": 0,
      "data": {
        "deleted": [],
        "created": [],
        "updated": [
          {
            "country": "ES",
            "serviceMode": "delivery",
            "price": 500,
            "draft": "approved",
            "plu": "942214",
            "channel": "uber",
            "availability": true,
            "overrides": [
              {
                "price": 1500,
                "id": "lateNight"
              }
            ],
            "priority": 1,
            "storeId": "1111",
            "version": 20231215172229464,
            "sanityId": "item_50929"
          }
        ]
      },
      "eventTime": "2023-12-15T17:23:07.597Z",
      "eventType": "MENU_PRICES_AVAILABILITY_UPDATE",
      "region": "ES",
      "serviceMode": "delivery",
      "storeId": "1111",
      "version": 20231215172229464
    }
  2. Partners can also use the Get Store Menu Diff API to sync with the latest changes GET /api/v1/stores/{storeId}/menu/{serviceMode}/{channel}/plus/diff/{version} - Get Store Menu Diff
    Make a call to GET /api/v1/stores/1111/menu/delivery/uber/plus/diff/20231215164756576, the version number being the previously received version in the webhook.
    It will return the following payload with the latest changes:

    {
      "data": {
        "20231215172229464": {
          "created": [],
          "deleted": [],
          "updated": [
            {
              "country": "ES",
              "serviceMode": "delivery",
              "price": 500,
              "draft": "approved",
              "plu": "942214",
              "channel": "uber",
              "availability": true,
              "overrides": [
                {
                  "price": 1500,
                  "id": "lateNight"
                }
              ],
              "priority": 1,
              "storeId": "1111",
              "version": 20231215172229464,
              "sanityId": "item_50929"
            }
          ]
        }
      }
    }

Filter by label

There are no items with the selected labels at this time.

  • No labels