Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hey all,
We subscribed Shopify order webhook to monitor order events. However, I found something weird today. In our log we found that we received an order/create event message, of which the payload is like :
{
"id": 5294549041379,
"line_items":
[
{
"id": 13160605581539,
"line_items":
[
{
"id": 13160605581539,
"admin_graphql_api_id": "gid://shopify/LineItem/13160605581539",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 0,
"name": "Green Shipping Protection - $0.98 / Green Shipping Protection protects your order against loss, damage, and delay.",
"price": "0.98",
"price_set":
{
"shop_money":
{
"amount": "0.98",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.98",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 8093809246435,
"properties":
[],
"quantity": 1,
"requires_shipping": false,
"sku": "SEEL-BP17",
"taxable": true,
"title": "Green Shipping Protection",
"total_discount": "0.00",
"total_discount_set":
{
"shop_money":
{
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 43867702427875,
"variant_inventory_management": null,
"variant_title": "$0.98 / Green Shipping Protection protects your order against loss, damage, and delay.",
"vendor": "Seel",
"tax_lines":
[],
"duties":
[],
"discount_allocations":
[]
},
{
"id": 13160605614307,
"admin_graphql_api_id": "gid://shopify/LineItem/13160605614307",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 0,
"name": "Plush Squeaky Snuffle Dog Toy - Bakery - Chocochip",
"price": "16.99",
"price_set":
{
"shop_money":
{
"amount": "16.99",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "16.99",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 7816538980579,
"properties":
[],
"quantity": 1,
"requires_shipping": true,
"sku": "FFTY02601BY00",
"taxable": true,
"title": "Plush Squeaky Snuffle Dog Toy - Bakery",
"total_discount": "0.00",
"total_discount_set":
{
"shop_money":
{
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 43216481714403,
"variant_inventory_management": "shopify",
"variant_title": "Chocochip",
"vendor": "FunnyFuzzy",
"tax_lines":
[],
"duties":
[],
"discount_allocations":
[]
}
]}
Of which we can recognize that there are two line items .
And after like 10 second we received another order/update event message, of which the payload is :
{
"id": 5294549041379,
"line_items":
[
{
"id": 13160605581539,
"admin_graphql_api_id": "gid://shopify/LineItem/13160605581539",
"fulfillable_quantity": 0,
"fulfillment_service": "manual",
"fulfillment_status": "fulfilled",
"gift_card": false,
"grams": 0,
"name": "Green Shipping Protection - $0.98 / Green Shipping Protection protects your order against loss, damage, and delay.",
"price": "0.98",
"price_set":
{
"shop_money":
{
"amount": "0.98",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.98",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 8093809246435,
"properties":
[],
"quantity": 1,
"requires_shipping": false,
"sku": "SEEL-BP17",
"taxable": true,
"title": "Green Shipping Protection",
"total_discount": "0.00",
"total_discount_set":
{
"shop_money":
{
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 43867702427875,
"variant_inventory_management": null,
"variant_title": "$0.98 / Green Shipping Protection protects your order against loss, damage, and delay.",
"vendor": "Seel",
"tax_lines":
[],
"duties":
[],
"discount_allocations":
[]
},
{
"id": 13160605614307,
"admin_graphql_api_id": "gid://shopify/LineItem/13160605614307",
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 0,
"name": "Plush Squeaky Snuffle Dog Toy - Bakery - Chocochip",
"price": "16.99",
"price_set":
{
"shop_money":
{
"amount": "16.99",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "16.99",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 7816538980579,
"properties":
[],
"quantity": 1,
"requires_shipping": true,
"sku": "FFTY02601BY00",
"taxable": true,
"title": "Plush Squeaky Snuffle Dog Toy - Bakery",
"total_discount": "0.00",
"total_discount_set":
{
"shop_money":
{
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "0.00",
"currency_code": "USD"
}
},
"variant_id": 43216481714403,
"variant_inventory_management": "shopify",
"variant_title": "Chocochip",
"vendor": "FunnyFuzzy",
"tax_lines":
[],
"duties":
[],
"discount_allocations":
[]
},
{
"id": 13160605974755,
"admin_graphql_api_id": "gid://shopify/LineItem/13160605974755",
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 0,
"name": "Travel Bolster Safety Medium Large Dog Car Back Seat Bed - Pro-Grey / Standard",
"price": "154.96",
"price_set":
{
"shop_money":
{
"amount": "154.96",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "154.96",
"currency_code": "USD"
}
},
"product_exists": true,
"product_id": 8030631493859,
"properties":
[],
"quantity": 1,
"requires_shipping": true,
"sku": "FFDC01401GR00",
"taxable": true,
"title": "Travel Bolster Safety Medium Large Dog Car Back Seat Bed",
"total_discount": "23.24",
"total_discount_set":
{
"shop_money":
{
"amount": "23.24",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "23.24",
"currency_code": "USD"
}
},
"variant_id": 43719373455587,
"variant_inventory_management": "shopify",
"variant_title": "Pro-Grey / Standard",
"vendor": "FunnyFuzzy",
"tax_lines":
[],
"duties":
[],
"discount_allocations":
[
{
"amount": "23.24",
"amount_set":
{
"shop_money":
{
"amount": "23.24",
"currency_code": "USD"
},
"presentment_money":
{
"amount": "23.24",
"currency_code": "USD"
}
},
"discount_application_index": 0
}
]
}
]
}
Apparently, there are three line items.
Additionally, this order is a test order created by our QA. According to our QA, this order is created with those three item. So I am wondering if Shopify made mistakes when sending order/create webhook message? Is it a known issue? If so, how often does it happens?
Thanks all!