Versions Compared

Key

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

Contents

Table of Contents
stylenone

Cart Structures

Item

Item

Item w/ modifiers

Combo

Combo

Combo with items with modifiers

Combo with Premium Items

Are we omiting the "combo" level in our cart?
Answer

System Wide Systemwide Offer

Item

image-20240319-145916.png

Combo
Navigate to: https://staging-plk-web.pl.rbi.tools/offers
Select: “Test - Offer Combo” (reference in Sanity)
Place order.

image-20240315-235528.png
  • Test - Offer Combo - 05d1888d-789e-4517-8ca9-506ff1bb2c2d

    • Mechanics > Vendor Configs > Partner > Constant PLU = 4017 = externalReferenceId

    • Mechanics > In-App Benefits > Add Item… > Combo = 24f239c0… = id

image-20240318-210529.png

Code Block
languagejson
{
    "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/f07c593e-0d35-4845-8509-cce96a0b0b59/price/callback",
    "cart": {
        "menuSelections": [
            {
                "externalReferenceId": "4017", # (plu-Offer) Mechanics > Vendor Configs > Partner > Constant PLU
                "id": "24f239c0-e8de-4d13-9967-bb96b8aef2b4", # Combo PLU: Mechanics > In-App Benefits > Add Item… > Combo 
                "menuSelections": [
                    {
                        "externalReferenceId": "3001001", # Vendor Configs > Partner > Constant PLU
                        "id": "74c5465d-bd85-413b-b730-e1eece111125", # product Id inside the combo
                        "menuSelections": [],
                        "price": {
                            "amount": 1995,
                            "currency": "PLN"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
                ],
                "price": {
                    "amount": 1895,
                    "currency": "PLN"
                },
                "quantity": 1,
                "type": "OfferCombo" # The Offer configs only accept combos as OfferCombo
            }
        ]
    },
    "channel": "WHITELABEL_IN_STORE",
    "fees": [],
    "id": "f07c593e-0d35-4845-8509-cce96a0b0b59",
    "instructions": [],
    "number": "M346",
    "serviceMode": "TAKEOUT",
    "storeId": "48002"
}
  • The Offer configs only accept combos as OfferCombo

  • The externalReferenceId is configured in the Systemwide Offer level (Sanity).
  • The price is defined based on externalReferenceId.

  • Info

    Combo w/ modifier
    Navigate to: https://staging-plk-web.pl.rbi.tools/offers
    Select: “Test - Offer Combo w/ modifiers” (reference in Sanity)
    Place order.

    image-20240315-235613.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/ea7645b5-1ce9-44c2-be77-946e3187a0fa/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "4017",
                    "id": "45808975-71c2-459e-8809-3c9635c68d97",
                    "menuSelections": [
                        {
                            "externalReferenceId": "3001001",
                            "id": "74c5465d-bd85-413b-b730-e1eece111125",
                            "menuSelections": [],
                            "price": {
                                "amount": 1995,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3500001",
                            "id": "aec9dc8a-afc1-420d-bfc4-fd7c004e6c16",
                            "menuSelections": [
                                {
                                    "externalReferenceId": "8002001",
                                    "id": "406f327f8d6f",
                                    "menuSelections": [],
                                    "price": {
                                        "amount": 25,
                                        "currency": "PLN"
                                    },
                                    "quantity": 1,
                                    "type": "ItemOptionModifier"
                                }
                            ],
                            "price": {
                                "amount": 995,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 1895,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferCombo"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "ea7645b5-1ce9-44c2-be77-946e3187a0fa",
        "instructions": [],
        "number": "M349",
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }

    Config Offers

    Amount discount
    Navigate to: https://staging-plk-web.pl.rbi.tools/offers
    Select: “Have a Promo Code?”
    Insert one of the codes below (reference in Sanity):

    • drL8GfLo

    image-20240315-233801.png

    When we added only the promo item, we are not able to checkout, so I added an extra Chicken Sandwich

    image-20240315-234123.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/ec2ca2e1-f490-492d-b320-2dae80e9befa/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "3001001",
                    "id": "690f1bc2-f254-4ec6-b5be-8215ee023a6f",
                    "menuSelections": [],
                    "price": {
                        "amount": 1995,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "Item"
                },
                {
                    "externalReferenceId": "2002", 
                    "id": "4fa240c0-d2f0-4ca3-8736-4c62e798267a", # Sanity ID
                    "menuSelections": [],
                    "price": {
                        "amount": 0,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferDiscount"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "ec2ca2e1-f490-492d-b320-2dae80e9befa",
        "instructions": [],
        "number": "M351",
        "orderDiscounts": [ # Amount Discount Specific
            {
                "type": "amount",
                "value": 3
            }
        ],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }
    • The Amount discount is an Item with price 0 added to the order and with type: OfferDiscount

    • Inside orderDiscounts we have the rule applied by the “amount discount" config.

      Code Block
      {
          "type": "amount",
          "value": 3
      }

    Percentage discount
    Navigate to: https://staging-plk-web.pl.rbi.tools/offers
    Select: “Have a Promo Code?”
    Percentage discount
    Navigate to: https://staging-plk-web.pl.rbi.tools/offers
    Select: “Have a Promo Code?”
    Insert one of the codes below (reference in Sanity):

    • PXEmQ85M

    image-20240315-234432.png

    Same case here, I added a 20% discount code and I choose an extra Chicken Sandwich

    image-20240315-234608.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/390d643e-3a45-4962-972b-fb4fe8488a3c/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "3001001",
                    "id": "690f1bc2-f254-4ec6-b5be-8215ee023a6f",
                    "menuSelections": [],
                    "price": {
                        "amount": 1995,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "Item"
                },
                {
                    "externalReferenceId": "2001",
                    "id": "f63248d2-f817-4c2b-8591-839809341ac6",
                    "menuSelections": [],
                    "price": {
                        "amount": 0,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferDiscount"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "390d643e-3a45-4962-972b-fb4fe8488a3c",
        "instructions": [],
        "number": "M352",
        "orderDiscounts": [
            {
                "type": "percentage",
                "value": 20
            }
        ],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }
    • The Percentage discount is an Item with price 0 added to the order and with type: OfferDiscount

    • Inside orderDiscounts we have the rule applied by the “amount discount" config.

      Code Block
      {
          "type": "percentage",
          "value": 20
      }

    Free Item **********
    Navigate to: https://staging-plk-web.pl.rbi.tools/offers
    Select: “Have a Promo Code?”
    Insert one of the codes below (reference in Sanity):
    - JbwUY11l

    image-20240315-234833.pngImage Removed

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/9890b15e-a503-4713-ab76-0b7ba5a4f88d/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "4017",
                    "id": "24f239c0-e8de-4d13-9967-bb96b8aef2b4",
                    "menuSelections": [
                        {
                            "externalReferenceId": "3001001",
                            "id": "74c5465d-bd85-413b-b730-e1eece111125",
                            "menuSelections": [],
                            "price": {
                                "amount": 1995,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 1895,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferCombo"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "9890b15e390d643e-a5033a45-47134962-ab76972b-0b7ba5a4f88dfb4fe8488a3c",
        "instructions": [],
        "number": "M352",
        "orderDiscounts": "M354" [
            {
                "type": "percentage",
                "value": 20
            }
        ],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }
    • Seems wrong: How can we configure a free item for loyalty?

    Reward

    Item
    Navigate to: https://staging-plk-web.pl.rbi.tools/rewards
    Select: “8 Nuggets” (reference in Sanity)
    Place order.

    image-20240315-235844.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/773c6655-a9ad-4e5b-9581-143d43c4f463/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "3005019",
                    "id": "31049d5a-4047-4965-8780-8ff2f37775dc",
                    "menuSelections": [
                        {
                            "externalReferenceId": "3004004",
                            "id": "ba322af6-a956-4c6b-8bf2-d6fea3c351fd",
                            "menuSelections": [],
                            "price": {
                                "amount": 2495,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 0,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferCombo"  ############ OfferCombo???
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "773c6655-a9ad-4e5b-9581-143d43c4f463",
        "instructions": [],
        "number": "M360",
        "orderDiscounts": [],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }
    • Type reward in Sanity is translated as OfferCombo by partner API.

    • All rewards will be an OfferCombo with price amount: 0

    Combo
    Navigate to: https://staging-plk-web.pl.rbi.tools/rewards
    Select: “Test - Combo” (reference in Sanity)
    Place order.

    image-20240316-000353.png

    image-20240316-000328.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/1f4022f9-f825-430c-ac05-8aa6673731e2/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "3005019",
                    "id": "a943b901-b05c-4a02-ac34-40e7c403a214",
                    "menuSelections": [
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 0,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferCombo"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "1f4022f9-f825-430c-ac05-8aa6673731e2",
        "instructions": [],
        "number": "M361",
        "orderDiscounts": [],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }

    Combo w/ with item with modifier
    Navigate to: https://staging-plk-web.pl.rbi.tools/rewards
    Select: “Test - Combo w/ modifiers” (reference in Sanity)
    Place order.

    image-20240316-000540.png

    image-20240316-000603.png

    Code Block
    languagejson
    {
        "callbackUrl": "https://euc1-staging-plk-partners-api.rbictg.com/api/v1/orders/1f4022f9-f825-430c-ac05-8aa6673731e2/price/callback",
        "cart": {
            "menuSelections": [
                {
                    "externalReferenceId": "3005019",
                    "id": "a943b901-b05c-4a02-ac34-40e7c403a214",
                    "menuSelections": [
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        },
                        {
                            "externalReferenceId": "3011005",
                            "id": "074cdc86-6c51-4554-9579-ac6e1301ba58",
                            "menuSelections": [],
                            "price": {
                                "amount": 295,
                                "currency": "PLN"
                            },
                            "quantity": 1,
                            "type": "Item"
                        }
                    ],
                    "price": {
                        "amount": 0,
                        "currency": "PLN"
                    },
                    "quantity": 1,
                    "type": "OfferCombo"
                }
            ]
        },
        "channel": "WHITELABEL_IN_STORE",
        "fees": [],
        "id": "1f4022f9-f825-430c-ac05-8aa6673731e2",
        "instructions": [],
        "number": "M361",
        "orderDiscounts": [],
        "serviceMode": "TAKEOUT",
        "storeId": "48002"
    }

    Difference between Combo Offer and Combo

    Combo Offer

    image-20240319-153517.png

    Sanity:

    Code Block
    languagejson
    {
            "externalReferenceId": "4017", # This number is the Systemwide Offer Vendor Plu
            "id": "24f239c0-e8de-4d13-9967-bb96b8aef2b4", # This number is the Inner Item (ComboOffer) Sanity Id  
            "menuSelections": [
              {
                "externalReferenceId": "3001001", # This number is the ComboOffer Vendor Plu
                "id": "74c5465d-bd85-413b-b730-e1eece111125" # This is the inner Item id
                "menuSelections": [],
                "price": { "amount": 1995, "currency": "PLN" },
                "quantity": 1,
                "type": "Item"
              }
            ],
            "price": { "amount": 1895, "currency": "PLN" },
            "quantity": 1,
            "type": "OfferCombo"
          },

    Combo

    image-20240319-153540.png

    Sanity:

    • A. Supreme Chicken Sandwich Meal(Combo)

      • vendorConfigs > partner > 3001020

      • id > 8adbaec9-48ee-48f9-b733-04cba561c629

      • mainItem > 0ba8ec59-9f2b-4011-a5cb-9974a9c0f26f

        • vendorConfigs > partner > 3001019

    Code Block
    languagejson
    {
            "externalReferenceId": "3001020", # This number is the Combo Vendor Plu
            "id": "8adbaec9-48ee-48f9-b733-04cba561c629", # This number is the combo Sanity Id 
            "menuSelections": [
              {
                "externalReferenceId": "3001019", # This number is the Main Item Vendor Plu
                "id": "0ba8ec59-9f2b-4011-a5cb-9974a9c0f26f", # This number is the Main Item Sanity Id
                "menuSelections": [],
                "price": { "amount": 2495, "currency": "PLN" },
                "quantity": 1,
                "type": "Item"
              },
              {
                "externalReferenceId": "3500001",
                "id": "aec9dc8a-afc1-420d-bfc4-fd7c004e6c16",
                "menuSelections": [
                  {
                    "externalReferenceId": "8002001",
                    "id": "406f327f8d6f",
                    "menuSelections": [],
                    "price": { "amount": 25, "currency": "PLN" },
                    "quantity": 1,
                    "type": "ItemOptionModifier"
                  }
                ],
                "price": { "amount": 995, "currency": "PLN" },
                "quantity": 1,
                "type": "Item"
              },
              {
                "externalReferenceId": "3010006",
                "id": "6de63121-74dd-4f6b-80b9-6283b391f2e8",
                "menuSelections": [],
                "price": { "amount": 895, "currency": "PLN" },
                "quantity": 1,
                "type": "Item"
              }
            ],
            "price": { "amount": 3295, "currency": "PLN" },
            "quantity": 1,
            "type": "Combo"
          }