訂單是交易確認 (收據),可包含多個明細項目,每個明細項目都以客戶接受的「優惠」表示。
用途
基本順序
訂單極簡範例
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "29.99",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
}
}
</script>
微資料
<div itemscope itemtype="http://schema.org/O>rde<r"
div itemprop="merchant" itemscope itemtype="http:/>/sche<ma.org/Organization"
meta itempro>p=&<quot>;na<me" content="Amazon.com"/
/div
meta ite>mpr<op="orderNumber" content="123>-45<67890-1234567"/
meta itemprop=&>quo<t;priceCurrency" content="USD"/
meta itemprop="pric>e&quo<t; content="29.99"/
div itemprop="acceptedOffer" it>emscope< itemtype="http://schema.org/Offer"
> div <item>prop=<"itemOffered" itemscope item>type=<"http://schema.org/Product"
>meta <itemprop="name" content="Google Chromecast"/
/div
meta itemp>rop=&qu<ot;price" content="29.99>"<;/
> <meta> <item>pr
op="priceCurrency" content="USD"/
div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue"
meta itemprop="value" content="1"/
/div
/div
/div
查看訂單動作
您可以設定 url
屬性,在訂單中加入「View Order
」按鈕。如要直接連結至行動應用程式,請一併加入 ViewAction
:
JSON-LD
<script type="application/ld+>json"
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"orderStatus": "http://schema.org/OrderProcessing",
"priceCurrency": "USD",
"price": "29.99",
"priceSpecification": {
"@type": "PriceSpecification",
"validFrom": "2027-12-07T23:30:00-08:00"
},
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast",
"sku": "B00DR0PDNE",
"url": "http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/",
"image": "http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"
},
< ">pr
ice": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567",
"potentialAction": {
"@type": "ViewAction",
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
}
}
/script
微資料
<div itemscope itemtype="http://schema.org/O>rde<r"
div itemprop="merchant" itemscope itemtype="http:/>/sche<ma.org/Organization"
meta itempro>p=&<quot>;na<me" content="Amazon.com"/
/div
link itemprop=">;or<derStatus" href="http://schema.org/OrderProcessi>ng&<quot;/
meta itemprop="orderNumber&quo>t; <content="123-4567890-1234567">;/
< meta itemprop="priceCurrency" content="USD"/
meta> item<prop="price" content="29.99"/
div itemprop="ac>ceptedO<ffer" itemscope itemtype="http://schema>.org/Of<fer"
div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product&quo>t;
< meta itemprop="name" content="Google Chromecast"/
link itemprop=&>quot;ur<l" href="http://www.amazon.com/>Googl<e-Ch>romec<ast-Streaming-Media-Player/dp/B00DR0PD>NE/&q<uot;/
link itemprop="image" >href=<"http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"/
meta >itempro<p="sku" content="B0>0DR0P<DNE&>quo<t;/
> < /div
meta itemprop="price" content="29.99"/
meta itemprop="priceCurr>enc<y" content="USD"/
div itemprop="eligibleQuantity" i>temsc<ope itemtype="http://schema.org/QuantitativeValue"
meta itemprop="value" con>ten<t=&q>uot<;1"/
/div
/div
link itemprop="url" href="https://www.amazon.ca/>gp/cs<s/summary/edit.html/orderID=123-4567890-1234567"/
div i>tem<prop>=<&quo>t;
potentialAction" itemscope itemtype="http://schema.org/ViewAction"
link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/
/div
div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification"
meta itemprop="validFrom" content="2027-12-07T23:30:00-08:00"/
/div
/div
包含帳單明細的訂單
含詳細帳單資訊的訂單範例
JSON-LD
<script type="application/ld+>json"
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "539.00",
"priceSpecification": {
"@type": "PriceSpecification",
"validFrom": "2027-12-07T23:30:00-08:00"
},
"acceptedOffer": [
{
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Samsung Chromebook",
"sku": "B009LL9VDG",
"url": "http://www.amazon.com/Samsung-XE303C12-A01US-Chromebook-Wi-Fi-11-6-Inch/dp/B009LL9VDG/",
"image": "http://ecx.images-amazon.com/images/I/81H-DO3qX0L._SX522_.jpg"
},
"price": "249.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "2"
},
"seller": {
"@type": "Organization",
"name": "Samsung Marketplace Store"
}
},
{
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Google Chromecast",
"sku": "B00DR0PDNE",
"url": "http://www.amazon.com/Google-Chromecast-Streaming-Media-Player/dp/B00DR0PDNE/",
"image": "http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
},
"seller": {
"@type": "Organization",
"name": "Google Store @ Amazon"
}
}
],
"url": "https://www.amazon.ca/gp/css/summary/edit.html/or<derID=1>23
-4567890-1234567",
"potentialAction": {
"@type": "ViewAction",
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
},
"orderStatus": "http://schema.org/OrderProcessing",
"paymentMethod": {
"@type": "PaymentMethod",
"name": "http://schema.org/CreditCard"
},
"paymentMethodId": "**** **** **** 1234",
"orderDate": "2027-11-07T23:30:00-08:00",
"isGift": "false",
"discount": "0.97",
"discountCurrency": "USD",
"customer": {
"@type": "Person",
"name": "John Smith"
},
"billingAddress": {
"@type": "PostalAddress",
"name": "Google",
"streetAddress": "1600 Amphitheatre Pkwy",
"addressLocality": "Mountain View",
"addressRegion": "CA",
"addressCountry": "USA"
}
}
/script
微資料
<div itemscope itemtype="http://schema.org/O>rde<r"
div itemprop="merchant" itemscope itemtype="http:/>/sche<ma.org/Organization"
meta itempro>p=&<quot>;na<me" content="Amazon.com"/
/div
meta ite>mpr<op="orderNumber" content="123>-45<67890-1234567"/
meta itemprop=&q>uot<;priceCurrency" content="USD"/
meta itemprop="price>"<; content="539.00"/
div itemprop="acceptedOffer" it>emscope< itemtype="http://schema.org/Offer"
>div ite<mprop="itemOffered" itemscope i>temtype<="http://schema.org/Product"
meta itemprop="name" content="Samsung Chromebook">/
< meta itemprop="sku" content="B009LL9VDG"/
link itemprop="ur>l&quo<t; h>ref=&<quot;http://www.amazon.com/Samsung-XE30>3C12-<A01US-Chromebook-Wi-Fi-11-6-Inch/dp/B009LL9V>DG/&q<uot;/
link itemprop="image" href="http://ecx.images-amazon.com/imag>es/I/81<H-DO3qX0L._SX522_.jpg"/
/>div
< m>eta i<temprop="price" content="249.99"/
meta itemprop=&>quot;pr<iceCurrency" content="USD"/
div itempr>op=&q<uot;>eli<gibl>eQu<antity" itemscope itemtype="http://schema.org/QuantitativeValue>"<;
meta itemprop="value" content="2"/
/div
> div <itemprop="seller" itemscope itemtype=&q>uot;htt<p://schema.org/Organization"
m>eta ite<mprop="name" content="Samsung Marketplace Store"/
/div
/div
div itemprop=&quo>t;accep<tedOffer" itemscope itemtype="http://schema.org/Offer"
div itemprop=">itemO<ffer>ed&qu<ot; itemscope itemtype="http://sc>hema.<org/Product"
meta itemprop=">name&<quot; content="Google Chromecast"/
meta itemprop="sku" content>="<B00DR0PDNE"/
link itemp>rop=&<quot>;url&<quot; href="http://www.amazon.com/Google-Chromecast-Streaming-Media->Player/<dp/B00DR0PDNE/"/
link itemprop="image>"<; hr>ef=<&quo>t;h<ttp://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"/
/div
meta itemprop=">;pr<ice" content="29.99"/
meta itemprop="priceCurrency"> cont<ent="USD"/
div itemprop="eligibleQuantity" itemscope itemtype="http://sch>ema<.org>/Qu<antitativeValue"
meta itemprop="value" content=&>quo<t;1"/
/div
div itemprop="seller" itemscope itemtype=">http:<//schema.org/Organization"
meta itemprop="na>me&<quot>; c<ontent="Google Store @ Amazon"/
/div
/div
li>nk <itemprop="url" href="https://www.amazon.ca/gp/c>ss/<summary/edit.html/orderID=123-4567890-1>234<567"/
div itemprop="potentia>lAc<tion" itemscope itemtype="http://sche>ma.<org/ViewAction"
link itemprop="url" href="htt>ps://<www.amazon.ca/gp/css/summary/edit.html/ord>erI<D=12>3-4<567890-1234567"/
/div
link itemprop="orderStatus" href="ht>tp://<schema.org/OrderProcessing"/
di>v ite<mprop="paymentMethod" itemscope itemtype="http:/>/sche<ma.org/PaymentMethod"
meta itemprop="name&>quot;< content="http://schema.org/CreditCard>"<;/
/div
meta itemprop="paymentMethod>Id&<quot>; c<ontent="**** **** **** 1234"/
meta itemprop="orderDate" content=">;2027<-11-07T23:30:00-08:00"/
meta itemprop="isGift">; c<onte>n<t=&q>uo
t;false"/
meta itemprop="discount" content="0.97"/
meta itemprop="discountCurrency" content="USD"/
div itemprop="customer" itemscope itemtype="http://schema.org/Person"
meta itemprop="name" content="John Smith"/
/div
div itemprop="billingAddress" itemscope itemtype="http://schema.org/PostalAddress"
meta itemprop="name" content="Google"/
meta itemprop="streetAddress" content="1600 Amphitheatre Pkwy"/
meta itemprop="addressLocality" content="Mountain View"/
meta itemprop="addressRegion" content="CA"/
meta itemprop="addressCountry" content="USA"/
/div
div itemprop="priceSpecification" itemscope itemtype="http://schema.org/PriceSpecification"
meta itemprop="validFrom" content="2027-12-07T23:30:00-08:00"/
/div
/div
測試標記
您可以使用電子郵件標記測試工具驗證標記。貼上標記程式碼,然後按一下「驗證」按鈕以掃描內容,並接收報告中列出的所有錯誤。
規格
下表列出此類型的所有可用屬性:
屬性 | 類型 | 說明 |
---|---|---|
商家 | 機構或 Person | (必填) 接受訂單的一方 (例如 Amazon.com 是許多賣家的商家)。也接受字串 (例如「Amazon.com」)。 |
merchant.name | 文字 | (必要) 機構名稱。 |
merchant.sameAs | 網址 | 商家的 Freebase 網址。 |
orderNumber | 文字 | (必填) 交易的商家專屬 ID。 |
priceCurrency | 文字 | (必要) 訂單價格的幣別 (3 個字母組成的 ISO 4217 格式), |
價格 | 數字或文字 | (必要) 整筆交易的總價。 |
acceptedOffer | 優惠 | (必填) 訂單中的優惠。也接受 物件陣列。 |
acceptedOffer.itemOffered | 產品或預訂 | (必填) 販售的商品。 |
acceptedOffer.itemOffered.name | 文字 | (必要) 產品名稱。 |
acceptedOffer.itemOffered.sku | 文字 | (適用於確認資訊卡/搜尋答案) 庫存單位 (SKU),也就是產品或服務的商家專屬 ID,或是優惠所參照的產品。 |
acceptedOffer.itemOffered.url | 網址 | 產品網址 (適用於確認資訊卡/搜尋答案) 的網址,通常是商家網站上的產品到達網頁。 |
acceptedOffer.itemOffered.image | 網址 | (適用於確認資訊卡/搜尋答案) 產品圖片的網址,通常是商家網站的圖片。 |
acceptedOffer.itemOffered.color | 文字 | 產品的顏色。 |
acceptedOffer.price | 數字或文字 | (必填) 產品的單價。 |
acceptedOffer.priceCurrency | 文字 | (必要) 價格的幣別 (3 個字母組成的 ISO 4217 格式), |
acceptedOffer.eligibleQuantity | QuantitativeValue | (必要) 優惠或價格規格有效訂購數量的間隔和測量單位。 |
acceptedOffer.eligibleQuantity.value | 數字 | (必要) 產品特性的值。 |
acceptedOffer.priceSpecification | PriceSpecification | 一或多個詳細的價格規格,用於表示單價、運送或付款費用。 |
acceptedOffer.priceSpecification.price | 數字或文字 | 整筆交易的總價。 |
acceptedOffer.priceSpecification.priceCurrency | 文字 | 訂單價格的幣別 (使用 3 個英文字母組成的 ISO 4217 格式), |
acceptedOffer.itemCondition | OfferItemCondition | 產品/服務狀況的文字說明,或是優惠所含的產品或服務。 |
acceptedOffer.seller | 機構或 Person | 下單對象。也接受字串 (例如「」)。 |
acceptedOffer.seller.name | 文字 | 機構名稱。 |
priceSpecification | PriceSpecification | (建議用於確認資訊卡/搜尋答案) 其他價格/priceCurrency 的其他詳細替代方案。也會用來指定稅金和運費。也接受 物件陣列。 |
網址 | 網址 | (適用於確認資訊卡/搜尋答案) 訂單網址,通常是商家網站連結,可供使用者擷取訂單詳細資料。 |
orderStatus | OrderStatus | (適用於確認資訊卡/搜尋答案) 訂單目前的狀態。 |
paymentMethod | PaymentMethod | 訂單的信用卡名稱或其他付款方式。 |
paymentMethodId | 文字 | 所用付款方式的 ID (例如信用卡末 4 碼)。 |
orderDate | DateTime | 下單日期。 |
isGift | 布林值 | 對方是否接受報價為買家以外的禮物。 |
discount | 數字或文字 | 已套用任何折扣。 |
discountCurrency | 文字 | 折扣的貨幣 (以 3 個英文字母表示,以 ISO 4217 格式表示)。 |
客戶 | Person 或 Organization | 訂購一方。 |
customer.name | 文字 | 人名。 |
billingAddress | PostalAddress | 訂單的帳單地址。 |
billingAddress.name | 文字 | PostalAddress 的名稱。 |
billingAddress.streetAddress | 文字 | 街道地址。例如「臺北市信義區信義路 5 段 7 號」。 |
billingAddress.addressLocality | 文字 | 縣市。例如山景城。 |
billingAddress.addressRegion | 文字 | 地區。例如 CA。 |
billingAddress.addressCountry | 文字或國家/地區 | 國家/地區。例如 USA。您也可以提供 ISO 3166-1 alpha-2 國家/地區代碼。 |