ใช้การอัปเดตคำสั่งซื้อขั้นสูง

หลังจากที่ลูกค้าส่งคำสั่งซื้อแล้ว คุณสามารถแจ้งให้ลูกค้าทราบเกี่ยวกับการเปลี่ยนแปลงในคำสั่งซื้อได้โดยส่งข้อความอัปเดตคำสั่งซื้อไปยัง Google จากนั้น Google จะส่งต่อข้อความนั้น ไปยังลูกค้าภายใน UI การสั่งซื้อ

สาเหตุทั่วไปในการส่งการอัปเดตคำสั่งซื้อมีดังนี้

  • เวลาที่ดำเนินการตามคำสั่งซื้อโดยประมาณจะพร้อมใช้งานหรือมีการเปลี่ยนแปลง
  • สถานะของคำสั่งซื้อจะเปลี่ยนแปลง
  • ดำเนินการตามคำสั่งซื้อนี้ไม่ได้อีกต่อไป
  • ราคารายการในเมนูในคำสั่งซื้อมีการเปลี่ยนแปลง
  • ลูกค้ามีวิธีใหม่ในการจัดการคำสั่งซื้อ เช่น หมายเลขโทรศัพท์ของฝ่ายสนับสนุนลูกค้าหรือหมายเลขโทรศัพท์ของร้านอาหาร
  • ใบเสร็จสำหรับคำสั่งซื้อจะพร้อมใช้งาน

ตัวอย่างเช่น ตัวอย่างต่อไปนี้ใช้การอัปเดตคำสั่งซื้อเพื่อเปลี่ยนสถานะคำสั่งซื้อของลูกค้าจาก CREATED เป็น CONFIRMED หลังจากที่ร้านอาหารยืนยันคำสั่งซื้อ

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: ร้านอาหารยืนยันคำสั่งซื้อ ระบบจะส่ง OrderUpdate ที่มีสถานะ CONFIRMED ไปยัง Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ estimatedFulfillmentTime

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"
        }
      }
  }
}

หากต้องการทราบข้อมูลพื้นฐานเกี่ยวกับการอัปเดตคำสั่งซื้อสำหรับโปรเจ็กต์ โปรดอ่านคู่มือการอัปเดตคำสั่งซื้อแบบไม่พร้อมกัน

ส่วนถัดไปจะแสดงตัวอย่างสถานการณ์การอัปเดตคำสั่งซื้อขั้นสูง

สถานะ "ถูกปฏิเสธ"

ตัวอย่างด้านล่างแสดงAsyncOrderUpdateRequestMessageสำหรับคำสั่งซื้อที่ถูกปฏิเสธด้วยเหตุผลต่างๆ ตัวอย่างของเหตุผลที่ปฏิเสธคือกรณีที่ร้านอาหารไม่สามารถดำเนินการตามคำสั่งซื้อได้อีกต่อไปหรือเมื่อที่อยู่สำหรับจัดส่งที่เชื่อมโยงกับคำสั่งซื้ออยู่นอกพื้นที่บริการ

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งานที่ 1: คำสั่งซื้อถูกปฏิเสธเนื่องจากผู้ให้บริการติดต่อร้านอาหารหรือร้านอาหารดำเนินการตามคำสั่งซื้อไม่ได้ ส่ง OrderUpdate ที่มีสถานะ REJECTED ไปยัง Google ซึ่งต้องมีข้อผิดพลาดประเภท NO_CAPACITY actionOrderId, userVisibleOrderId, orderManagementActions, rejectionInfo และ foodOrderError
กรณีการใช้งาน 2: คำสั่งซื้อถูกปฏิเสธเนื่องจากคนขับไม่พร้อมให้บริการหรือที่อยู่สำหรับนำส่งอยู่นอกพื้นที่บริการ ส่ง OrderUpdate ที่มีสถานะ REJECTED ไปยัง Google ซึ่งต้องมีข้อผิดพลาดประเภท OUT_OF_SERVICE_AREA actionOrderId, userVisibleOrderId, orderManagementActions, rejectionInfo และ foodOrderError
กรณีการใช้งานที่ 3: คำสั่งซื้อถูกปฏิเสธเนื่องจากร้านอาหารปิดโดยไม่คาดคิดหรือกำลังปิด ส่ง OrderUpdate ที่มีสถานะ REJECTED ไปยัง Google ซึ่งต้องมีข้อผิดพลาดประเภท CLOSED actionOrderId, userVisibleOrderId, orderManagementActions, rejectionInfo และ foodOrderError
กรณีการใช้งาน 4: คำสั่งซื้อถูกปฏิเสธเนื่องจากสินค้าบางรายการหมด ส่ง OrderUpdate ที่มีสถานะ REJECTED ไปยัง Google ซึ่งต้องมีข้อผิดพลาดประเภท AVAILABILITY_CHANGED actionOrderId, userVisibleOrderId, orderManagementActions, rejectionInfo และ foodOrderError
กรณีการใช้งานที่ 5: คำสั่งซื้อถูกปฏิเสธด้วยเหตุผลที่ไม่รู้จักหรือไม่จัดอยู่ในหมวดหมู่ใดๆ ส่ง OrderUpdate ที่มีสถานะ REJECTED ไปยัง Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ rejectionInfo ของประเภทข้อผิดพลาด UNKNOWN

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"
            }
          }
        }
      ]
    }
  }
}

