Bir müşteri sipariş gönderdikten sonra, Google'a sipariş güncelleme mesajı göndererek müşteriyi siparişteki değişiklikler konusunda bilgilendirebilirsiniz. Google daha sonra bu mesajı müşteriye sipariş arayüzü üzerinden iletir.
Sipariş güncellemeleri göndermenin yaygın nedenleri şunlardır:
- Siparişin tahmini tamamlanma süresi kullanılabilir hale gelir veya değişir.
- Siparişin durumu değiştiğinde.
- Sipariş artık karşılanamıyor.
- Siparişe dahil olan menü öğesinin fiyatı değişti.
- Müşteri, siparişini yönetmek için müşteri desteği veya restoran telefon numarası gibi yeni bir yönteme sahip.
- Siparişin makbuzu hazır olur.
Örneğin, aşağıdaki örnekte restoran siparişi onayladıktan sonra bir müşterinin CREATED
olan siparişinin durumunu CONFIRMED
olarak değiştirmek için bir sipariş güncellemesi kullanılmaktadır:
Kullanım alanı | Nasıl uygulanır? |
---|---|
1. kullanım alanı: Restoran siparişi onaylar | Google'a CONFIRMED durumuna sahip bir OrderUpdate gönderilir. actionOrderId , userVisibleOrderId , orderManagementActions ve estimatedFulfillmentTime içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "CONFIRMED", "label": "Provider confirmed" }, "receipt": { "userVisibleOrderId": "userVisibleId1234" }, "updateTime": "2017-07-17T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "2017-07-17T13:00:00Z/2017-07-17T13:30:00Z" } } } }
Projenizde sipariş güncellemelerini uygulamayla ilgili temel bilgiler için Eş zamansız sipariş güncellemeleri kılavuzunu okuyun.
Sonraki bölümlerde, daha gelişmiş sipariş güncelleme senaryolarıyla ilgili örnekler sağlanmaktadır.
Reddedildi durumu
Aşağıdaki örneklerde çeşitli nedenlerle reddedilen siparişler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir. Reddedilme nedenlerine örnek olarak restoranın artık siparişi yerine getirememesi veya siparişle ilişkili teslimat adresinin aralık dışında olması gösterilebilir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
Kullanım alanı 1: Sağlayıcı restoranla iletişime geçemediği veya restoran siparişi yerine getiremediği için sipariş reddedilir. | Google'a REJECTED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo ve foodOrderError hata türünde NO_CAPACITY olmalıdır. |
Kullanım alanı 2: Sürücü çalışmadığı veya teslimat adresi izin verilen aralığın dışında olduğu için sipariş reddedilmiştir. | Google'a REJECTED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo ve foodOrderError hata türünde OUT_OF_SERVICE_AREA olmalıdır. |
Kullanım alanı 3: Restoran beklenmedik bir şekilde kapandığı veya kapandığı için sipariş reddedilmiştir. | Google'a REJECTED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo ve foodOrderError hata türünde CLOSED olmalıdır. |
Kullanım alanı 4: Bazı öğeler stokta kalmadığı için sipariş reddedildi. | Google'a REJECTED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo ve foodOrderError hata türünde AVAILABILITY_CHANGED olmalıdır. |
Kullanım alanı 5: Sipariş bilinmeyen veya kategorize edilmemiş nedenlerle reddedilir. | Google'a REJECTED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions ve rejectionInfo hata türüne sahip UNKNOWN olmalıdır. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "REJECTED", "label": "Order rejected" }, "updateTime": "2017-05-10T02:30:00.000Z", "rejectionInfo": { "type": "UNKNOWN", "reason": "Sorry, the restaurant cannot take your order right now." }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "foodOrderErrors": [ { "error": "NO_CAPACITY", "description": "Sorry, the restaurant cannot take your order right now." } ] } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "REJECTED", "label": "Order rejected" }, "updateTime": "2017-05-10T02:30:00.000Z", "rejectionInfo": { "type": "UNKNOWN", "reason": "Sorry, delivery is currently not available to your address." }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "foodOrderErrors": [ { "error": "OUT_OF_SERVICE_AREA", "description": "Sorry, delivery is currently not available to your address." } ] } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "REJECTED", "label": "Order rejected" }, "updateTime": "2017-05-10T02:30:00.000Z", "rejectionInfo": { "type": "UNKNOWN", "reason": "Sorry, the restaurant is closed unexpectedly." }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "foodOrderErrors": [ { "error": "CLOSED", "description": "Sorry, the restaurant is closed unexpectedly." } ] } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "REJECTED", "label": "Order rejected" }, "updateTime": "2017-05-10T02:30:00.000Z", "rejectionInfo": { "type": "UNKNOWN", "reason": "Sorry, some of items are not available right now." }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "foodOrderErrors": [ { "error": "AVAILABILITY_CHANGED", "id": "sample_menu_item_id", "description": "Sorry, some of the items are not available right now." } ] } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "REJECTED", "label": "Order rejected" }, "updateTime": "2017-05-10T02:30:00.000Z", "rejectionInfo": { "type": "UNKNOWN", "reason": "Sorry, your order is rejected." }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ] } } }
İptal edildi durumu
Aşağıdaki örnekte, müşteri isteğiyle iptal edilen siparişler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
Kullanım alanı 1: Sipariş, müşterinin isteği üzerine iptal edilir | Google'a CANCELLED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions ve cancellationInfo içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "CANCELLED", "label": "Order cancelled" }, "updateTime": "2017-05-10T02:30:00.000Z", "cancellationInfo": { "reason": "Customer requested" }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ] } } }
Tamamlanma durumu
Aşağıdaki örnekte, yerine getirilen siparişler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
Kullanım alanı 1: Sipariş karşılanır | Google'a FULFILLED durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId ve orderManagementActions içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "FULFILLED", "label": "Order delivered" }, "updateTime": "2017-05-10T02:30:00.000Z", "fulfillmentInfo": { "deliveryTime": "2017-05-10T02:30:00.000Z" }, "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ] } } }
Nakliye durumu
Aşağıdaki örnekte, müşteriye teslim edilmekte olan teslimat siparişleri için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
Kullanım alanı 1: Teslimat siparişi transfer sürecindedir. | Google'a IN_TRANSIT durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions ve estimatedFulfillmentTime içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "IN_TRANSIT", "label": "Order is on the way" }, "inTransitInfo": { "updatedTime": "2017-07-17T12:00:00Z" }, "updateTime": "2017-07-17T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "PT20M" } } } }
Teslim alma için hazır durumu
Aşağıdaki örnekte, müşteri tarafından teslim alınmaya hazır olan siparişler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
1. Kullanım alanı: Sipariş teslim alınmaya hazır. | Google'a READY_FOR_PICKUP durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions ve estimatedFulfillmentTime içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "READY_FOR_PICKUP", "label": "Order is ready for pickup" }, "updateTime": "2018-04-15T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "PT20M" } } } }
Hazır gıda durumu
Aşağıdaki örnekte restoran tarafından hazırlanan siparişler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı | Nasıl uygulanır? |
---|---|
Kullanım alanı 1: Sipariş restoran tarafından hazırlanıyor. | Google'a IN_PREPARATION durumunda bir OrderUpdate gönderin. actionOrderId , userVisibleOrderId , orderManagementActions ve estimatedFulfillmentTime içermelidir. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "IN_PREPARATION", "label": "Order is being prepared" }, "updateTime": "2018-04-15T11:30:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "PT20M" } } } }
Sipariş değişti durumu
Aşağıdaki örneklerde, bir müşterinin siparişinde yapılan çeşitli değişiklikler için bir AsyncOrderUpdateRequestMessage
gösterilmektedir.
Kullanım alanı 1: Tahmini sipariş karşılama süresinin güncellenmesi gerekir. | Google'a sipariş durumu,
actionOrderId , userVisibleOrderId ,
orderManagementAction ve güncellenmiş
estimatedFulfillmentTime içeren bir OrderUpdate gönderin. |
Kullanım alanı 2: Siparişin toplam fiyatının güncellenmesi gerekir. | Google'a sipariş durumu,
actionOrderId , userVisibleOrderId ,
orderManagementAction ,
estimatedFulfillmentTime
ve güncellenmiş totalPrice ile birlikte bir OrderUpdate gönderin. |
Kullanım alanı 3: Siparişin sipariş yönetimi işlemlerinin güncellenmesi gerekiyor. | Google'a sipariş durumu,
actionOrderId , userVisibleOrderId ,
estimatedFulfillmentTime ve güncellenmiş
orderManagementActions içeren bir OrderUpdate gönderin. |
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "CONFIRMED", "label": "Provider confirmed" }, "receipt": { "userVisibleOrderId": "userVisibleId1234" }, "updateTime": "2017-07-17T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "2017-07-17T13:00:00Z/2017-07-17T13:30:00Z" } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "CONFIRMED", "label": "Provider confirmed" }, "receipt": { "userVisibleOrderId": "userVisibleId1234" }, "totalPrice": { "type": "ESTIMATE", "amount": { "currencyCode": "USD", "units": "20", "nanos": 500000000 } }, "updateTime": "2017-07-17T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "2017-07-17T13:00:00Z/2017-07-17T13:30:00Z" } } } }
JSON
{ "isInSandbox": true, "customPushMessage": { "orderUpdate": { "actionOrderId": "sample_action_order_id", "orderState": { "state": "CONFIRMED", "label": "Provider confirmed" }, "receipt": { "userVisibleOrderId": "userVisibleId1234" }, "updateTime": "2017-07-17T12:00:00Z", "orderManagementActions": [ { "type": "CUSTOMER_SERVICE", "button": { "title": "Contact customer service", "openUrlAction": { "url": "mailto:support@example.com" } } }, { "type": "EMAIL", "button": { "title": "Email restaurant", "openUrlAction": { "url": "mailto:person@example.com" } } }, { "type": "CALL_RESTAURANT", "button": { "title": "Call restaurant", "openUrlAction": { "url": "tel:+16505554679" } } }, { "type": "CALL_DRIVER", "button": { "title": "Call driver", "openUrlAction": { "url": "tel:+16505554681" } } } ], "infoExtension": { "@type": "type.googleapis.com/google.actions.v2.orders.FoodOrderUpdateExtension", "estimatedFulfillmentTimeIso8601": "2017-07-17T13:00:00Z/2017-07-17T13:30:00Z" } } } }