Versions Compared

Key

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

...

Partners integration and POS vendors

Expand

Integration by using sanity id

image-20240521-141817.png

We need to ensure that the campaign platform will have the Loyalty Engine ID properly configured to match the configured offer (for Offer Discount or Combo/Picker).

Using Winrest as an example, they register these sanityId on their system. This is necessary for Winrest to calculate the total cart price correctly. For other vendors/POS this can also be used for integration. This can be done manually by sending the Id to the POS vendor, or you can also use the orderDiscount object that the Whitelabel App is already sending in the request (see below).

Integration using orderDiscount object

For this, we are using the IWebhookPriceOrder when we send the orderDiscounts property. With this property, the vendor/POS can get the offer information automatically and then make the calculation correct to return to the Whitelabel the correct value.

Payload example:

Code Block
languagejson
{
  "callbackUrl": "https://euw3-dev-plk-partners-api.rbictg.com/api/v1/orders/84b5f1df-28df-4e6f-a871-a2783602436f/price/callback",
  "cart": {
    "menuSelections": [
      {
        "externalReferenceId": "800853",
        "id": "f9f5b02e-bee8-4dd1-a5fa-222b79516a98",
        "menuSelections": [
          {
            "externalReferenceId": "800852",
            "id": "item_67167",
            "menuSelections": [],
            "price": {
              "amount": 679,
              "currency": "EUR"
            },
            "quantity": 1
          }
        ],
        "price": {
          "amount": 1100,
          "currency": "EUR"
        },
        "quantity": 1
      }
    ]
  },
  "channel": "WHITELABEL_IN_STORE",
  "fees": [],
  "id": "84b5f1df-28df-4e6f-a871-a2783602436f",
  "instructions": [],
  "serviceMode": "TAKEOUT",
  "storeId": "1111",
  "orderDiscounts": [
    {
      "type": "percentage", // or amount
      "value": 50
    }
  ]
}

For Combo/Picker what's the difference from what we have on the /offers page?

...