The Correct Sorting of Products and Categories in a Pushed Menu
Why are the sorting order of products and categories relevant?
When a customer creates a menu in Deliverect, they can configure the exact sorting order they want their categories and products to show in. For example:
- Best-selling or New products to be shown at the top of the menu.
- Category called Steak & Burgers* to display at the top of the menu and Desserts at the bottom.
How does this order show in a published menu?
The intended order of categories shown in the menu push is simply the order that they appear in the JSON. (For more information, see a guide on how to configure a Menu Update Webhook URL)
In a published menu, products will also be sorted in the order they should appear per category. Products can appear more than once in different categories, therefore you should look to the categories array on the payload and refer to the order of the subProducts array inside the category.
For example, within the below category Steak & Burgers if you refer to the subProducts array, the first item showing has id 63cf9b**********05f6c05d
which relates to a Steak Frites item, followed by id 63cf9***********05f6c05e
which is a Burger Combo and so on.
The end result should be that whichever order items appear within subProducts, this should be the order displayed on the customer facing menu (example screenshot below)
Any changes to the order with subsequent published menus should also be reflected.
{
"_id": "63cf9b******05f6c0a0",
"name": "Steak & Burgers",
...
"subProducts": [
"63cf9b**********05f6c05d",
"63cf9***********05f6c05e",
"63cf9***********05f6c057",
"63cf9***********05f6c05b",
"63cf9***********fd2de615"
],
},
"subProductSortOrder"
This array can in some cases be empty and although another reference to sorting, it shouldn't be used as part of an integration.
Updated 11 months ago