สถานะยกเลิก

ตัวอย่างด้านล่างแสดง AsyncOrderUpdateRequestMessage ของคำสั่งซื้อที่ยกเลิกโดยคำขอของลูกค้า

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: คำสั่งซื้อถูกยกเลิกตามคำขอของลูกค้า ส่ง OrderUpdate ที่มีสถานะ CANCELLED ไปยัง Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ cancellationInfo

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"
            }
          }
        }
      ]
    }
  }
}

สถานะดำเนินการแล้ว

ตัวอย่างด้านล่างแสดงAsyncOrderUpdateRequestMessageสำหรับคำสั่งซื้อที่มีการดำเนินการแล้ว

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: คำสั่งซื้อได้รับการดำเนินการแล้ว ส่ง OrderUpdate ที่มีสถานะ FULFILLED ไปยัง Google ซึ่งต้องมี actionOrderId, userVisibleOrderId และ orderManagementActions

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"
            }
          }
        }
      ]
    }
  }
}

สถานะการขนส่ง

ตัวอย่างด้านล่างแสดง AsyncOrderUpdateRequestMessage สำหรับคำสั่งซื้อที่นำส่งซึ่งอยู่ระหว่างการขนส่งไปยังลูกค้า

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: คําสั่งซื้อการนำส่งอยู่ระหว่างการขนส่ง ส่ง OrderUpdate ที่มีสถานะ IN_TRANSIT ให้ Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ estimatedFulfillmentTime

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"
      }
    }
  }
}

สถานะพร้อมสำหรับการรับสินค้า

ตัวอย่างด้านล่างแสดง AsyncOrderUpdateRequestMessage สำหรับคำสั่งซื้อที่พร้อมให้ลูกค้ามารับสินค้า

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: คำสั่งซื้อพร้อมให้ไปรับแล้ว ส่ง OrderUpdate ที่มีสถานะ READY_FOR_PICKUP ให้ Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ estimatedFulfillmentTime

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"
      }
    }
  }
}

สถานะการเตรียมอาหาร

ตัวอย่างด้านล่างแสดง AsyncOrderUpdateRequestMessage สำหรับคำสั่งซื้อที่ร้านอาหารเตรียมให้

Use Case วิธีติดตั้งใช้งาน
กรณีการใช้งาน 1: ร้านอาหารกำลังจัดเตรียมอาหาร ส่ง OrderUpdate ที่มีสถานะ IN_PREPARATION ให้ Google ซึ่งต้องมี actionOrderId, userVisibleOrderId, orderManagementActions และ estimatedFulfillmentTime

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"
      }
    }
  }
}

สถานะการสั่งซื้อที่เปลี่ยนแปลง

ตัวอย่างด้านล่างแสดงAsyncOrderUpdateRequestMessageสำหรับการเปลี่ยนแปลงต่างๆ ที่เกิดขึ้นกับคำสั่งซื้อของลูกค้า

กรณีการใช้งาน 1: ต้องอัปเดตเวลาที่ดำเนินการตามคำสั่งซื้อโดยประมาณ ส่ง OrderUpdate ไปยัง Google พร้อมสถานะคำสั่งซื้อ ได้แก่ actionOrderId, userVisibleOrderId, orderManagementAction และ estimatedFulfillmentTime ที่อัปเดต
กรณีการใช้งาน 2: ต้องอัปเดตราคารวมของคำสั่งซื้อ ส่ง OrderUpdate ไปยัง Google พร้อมสถานะคำสั่งซื้อ ได้แก่ actionOrderId, userVisibleOrderId, orderManagementAction, estimatedFulfillmentTime และ totalPrice ที่อัปเดต
กรณีการใช้งานที่ 3: ต้องอัปเดตการดำเนินการจัดการคำสั่งซื้อของคำสั่งซื้อ ส่ง OrderUpdate ไปยัง Google พร้อมสถานะคำสั่งซื้อ ได้แก่ actionOrderId, userVisibleOrderId, estimatedFulfillmentTime และ orderManagementActions ที่อัปเดต

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"
        }
      }
  }
}