উন্নত অর্ডার আপডেট বাস্তবায়ন

একজন গ্রাহক অর্ডার জমা দেওয়ার পরে, আপনি Google-এ অর্ডার আপডেট মেসেজ পাঠিয়ে অর্ডারে পরিবর্তনের বিষয়ে গ্রাহককে অবহিত করতে পারেন। Google তারপর অর্ডারিং UI এর মধ্যে গ্রাহকের কাছে সেই বার্তাটি রিলে করে।

অর্ডার আপডেট পাঠানোর সাধারণ কারণগুলির মধ্যে রয়েছে:

  • অর্ডারের জন্য আনুমানিক পূর্ণতা সময় উপলব্ধ বা পরিবর্তন হয়.
  • আদেশের অবস্থা পরিবর্তিত হয়।
  • আদেশ আর পূরণ করা যাবে না.
  • অর্ডারে অন্তর্ভুক্ত একটি মেনু আইটেমের দাম পরিবর্তিত হয়েছে৷
  • গ্রাহকের কাছে তাদের অর্ডার পরিচালনা করার একটি নতুন উপায় রয়েছে, যেমন একটি গ্রাহক সহায়তা বা রেস্তোরাঁর ফোন নম্বর৷
  • অর্ডারের রসিদ পাওয়া যায়।

উদাহরণ স্বরূপ, রেস্তোরাঁটি অর্ডার নিশ্চিত করার পরে নিম্নলিখিত উদাহরণটি একটি গ্রাহকের অর্ডারের অবস্থা CREATED থেকে CONFIRMED পরিবর্তন করতে একটি অর্ডার আপডেট ব্যবহার করে:

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: রেস্টুরেন্ট অর্ডার নিশ্চিত করে একটি CONFIRMED স্থিতি সহ একটি OrderUpdate 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"
        }
      }
  }
}

আপনার প্রোজেক্টের জন্য অর্ডার আপডেট বাস্তবায়নের মৌলিক বিষয়গুলির জন্য, গাইড Async অর্ডার আপডেটগুলি পড়ুন।

পরবর্তী বিভাগগুলি আরও উন্নত অর্ডার আপডেট পরিস্থিতির জন্য উদাহরণ প্রদান করে।

প্রত্যাখ্যাত স্ট্যাটাস

নীচের উদাহরণগুলি বিভিন্ন কারণে প্রত্যাখ্যান করা অর্ডারগুলির জন্য একটি AsyncOrderUpdateRequestMessage প্রদর্শন করে৷ প্রত্যাখ্যানের কারণগুলির কিছু উদাহরণ হল যখন রেস্তোরাঁটি আর অর্ডারটি পূরণ করতে পারে না বা যখন অর্ডারের সাথে যুক্ত ডেলিভারির ঠিকানা সীমার বাইরে থাকে।

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: অর্ডার প্রত্যাখ্যান করা হয়েছে কারণ প্রদানকারী রেস্টুরেন্টের সাথে যোগাযোগ করতে পারে না বা রেস্তোরাঁ অর্ডারটি পূরণ করতে পারে না। Google-এ একটি REJECTED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo এবং foodOrderError NO_CAPACITY টাইপের ত্রুটি থাকতে হবে।
কেস 2 ব্যবহার করুন: অর্ডার প্রত্যাখ্যান করা হয়েছে কারণ ড্রাইভার অনুপলব্ধ বা ডেলিভারি ঠিকানা সীমার বাইরে। Google-এ একটি REJECTED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo , এবং foodOrderError এর ত্রুটির ধরন OUT_OF_SERVICE_AREA থাকতে হবে।
কেস 3 ব্যবহার করুন: রেস্তোরাঁটি অপ্রত্যাশিতভাবে বন্ধ বা বন্ধ হওয়ার কারণে অর্ডার প্রত্যাখ্যান করা হয়েছে। Google-এ একটি REJECTED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo , এবং foodOrderError টাইপের ত্রুটি CLOSED থাকতে হবে।
কেস 4 ব্যবহার করুন: কিছু আইটেম স্টক শেষ হওয়ার কারণে অর্ডার প্রত্যাখ্যান করা হয়েছে। Google-এ একটি REJECTED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই actionOrderId , userVisibleOrderId , orderManagementActions , rejectionInfo , এবং foodOrderError এরর প্রকার AVAILABILITY_CHANGED থাকতে হবে।
কেস 5 ব্যবহার করুন: অজানা বা অশ্রেণীভুক্ত কারণে অর্ডার প্রত্যাখ্যান করা হয়েছে। Google-এ একটি REJECTED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই actionOrderId , userVisibleOrderId , orderManagementActions এবং UNKNOWN টাইপের ত্রুটির rejectionInfo থাকতে হবে।

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 প্রদর্শন করে৷

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: গ্রাহকের অনুরোধে অর্ডার বাতিল করা হয়েছে Google এ একটি CANCELLED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই 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 প্রদর্শন করে৷

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: অর্ডার পূর্ণ হয়েছে Google-এ একটি FULFILLED স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই 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 প্রদর্শন করে ডেলিভারি অর্ডারের জন্য যা গ্রাহকের কাছে ট্রানজিট রয়েছে৷

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: ডেলিভারি অর্ডার ট্রানজিটে আছে। Google এ একটি IN_TRANSIT স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই 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 প্রদর্শন করে যা গ্রাহকের দ্বারা নেওয়ার জন্য প্রস্তুত৷

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: অর্ডার নেওয়ার জন্য প্রস্তুত। Google এ একটি READY_FOR_PICKUP স্ট্যাটাস সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই 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 প্রদর্শন করে৷

ব্যবহারের ক্ষেত্রে কিভাবে বাস্তবায়ন করা যায়
কেস 1 ব্যবহার করুন: রেস্টুরেন্ট দ্বারা অর্ডার প্রস্তুত করা হচ্ছে. Google এ একটি IN_PREPARATION স্থিতি সহ একটি OrderUpdate পাঠান৷ এতে অবশ্যই 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 ব্যবহার করুন: আনুমানিক পরিপূর্ণতা সময় আপডেট করা প্রয়োজন। একটি অর্ডার স্ট্যাটাস, actionOrderId , userVisibleOrderId , orderManagementAction এবং আপডেট করা estimatedFulfillmentTime সহ Google-এ একটি OrderUpdate পাঠান।
কেস 2 ব্যবহার করুন: অর্ডারের মোট মূল্য আপডেট করা প্রয়োজন। একটি অর্ডার স্ট্যাটাস, actionOrderId , userVisibleOrderId , orderManagementAction , estimatedFulfillmentTime এবং আপডেট করা totalPrice সহ Google-এ একটি OrderUpdate পাঠান।
কেস 3 ব্যবহার করুন: অর্ডারের অর্ডার ম্যানেজমেন্ট অ্যাকশন আপডেট করা দরকার। একটি অর্ডার স্ট্যাটাস, actionOrderId , userVisibleOrderId , estimatedFulfillmentTime এবং আপডেট করা orderManagementActions সহ Google এ একটি OrderUpdate পাঠান।

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