Support pickup
This topic demonstrates the implementations of the syncStore API to support the pickup service in a store.
Overview
In the food and beverage industry, a store can configure different service types, including:
- Dine-in: Users dine in the eatery.
- Pickup: Users pick up the food themselves.
- Delivery: Users have their food delivered to a specific destination.
To support pickup, you need to include the following pickup-related configurations in a store:
- Include a pickup menu. The value of the menus.type parameter is
PICKUP
. - Contain the business rules for pickup in the store.bizRules parameter. The value of the store.bizRules.scene parameter is
PICKUP_SCHEDULE
orPICKUP_RULE
. - When the value of the store.bizRules.scene parameter is
PICKUP_SCHEDULE
, make sure the ruleData parameter contains available schedules during the store's opening hours and specify the supportDays parameter with a value ranging from 1 to 30. - When the value of the store.bizRules.scene parameter is
PICKUP_RULE
, see PickUpRule for specific configurations.
Note: To specify the availability of dine-in, pickup, or delivery services, see Set service availability.
Use cases
Add a store that supports pickup
The following example demonstrates a store that supports pickup:
- The store opens from 8:00-23:00 every day.
- The store supports pickup and the pickup service is available from 11:00-12:00 and 12:00-13:00.
- The value of supportDays is 6, which means users can see a 6-day schedule for the pickup service every day.
{
"requestId": "22111112****",
"store": {
"storeId": "pickupstoreid01",
"type": "RESTAURANT",
"brandId": "Test Brand",
"name": {
"value": {
"en-US": "deliverystore01"
}
},
"location": {
"address": {
"value": {
"en-US": "123 Braddell Tech, Lorong 8 Toa Payoh #12-14, 319123, Singapore"
}
},
"latitude": "1.339953",
"longitude": "103.858048",
"postcode": 0
},
"status": "OPEN",
"contacts": [
{
"name": {
"value": {
"en-US": "will"
}
},
"phoneNo": "+86130*****"
}
],
"contents": [
{
"type": "TEXT",
"scene": "ANNOUNCEMENT",
"value": "{\"value\":{\"en-US\":\"store01\"}}"
},
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://omni.posplus-crm.com/Omni_FnbItem/store01/test.png"
},
{
"type": "TEXT",
"scene": "DESCRIPTION",
"value": "{\"value\":{\"en-US\":\"store01\"}}"
}
],
"serviceSchedules": [
{
"scheduleType": "DAILY",
"schedules": {
"FIXED": [
{
"startTime": "08:00+08:00",
"endTime": "23:00+08:00"
}
]
}
}
],
"bizRules": [
{
"scene": "PICKUP_SCHEDULE",
"ruleData": "[{\"scheduleType\":\"DAILY\",\"supportDays\":6,\"schedules\":{\"FIXED\":[{\"startTime\":\"11:00+08:00\",\"endTime\":\"12:00+08:00\"},{\"startTime\":\"12:00+08:00\",\"endTime\":\"13:00+08:00\"}]}}]"
},
{
"scene": "PICKUP_RULE",
"ruleData": "[{\"minimumOrderAmount\":{\"value\":1000,\"currency\":\"SGD\"},\"pickUpContactDetails\":[{\"name\":{\"value\":{\"en-US\":\"Sample Brand @ Braddell\"}},\"phoneNo\":\"+656253****\"}],\"pickUpAddress\":{\"value\":{\"en-US\":\"123 Braddell Tech, Lorong 8 Toa Payoh #12-14, 319123, Singapore\"}}}]"
}
],
"extendInfo": {
"recommendItemIds": [
"item_id_01"
],
"banners": [
{
"imageUrl": "https://s3-ap-southeast-1.example.com/store01/b28fcc8c-dd33-4279-8d5b-c0ffa78b117a/1910025357_CarouselBanner(2).png",
"landingUrl": "https://s3-ap-southeast-1.example.com"
}
],
"cuisine": {
"value": {
"en-US": "French"
}
}
},
"menus": [
{
"menuId": "menu_id_03",
"name": {
"value": {
"en-US": "Breakfast"
}
},
"status": "VALID",
"type": "PICKUP",
"minPrepareMinutes": 15,
"categories": [
{
"categoryId": "category_id_01",
"name": {
"value": {
"en-US": "Limited Time Offer"
}
},
"iconUrl": "https://www.example.com/images/antfincdn/cdZOWIR73/0011icon.jpg",
"status": "ACTIVE",
"extendInfo": {
"subtitle": {
"value": {
"en-US": "Main Course"
}
}
},
"items": [
{
"itemId": "item01",
"name": {
"value": {
"en-US": "Nachos Deluxe Double Beef"
}
},
"status": "AVAILABLE",
"saleType": "SINGLE",
"originAmount": {
"currency": "SGD",
"value": 30000
},
"saleAmount": {
"currency": "SGD",
"value": 1350
},
"quantityRule": {
"min": 0,
"max": 99
},
"skuPropertyGroups": [
{
"name": {
"value": {
"en-US": "size"
}
},
"skuGroupId": "27731",
"properties": [
{
"name": {
"value": {
"en-US": "Small"
}
},
"propertyId": "Small"
},
{
"name": {
"value": {
"en-US": "Large"
}
},
"propertyId": "Large"
}
]
},
{
"skuGroupId": "27733",
"name": {
"value": {
"en-US": "Level of Spiciness"
}
},
"properties": [
{
"name": {
"value": {
"en-US": "No Chili"
}
},
"propertyId": "No Chili"
},
{
"name": {
"value": {
"en-US": "less Chili"
}
},
"propertyId": "Less Chili"
},
{
"name": {
"value": {
"en-US": "Normal Chili"
}
},
"propertyId": "Normal Spicy"
}
]
}
],
"skus": [
{
"skuId": "tsku2121",
"skuPropertyPairs": {
"27731": "Small",
"27733": "Normal Spicy"
},
"originAmount": {
"currency": "SGD",
"value": 100
},
"saleAmount": {
"currency": "SGD",
"value": 90
},
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://www.example.com/images/uploads/meals/0f62cf2de02248cee773f990ca.JPG"
}
]
},
{
"skuId": "tsku2122",
"skuPropertyPairs": {
"27731": "Large",
"27733": "Normal Spicy"
},
"originAmount": {
"currency": "SGD",
"value": 100
},
"saleAmount": {
"currency": "SGD",
"value": 80
},
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://wwww.example.com/images/uploads/meals/2cf2dfssdmgkeqec1c.png"
}
]
}
],
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://omni.posplus-crm.com/Omni_FnbItem/store01/NSDLX_DBBF_AC.png"
},
{
"type": "TEXT",
"scene": "DESCRIPTION",
"value": "{\"value\":{\"en-US\":\"For those who prefer a cheesy meal, indulge in our Nachos Deluxe Double Beef. Served with two beef patties, American cheese, lettuce and a combination of different sauces such as mayonnaise, ketchup and Nachos Cheese sauce!\"}}"
}
],
"extendInfo": {
"subTitle": {
"value": {
"en-US": "delicious chicken"
}
},
"takeAwayFee": {
"currency": "SGD",
"value": 100
},
"serviceSchedules": [
{
"scheduleType": "WEEKLY",
"schedules": {
"MONDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"TUESDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"WEDNESDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"THURSDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"FRIDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"SATURDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"SUNDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
]
}
}
]
},
"modifierGroups": [
{
"groupId": "MODIFIERGROUP-1",
"name": {
"value": {
"en-US": "Add-On"
}
},
"quantityRule": {
"min": 0,
"max": 12
},
"childItems": [
{
"itemId": "201002||300009||@CD",
"name": {
"value": {
"en-US": "Add Beef Patty"
}
},
"saleType": "ADDON",
"originAmount": {
"currency": "SGD",
"value": 0
},
"saleAmount": {
"currency": "SGD",
"value": 350
}
}
]
}
]
}
]
}
]
}
]
}
}
Add pickup service to an existing store
The following example demonstrates adding the pickup service to an existing store (pickupstoreid01
) that already has the dine-in service.
Note: To add the pickup-related rules, pass a new bizRules array with existing and newly added rules, which will overwrite the data in the previous array.
{
"requestId": "22111112****",
"store": {
"storeId": "pickupstoreid01",
"bizRules": [
{
"scene": "DINE_IN_SCHEDULE",
"ruleData": "[{\"scheduleType\":\"DAILY\",\"supportDays\":6,\"schedules\":{\"FIXED\":[{\"startTime\":\"10:00+08:00\",\"endTime\":\"11:00+08:00\"},{\"startTime\":\"12:00+08:00\",\"endTime\":\"13:00+08:00\"}]}},{\"startTime\":\"2022-10-01T00:00:01+08:00\",\"endTime\":\"2022-10-10T00:00:01+08:00\",\"scheduleType\":\"DAILY\",\"supportDays\":6,\"schedules\":{\"FIXED\":[{\"startTime\":\"11:00+08:00\",\"endTime\":\"12:00+08:00\"},{\"startTime\":\"13:00+08:00\",\"endTime\":\"14:00+08:00\"}]}}]"
},
{
"scene": "DINE_IN_ORDER",
"ruleData": "{\"isTableNoRequired\":true,\"serviceType\":\"SERVE_TO_TABLE\"}"
},
{
"scene": "PICKUP_SCHEDULE",
"ruleData": "[{\"scheduleType\":\"DAILY\",\"supportDays\":10,\"schedules\":{\"FIXED\":[{\"startTime\":\"11:00+08:00\",\"endTime\":\"12:00+08:00\"},{\"startTime\":\"12:00+08:00\",\"endTime\":\"13:00+08:00\"}]}},{\"scheduleType\":\"DAILY\",\"supportDays\":10,\"startTime\":\"2022-10-08T00:00:01+08:00\",\"endTime\":\"2022-10-10T00:00:01+08:00\",\"schedules\":{\"FIXED\":[{\"startTime\":\"10:00+08:00\",\"endTime\":\"11:00+08:00\"},{\"startTime\":\"12:00+08:00\",\"endTime\":\"13:00+08:00\"},{\"startTime\":\"13:00+08:00\",\"endTime\":\"14:00+08:00\"}]}}]"
},
{
"scene": "PICKUP_RULE",
"ruleData": "[{\"minimumOrderAmount\":{\"value\":1000,\"currency\":\"SGD\"},\"pickUpContactDetails\":[{\"name\":{\"value\":{\"en-US\":\"Sample Brand @ Braddell\"}},\"phoneNo\":\"+6562539198\"}],\"pickUpAddress\":{\"value\":{\"en-US\":\"15 Braddell Tech, Lorong 8 Toa Payoh #05-09, 319262, Singapore\"}}}]"
}
],
"menus": [
{
"menuId": "menu_id_03",
"name": {
"value": {
"en-US": "Beakfast"
}
},
"status": "VALID",
"type": "PICKUP",
"minPrepareMinutes": 15,
"categories": [
{
"categoryId": "category_id_01",
"name": {
"value": {
"en-US": "Limited Time Offer"
}
},
"iconUrl": "https://www.example.com/images/antfincdn/cdZOWIR73/0011icon.jpg",
"status": "ACTIVE",
"extendInfo": {
"subtitle": {
"value": {
"en-US": "Main Course"
}
}
},
"items": [
{
"itemId": "item01",
"name": {
"value": {
"en-US": "Nachos Deluxe Double Beef"
}
},
"status": "AVAILABLE",
"saleType": "SINGLE",
"originAmount": {
"currency": "SGD",
"value": 30000
},
"saleAmount": {
"currency": "SGD",
"value": 1350
},
"quantityRule": {
"min": 0,
"max": 99
},
"skuPropertyGroups": [
{
"name": {
"value": {
"en-US": "size"
}
},
"skuGroupId": "27731",
"properties": [
{
"name": {
"value": {
"en-US": "Small"
}
},
"propertyId": "Small"
},
{
"name": {
"value": {
"en-US": "Large"
}
},
"propertyId": "Large"
}
]
},
{
"skuGroupId": "27733",
"name": {
"value": {
"en-US": "Level of Spiciness"
}
},
"properties": [
{
"name": {
"value": {
"en-US": "No Chili"
}
},
"propertyId": "No Chili"
},
{
"name": {
"value": {
"en-US": "less Chili"
}
},
"propertyId": "Less Chili"
},
{
"name": {
"value": {
"en-US": "Normal Chili"
}
},
"propertyId": "Normal Spicy"
}
]
}
],
"skus": [
{
"skuId": "tsku2121",
"skuPropertyPairs": {
"27731": "Small",
"27733": "Normal Spicy"
},
"originAmount": {
"currency": "SGD",
"value": 100
},
"saleAmount": {
"currency": "SGD",
"value": 90
},
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://www.example.com/images/uploads/meals/0f62cf2de02248cee773f990ca.JPG"
}
]
},
{
"skuId": "tsku2122",
"skuPropertyPairs": {
"27731": "Large",
"27733": "Normal Spicy"
},
"originAmount": {
"currency": "SGD",
"value": 100
},
"saleAmount": {
"currency": "SGD",
"value": 80
},
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://wwww.example.com/images/uploads/meals/2cf2dfssdmgkeqec1c.png"
}
]
}
],
"contents": [
{
"type": "IMAGE",
"scene": "BACKGROUND",
"value": "https://omni.posplus-crm.com/Omni_FnbItem/store01/NSDLX_DBBF_AC.png"
},
{
"type": "TEXT",
"scene": "DESCRIPTION",
"value": "{\"value\":{\"en-US\":\"For those who prefer a cheesy meal, indulge in our Nachos Deluxe Double Beef. Served with two beef patties, American cheese, lettuce and a combination of different sauces such as mayonnaise, ketchup and Nachos Cheese sauce!\"}}"
}
],
"extendInfo": {
"subTitle": {
"value": {
"en-US": "delicious chicken"
}
},
"takeAwayFee": {
"currency": "SGD",
"value": 100
},
"serviceSchedules": [
{
"scheduleType": "WEEKLY",
"schedules": {
"MONDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"TUESDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"WEDNESDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"THURSDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"FRIDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"SATURDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
],
"SUNDAY": [
{
"startTime": "00:00+08:00",
"endTime": "23:59+08:00"
}
]
}
}
]
},
"modifierGroups": [
{
"groupId": "MODIFIERGROUP-1",
"name": {
"value": {
"en-US": "Add-On"
}
},
"quantityRule": {
"min": 0,
"max": 12
},
"childItems": [
{
"itemId": "201002||300009||@CD",
"name": {
"value": {
"en-US": "Add Beef Patty"
}
},
"saleType": "ADDON",
"originAmount": {
"currency": "SGD",
"value": 0
},
"saleAmount": {
"currency": "SGD",
"value": 350
}
}
]
}
]
}
]
}
]
}
]
}
}