動態饋給範例

合作夥伴可以為 FoodOrderingMetadata 做為 action_link 的一部分,依據 商家支援的出貨方式:

  1. 僅支援匯出服務的商家
  2. 僅支援外送服務的商家
  3. 支援外帶和外送服務的商家
  4. 提供外帶和外送服務,且未收取任何費用,且顯示最低金額要求 出貨時間

僅供外帶

{
  "metadata": {
    "generation_timestamp": "1467993600",
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "merchant": [
    {
      "merchant_id": "merchant_foepa_2",
      "name": "Sample Food Ordering Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantwebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderpickup/merchant_foepa_2",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "SERVICE",
                "fee_amount": {
                  "amount": {
                    "currency_code": "USD",
                    "units": 1,
                    "nanos": 750000000
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration": {
              "seconds": 1800
            },
            "advance_order_details": {
              "is_supported": true
            }
          }
        }
      ]
    }
  ]
}

僅限外送

{
  "metadata": {
    "generation_timestamp": "1467993600",
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "merchant": [
    {
      "merchant_id": "merchant_foepa_1",
      "name": "Sample Food Ordering Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantwebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderdelivery/merchant_foepa_1",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "DELIVERY",
                "fee_amount": {
                  "amount_range": {
                    "min_amount": {
                      "currency_code": "USD",
                      "units": 1,
                      "nanos": 750000000
                    },
                    "max_amount": {
                      "currency_code": "USD",
                      "units": 3,
                      "nanos": 750000000
                    }
                  }
                }
              }, 
              {
                "type": "SERVICE",
                "fee_amount": {
                  "cart_percentage": {
                    "value": 5.6
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration": {
              "seconds": 1800
            },
            "advance_order_details": {
              "is_supported": true
            }
          }
        }
      ]
    }
  ]
}

外帶與貨品交付

{
  "metadata": {
    "generation_timestamp": "1467993600",
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "merchant": [
    {
      "merchant_id": "merchant_foepa_3",
      "name": "Sample Food Ordering Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantwebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderpickup/merchant_foepa_3",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "SERVICE",
                "fee_amount": {
                  "amount": {
                    "currency_code": "USD",
                    "units": 1,
                    "nanos": 750000000
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration": {
              "seconds": 1800
            },
            "advance_order_details": {
              "is_supported": true
            }
          }
        },
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderdelivery/merchant_foepa_3",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "DELIVERY",
                "fee_amount": {
                  "amount_range": {
                    "min_amount": {
                      "currency_code": "USD",
                      "units": 1,
                      "nanos": 750000000
                    },
                    "max_amount": {
                      "currency_code": "USD",
                      "units": 3,
                      "nanos": 750000000
                    }
                  }
                }
              }, 
              {
                "type": "SERVICE",
                "fee_amount": {
                  "cart_percentage": {
                    "value": 5.6
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration_range": {
              "min_duration": {
                "seconds": 1850
              },
              "max_duration": {
                "seconds": 2400
              }
            },
            "advance_order_details": {
              "is_supported": true
            }
          }
        }
      ]
    }
  ]
}

免服務費,最短時間範圍

這個商家會針對外帶和外送,收取 $0 美元的外送和服務費。此商家 預計在 10 分鐘內完成外帶訂單,預計在 30 分鐘內完成外送訂單 更久。(合作夥伴可能會在自家到達網頁上顯示更準確、最新的時間)。

{
  "metadata": {
    "generation_timestamp": "1467993600",
    "processing_instruction": "PROCESS_AS_COMPLETE",
    "total_shards": 1
  },
  "merchant": [
    {
      "merchant_id": "merchant_foepa_4",
      "name": "Sample Food Ordering Restaurant",
      "telephone": "+1-650-123-4567",
      "url": "https://www.restaurantwebsite.com",
      "category": "restaurant",
      "geo": {
        "address": {
          "street_address": "803 11th Avenue",
          "locality": "Sunnyvale",
          "region": "CA",
          "country": "USA",
          "postal_code": "94089"
        }
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderpickup/merchant_foepa_4",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "SERVICE",
                "fee_amount": {
                  "amount": {
                    "currencyCode": "USD",
                    "units": 0,
                    "nanos": 0
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration_range": {
              "min_duration": {
                "seconds": 600
              }
            }
          }
        },
        {
          "url": "https://www.rwgpartnerwebsite.com/foodorderdelivery/merchant_foepa_4",
          "action_link_type": "ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY",
          "language": "en",
          "platform": "ACTION_PLATFORM_WEB_APPLICATION",
          "food_ordering_metadata": {
            "fee_details": [
              {
                "type": "SERVICE",
                "fee_amount": {
                  "amount": {
                    "currencyCode": "USD",
                    "units": 0,
                    "nanos": 0
                  }
                }
              },
              {
                "type": "DELIVERY",
                "fee_amount": {
                  "amount": {
                    "currencyCode": "USD",
                    "units": 0,
                    "nanos": 0
                  }
                }
              }
            ],
            "fulfillment_lead_time_duration_range": {
              "min_duration": {
                "seconds": 1800
              }
            }
          }
        }
      ]
    }
  ]
}