Omni Order Discounts Specifications
This document lists the features and specific formats of the Omni Order Discounts. The Omni Order Object and price validation logic supports various order-level and item-level discounts as Omni acts as the middleware for price validation logic in third-party integrations. Omni transforms the partner's discount format and discount type into an order that can be added to the point of sale (POS) and pass price validation.
Features
The Omni Order Discount features include the following:
Order Object core function modification, which includes the following:
Item-level discounts
Order-level discounts
Discount subtotal calculation
Subtotal validation business logic
Error handling and edge cases
Logging to elastic search
Discount price lookup (PLU) creation
TLog and the default Inventory and Cash Report (ICR)
Promotion Types
Omni Order Discounts supports the following four promotion types:
Buy One Get One Free (BOGO)
Percentage off discount
Dollar(s) off discount
Item discount
It also supports for the following partners:
Uber Eats
Grubhub
DoorDash
Portal Discount PLUs
The following PLUs track a discount per partner:
PLU/KEY 29330115 UBER OMNI
PLU/KEY 29330120 GRUBHUB OMNI
PLU/KEY 29330110 DOORDASH OMNI
Specifications
The Omni Order Discounts request format examples include the following:
Uber Eats
For Uber Eats, use the following code examples to add the Omni Order Discounts features:
Uber Eats Snippets
Use the promotions object to add the discount information to the order request. A snippet of a standard order request is shown below:
"payment": {
"charges": {
"total": {
"amount": 2335,
"currency_code": "USD",
"formatted_amount": "$23.35"
},
"sub_total": {
"amount": 2203,
"currency_code": "USD",
"formatted_amount": "$22.03"
},
"tax": {
"amount": 132,
"currency_code": "USD",
"formatted_amount": "$1.32"
},
"total_promo_applied": {
"amount": 2017,
"currency_code": "USD",
"formatted_amount": "$20.17"
},
"sub_total_promo_applied": {
"amount": 1903,
"currency_code": "USD",
"formatted_amount": "$19.03"
},
"tax_promo_applied": {
"amount": 114,
"currency_code": "USD",
"formatted_amount": "$1.14"
}
},
Add the promotions fields to the order request as shown below:
"promotions": {
"promotions": [
{
"external_promotion_id": "",
"promo_type": "CATEGORY_DISCOUNT",
"promo_discount_value": -300,
"promo_discount_percentage": 0,
"discount_items": [
{
"external_id": "ITEM-80020515",
"discounted_quantity": 1
},
{
"external_id": "ITEM-80025105",
"discounted_quantity": 1
},
{
"external_id": "ITEM-80020145",
"discounted_quantity": 1
}
]
}The order request is updated with the discount information for the price validation as shown below:
"payment": {
"charges": {
"total": {
"amount": 2335,
"currency_code": "USD",
"formatted_amount": "$23.35"
},
"sub_total": {
"amount": 2203,
"currency_code": "USD",
"formatted_amount": "$22.03"
},
"tax": {
"amount": 132,
"currency_code": "USD",
"formatted_amount": "$1.32"
},
"total_promo_applied": {
"amount": 2017,
"currency_code": "USD",
"formatted_amount": "$20.17"
},
"sub_total_promo_applied": {
"amount": 1903,
"currency_code": "USD",
"formatted_amount": "$19.03"
},
"tax_promo_applied": {
"amount": 114,
"currency_code": "USD",
"formatted_amount": "$1.14"
}
},
The OrderDiscounts element in the XML response is sent to the POS. An example of the XML OrderDiscounts element is shown below:
<OrderDiscounts> <OrderDiscount plu="29330115" qty="1" value="0" /> </OrderDiscounts>
Uber Eats Complete Order Request and Response Formats
The complete order request with the promotions object is shown below:
{
"storeId": "bk-900433",
"event": {
"type": "OrderCreate",
"status": "NEW"
},
"order": {
"id": "70f3b494-1200-445f-8ea1-590a8e9fb223",
"store_order_cart_id": 659499414,
"tax": 67,
"subtotal": -21,
"estimated_pickup_time": "2020-11-02T16:50:00Z",
"is_pickup": true,
"tip_amount": 0,
"order_special_instructions": "",
"delivery_address": null,
"applied_discounts": [
{
"discount_amount": 500,
"promo_id": "0ea502da-66bd-41f7-b6cf-e8ad3f96bdaa",
"promo_code": "$5 off",
"external_campaign_id": "$5.00 Off $25+ Order-Delivery"
}
],
"consumer": {
"id": 46527657,
"first_name": "Name",
"last_name": "L",
"email": "support@doordash.com",
"phone": "8559731040"
},
"store": {
"merchant_supplied_id": "bk-900433",
"provider_type": "sicom_",
"timezone": "US/Hawaii"
},
"categories": [
{
"merchant_supplied_id": "afternoon_menu_sides",
"name": "Sides",
"items": [
{
"name": "Spicy Crispy Chicken Sandwich",
"quantity": 1,
"price": 479,
"merchant_supplied_id": "ITEM-80030975",
"special_instructions": "",
"consumer_name": "Name",
"extras": []
}
]
}
],
"delivery_short_code": 784503563,
"commission_type": "regular",
"is_tax_remitted_by_doordash": false,
"tax_amount_remitted_by_doordash": 0
}
}The complete XML response with the OrderDiscounts element is shown below:
<?xml version="1.0"?> <!DOCTYPE pos > <POSResponse type="PlaceOrder" POSVersion="6.46.0" time="1681822437" last_update_time="1681815634" terminal="0" update_needed="false" sync_checksum="0d9452d525ec0eb4a6dd8144b45454c7ee5d1ad8"> <Order number="85" uuid="d9ec0d50-551a-4181-8b40-eb89191c9fe2" pos_uuid="d9ec0d50-551a-4181-8b40-eb89191c9fe2" vendor_uuid="2FC75"> <MainOrder> <ProductDetail> <Product plu="80080103" qty="1" price="269" name="LG COKE D L V" poll_id="1561" item_uuid="4babc82d-848f-4bb2-b9f7-14ca260d811e"/> <Qualifier plu="9005400" qty="1" price="12" name=" ADD lettuce" poll_id="522001" item_uuid="f4370cc4f3944d35802e1035e041a0f2"/> <ValueMeal plu="83020517" qty="1" price="1029" name="CML BAC KNG DLV" long_name="CMLG BACON KING DLV" poll_id="7592" item_uuid="503a1f7df51f4eba99bee8c8a6da2e40"> <Product plu="80020515" qty="1" price="0" name="BACON KING DLV" long_name="BACON KING DLV" poll_id="104658" item_uuid="1f5f5852fdee45d59f1f6fe36a1542f2"/> <Product plu="80050000" qty="1" price="0" name="LG FRY DLV" long_name="LG FRY D L V" poll_id="1555" item_uuid="ad4aa6391c8e44f39098144f008b111c"/> <Product plu="80080103" qty="1" price="0" name="LG COKE D L V" long_name="LG COKE D L V" poll_id="1561" item_uuid="1c9a932ddc36434f8137ff3693c8a93e"/> <Qualifier plu="9005400" qty="1" price="12" name=" ADD lettuce" long_name=" ADD lettuce" poll_id="522001" item_uuid="18369abd342a4d6fb44f7b830ea8f662"/> </ValueMeal> </ProductDetail> </MainOrder> <OrderDiscounts> <OrderDiscount plu="29330115" value="0"/> </OrderDiscounts> <Subtotal value="1322"/> <Taxes> <Tax plu="20000005" value="93" long_name="Tax (7.000%) TAX" externally_collected="false"/> <Tax plu="20000006" value="0" long_name="UNUSED TAX" externally_collected="false"/> <Tax plu="20000007" value="0" long_name="UNUSED TAX" externally_collected="false"/> </Taxes> <Total value="1415"/> <Pickup location="Delivery" status="Hold" time="0" partner="Ubereats"/> <Customer name="Test Test"/> </Order> </POSResponse>
Grubhub
For Grubhub, use the following code examples to add the Omni Order Discounts features:
Grubhub Snippets
Use items from the payments array to add the discount information to the order request. A snippet of the array is shown below:
{
"payment_type": "REWARD",
"amount": 200,
"tax_application": "PRE_TAX",
"payment_source": "MERCHANT"
},The OrderDiscounts element is added to the XML response sent to the POS. An example of the XML OrderDiscounts element is shown below:
<OrderDiscounts> <OrderDiscount plu="29330120" qty="1" value="200" /> </OrderDiscounts>
Grubhub Complete Order Request and Response Formats
The complete order request with the payments array is shown below:
{
"storeId": "693100a8-380a-45c2-ba8f-1299e01335ac",
"uuid": "oVEqUKKCEemyr6tOLOGJlkk",
"order_number": "907208463669709",
"is_test": false,
"status": "RESTAURANT_CONFIRMABLE",
"statusHistory": [
{
"status": "RESTAURANT_CONFIRMABLE",
"timestamp": "2019-07-09T19:50:02.249Z",
"update_source": "TXS"
},
{
"status": "ANTICIPATED",
"timestamp": "2019-07-09T19:50:01.810Z",
"update_source": "DINER",
"reason": "created non-GHD"
}
],
"updated_at": "2019-07-09T19:50:02.249Z",
"merchant_id": "1234",
"fulfillment_info": {
"pickup_info": {
"name": "Sicom T",
"contact_info": {
"phone": "(215) 555-5555",
"name": "Sicom T"
},
"instructions": "",
"is_green_indicated": false
}
},
"brand": "GRUBHUB",
"time_placed": "2019-07-09T19:49:59.309Z",
"confirmation_code": "9714",
"when_for": "2019-07-09T19:59:59.330Z",
"restaurant_timezone_id": "America/New_York",
"payments": {
"payments": [
{
"payment_type": "CREDIT_CARD",
"amount": 762,
"tax_application": "POST_TAX"
},
{
"payment_type": "REWARD",
"amount": 200,
"tax_application": "PRE_TAX",
"payment_source": "MERCHANT"
}
],
"total": 762,
"adjusted_total": 800
},
"charges": {
"fees": {
"total": 0,
"delivery": 0
},
"taxes": {
"total": 43,
"sales": 43,
"delivery": 0,
"restaurant": 43
},
"tip": {
"amount": 0,
"type": "CASH"
},
"diner_grand_total": 762,
"grand_total": 762,
"adjusted_grand_total": 762,
"line_groups": [
{
"lines": [
{
"external_id": "ITEM-80081102%v2676|JFJ0wyypW2r-",
"metadata": "{
\"menuVersion\":2676,\"portalChecksum\":\"f3307ecf2936dc44b5d5b987b4d3cdb0ef0ce1ec\"}",
"name": "Frozen Coke®",
"description": "",
"calorie_content": "160",
"media": "https://dimages.bk.com/1080x1080%20px/121_Frozen_Coke.png",
"tax_rate": "tax_1_2_3",
"modifier_categories": [],
"line_options": [
{
"external_id": "PSIZE-80081102+0%v2676|FZpkkfWrP7DY",
"name": "Medium",
"price": 179,
"calorie_content": 160
},
{
"price": 0.12,
"id": "",
"uuid": "",
"name": "Add Lettuce",
"line_sub_options": [],
"external_id": "PMOD-9005400%v2678|0YxceiOOY66k"
}
],
"total": 204
},
{
"name": "Triple Whopper Meal",
"special_instructions": "",
"line_options": [
{
"external_id": "PSIZE-83020241+0%v2676|XUecNiIgbVNW",
"name": "Medium",
"price": 929,
"calorie_content": 0
},
{
"price": 0,
"id": "",
"uuid": "",
"name": "French Fries",
"line_sub_options": [],
"external_id": "SIZEMOD-80049999%v2676|4gq4itq-ew9S",
"metadata": "{
\"menuVersion\":2676,\"portalChecksum\":\"f3307ecf2936dc44b5d5b987b4d3cdb0ef0ce1ec\"}"
},
{
"price": 0.1,
"id": "",
"uuid": "",
"name": "Diet Coke®",
"line_sub_options": [
{
"price": 0.12,
"id": "",
"uuid": "",
"name": "Add Lettuce",
"line_sub_options": [],
"external_id": "PMOD-9005400%v2678|0YxceiOOY66k"
}
],
"external_id": "SIZEMOD-80080202%v2676|KXbJ07VA-t8K",
"metadata": "{
\"menuVersion\":2676,\"portalChecksum\":\"f3307ecf2936dc44b5d5b987b4d3cdb0ef0ce1ec\"}"
}
],
"price": "",
"quantity": "",
"menu_item_id": "",
"menu_item_uuid": "",
"diner_total": "",
"total": 1070,
"tags": [],
"external_id": "VALUE-83020241*80020240%v2676|kEthQAwI3FZ5"
}
]
}
],
"coupons": []
},
"just_in_time_order": false,
"order_merchant_id": "mXKxEJA_EeiWskOnM5yyxw"
}The complete XML response with the OrderDiscounts element is shown below:
<!DOCTYPE pos > <POSResponse type="PlaceOrder" POSVersion="6.46.0" time="1681822294" last_update_time="1681815634" terminal="0" update_needed="false" sync_checksum="0d9452d525ec0eb4a6dd8144b45454c7ee5d1ad8"> <Order number="84" uuid="9d2e2c06-4f6d-4690-bf38-e94437556b0d" pos_uuid="9d2e2c06-4f6d-4690-bf38-e94437556b0d" vendor_uuid="907208463669709"> <MainOrder> <ProductDetail> <Product plu="80081102" qty="1" price="189" name="MD FRZN COKE DLV" poll_id="2306" item_uuid="662c201b95d44264b4204c54aa399e78"/> <Qualifier plu="9005400" qty="1" price="12" name="ADD lettuce" poll_id="522001" item_uuid="8ddebf77d6cc4e8dbd9cb2712fe22e09"/> <ValueMeal plu="83020241" qty="1" price="859" name="CMM TPL WHP DLV" long_name="CMMD TPL WHOPPER DLV" poll_id="7592" item_uuid="4def46b6dcc24a44bd0b3b505ac591c0"> <Product plu="80020240" qty="1" price="0" name="TPL WHOP DLV" long_name="TPL WHOPPER DLV" poll_id="3181" item_uuid="fada5e7010014afaafa680bc6a365629"/> <Product plu="80049999" qty="1" price="0" name="MD FRY DLV" long_name="MD FRY DLV" poll_id="1553" item_uuid="ff31dd4a6ede48b08daf125670590ee7"/> <Product plu="80080202" qty="1" price="0" name="MD DIET D L V" long_name="MD DIET D L V" poll_id="780" item_uuid="7b9c1a66f25e45818cd833301d6e3d4c"/> <Qualifier plu="9005400" qty="1" price="12" name=" ADD lettuce" long_name=" ADD lettuce" poll_id="522001" item_uuid="b650e581c1914abeb2643fd2606557b9"/> </ValueMeal> </ProductDetail> </MainOrder> <OrderDiscounts> <OrderDiscount plu="29330120" value="-200"/> </OrderDiscounts> <Subtotal value="872"/> <Taxes> <Tax plu="20000005" value="75" long_name="Tax (7.000%) TAX" externally_collected="false"/> <Tax plu="20000006" value="0" long_name="UNUSED TAX" externally_collected="false"/> <Tax plu="20000007" value="0" long_name="UNUSED TAX" externally_collected="false"/> </Taxes> <Total value="947"/> <Pickup location="TakeOut" status="Hold" time="0" partner="GrubHub"/> <Customer name="Sicom T"/> </Order> </POSResponse>
DoorDash
For DoorDash, use the following code examples to add the Omni Order Discounts features:
DoorDash Snippets
Use the applied_discounts array to add the discount information to the order request. A snippet of the array is shown below:
"applied_discounts": [
{
"discount_amount": 500,
"promo_id": "0ea502da-66bd-41f7-b6cf-e8ad3f96bdaa",
"promo_code": "$5 off",
"external_campaign_id": "$5.00 Off $25+ Order-Delivery"
}
],The OrderDiscounts element in the XML response is sent to the POS. An example of the XML OrderDiscounts element is shown below:
<OrderDiscounts> <OrderDiscount plu="29330110" qty="1" value="500" /> </OrderDiscounts>
DoorDash Complete Order Request and Response Formats
The complete order request with the applied_discounts array is shown below:
{ "storeId": "bk-900433", "event": { "type": "OrderCreate", "status": "NEW" }, "order": { "id": "70f3b494-1200-445f-8ea1-590a8e9fb223", "store_order_cart_id": 659499414, "tax": 67, "subtotal": -21, "estimated_pickup_time": "2020-11-02T16:50:00Z", "is_pickup": true, "tip_amount": 0, "order_special_instructions": "", "delivery_address": null, "applied_discounts": [ { "discount_amount": 500, "promo_id": "0ea502da-66bd-41f7-b6cf-e8ad3f96bdaa", "promo_code": "$5 off", "external_campaign_id": "$5.00 Off $25+ Order-Delivery" } ], "consumer": { "id": 46527657, "first_name": "Name", "last_name": "L", "email": "support@doordash.com", "phone": "8559731040" }, "store": { "merchant_supplied_id": "bk-900433", "provider_type": "sicom_", "timezone": "US/Hawaii" }, "categories": [ { "merchant_supplied_id": "afternoon_menu_sides", "name": "Sides", "items": [ { "name": "Spicy Crispy Chicken Sandwich", "quantity": 1, "price": 479, "merchant_supplied_id": "ITEM-80030975", "special_instructions": "", "consumer_name": "Name", "extras": [] } ] } ], "delivery_short_code": 784503563, "commission_type": "regular", "is_tax_remitted_by_doordash": false, "tax_amount_remitted_by_doordash": 0 } }
The complete XML response with the OrderDiscounts element is shown below:
<POSResponse type=\"PlaceOrder\" POSVersion=\"6.46.1\" time=\"1681842709\ " last_update_time=\"1681841192\"terminal=\ "0\" update_needed=\"false\" sync_checksum=\ "f1f7f98144bc639118bb43bbce1e3a885a461f1e\"> <Order number=\"737\" uuid=\"bc128b79-a44e-4bd0-94e9-1bcaf60fa31b\ " pos_uuid=\"bc128b79-a44e-4bd0-94e9-1bcaf60fa31b\ " vendor_uuid=\"70f3b494-1200-445f-8ea1-590a8e9fb223\"> <MainOrder> <ProductDetail> <Product plu=\"80030975\" qty=\"1\" price=\"479\" name=\ "SPICY CSP CK DLV\"poll_id=\"105809\" item_uuid=\"86abf4c3633143dfa72de191a8ee3ded\"/> </ProductDetail> </MainOrder> <OrderDiscounts> <OrderDiscount plu=\"29330110\" value=\"-500\"/> </OrderDiscounts> <Subtotal value=\"-21\"/> <Taxes> <Tax plu=\"20000005\" value=\"48\" long_name=\"10% Tax TAX\" externally_collected=\"false\"/> <Tax plu=\"20000006\" value=\"5\" long_name=\"1% Tax TAX\" externally_collected=\"false\"/> <Tax plu=\"20000007\" value=\"14\" long_name=\"3% Tax TAX\" externally_collected=\"false\"/> </Taxes> <Total value=\"46\"/> <Pickup location=\"TakeOut\" status=\"Hold\" time=\"0\" partner=\"Doordash\"/> <Customer name=\"Name L\"/> </Order> </POSResponse>