Hi all!
I’m trying to store some shopify order data but I have a challenge, I don’t know how to save an item order per line.
Basically I need to save any product data inside the line_items array, one per line with the order ID.
I’ve tried the Schedule API Workflow on a list but it simple doesn’t work, I receive the order via webhook, saves the order data but not the product list.
If you have any help, I appreciate!
Thanks
{
"id": 3456776543,
"admin_graphql_api_id": "gid://shopify/Order/23456789876543",
"app_id": null,
"browser_ip": null,
"buyer_accepts_marketing": true,
"cancel_reason": "customer",
"cancelled_at": "2024-02-16T09:46:53+00:00",
"cart_token": null,
"checkout_id": null,
"checkout_token": null,
"client_details": null,
"closed_at": null,
"confirmation_number": null,
"confirmed": false,
"contact_email": "jon@example.com",
"created_at": "2024-02-16T09:46:53+00:00",
"currency": "EUR",
"current_subtotal_price": "31.00",
"current_subtotal_price_set": {
"shop_money": {
"amount": "31.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "31.00",
"currency_code": "EUR"
}
},
"current_total_additional_fees_set": null,
"current_total_discounts": "0.00",
"current_total_discounts_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "EUR"
}
},
"current_total_duties_set": null,
"current_total_price": "31.00",
"current_total_price_set": {
"shop_money": {
"amount": "31.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "31.00",
"currency_code": "EUR"
}
},
"current_total_tax": "0.00",
"current_total_tax_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "EUR"
}
},
"customer_locale": "pt-PT",
"device_id": null,
"discount_codes": [],
"email": "jon@example.com",
"estimated_taxes": false,
"financial_status": "voided",
"fulfillment_status": "pending",
"landing_site": null,
"landing_site_ref": null,
"location_id": null,
"merchant_of_record_app_id": null,
"name": "#9999",
"note": null,
"note_attributes": [],
"number": 234,
"order_number": 1234,
"order_status_url": "https://xxxxxx.com/31849316490/orders/123456abcd/authenticate?key=abcdefg",
"original_total_additional_fees_set": null,
"original_total_duties_set": null,
"payment_gateway_names": [
"visa",
"bogus"
],
"phone": null,
"po_number": null,
"presentment_currency": "EUR",
"processed_at": null,
"reference": null,
"referring_site": null,
"source_identifier": null,
"source_name": "web",
"source_url": null,
"subtotal_price": "21.00",
"subtotal_price_set": {
"shop_money": {
"amount": "21.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "21.00",
"currency_code": "EUR"
}
},
"tags": "tag1, tag2",
"tax_exempt": false,
"tax_lines": [],
"taxes_included": false,
"test": true,
"token": "123456abcd",
"total_discounts": "20.00",
"total_discounts_set": {
"shop_money": {
"amount": "20.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "20.00",
"currency_code": "EUR"
}
},
"total_line_items_price": "31.00",
"total_line_items_price_set": {
"shop_money": {
"amount": "31.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "31.00",
"currency_code": "EUR"
}
},
"total_outstanding": "31.00",
"total_price": "21.00",
"total_price_set": {
"shop_money": {
"amount": "21.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "21.00",
"currency_code": "EUR"
}
},
"total_shipping_price_set": {
"shop_money": {
"amount": "10.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "10.00",
"currency_code": "EUR"
}
},
"total_tax": "0.00",
"total_tax_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "EUR"
}
},
"total_tip_received": "0.00",
"total_weight": 0,
"updated_at": "2024-02-16T09:46:53+00:00",
"user_id": null,
"billing_address": {
"first_name": "Steve",
"address1": "123 Shipping Street",
"phone": "555-555-SHIP",
"city": "Shippington",
"zip": "40003",
"province": "Kentucky",
"country": "United States",
"last_name": "Shipper",
"address2": null,
"company": "Shipping Company",
"latitude": null,
"longitude": null,
"name": "Steve Shipper",
"country_code": "US",
"province_code": "KY"
},
"customer": {
"id": 115310627314723950,
"email": "john@example.com",
"created_at": null,
"updated_at": null,
"first_name": "John",
"last_name": "Smith",
"state": "disabled",
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"phone": null,
"email_marketing_consent": {
"state": "not_subscribed",
"opt_in_level": null,
"consent_updated_at": null
},
"sms_marketing_consent": null,
"tags": "",
"currency": "EUR",
"tax_exemptions": [],
"admin_graphql_api_id": "gid://shopify/Customer/1153106333327314723954",
"default_address": {
"id": 715243470612851200,
"customer_id": 115310627314723950,
"first_name": null,
"last_name": null,
"company": null,
"address1": "123 Elm St.",
"address2": null,
"city": "Ottawa",
"province": "Ontario",
"country": "Canada",
"zip": "K2H7A8",
"phone": "123-123-1234",
"name": "",
"province_code": "ON",
"country_code": "CA",
"country_name": "Canada",
"default": true
}
},
"discount_applications": [],
"fulfillments": [],
"line_items": [
{
"id": 866550311766439000,
"admin_graphql_api_id": "gid://shopify/LineItem/86655031176643903320",
"attributed_staffs": [
{
"id": "gid://shopify/StaffMember/90254331635",
"quantity": 1
}
],
"current_quantity": 1,
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 2000,
"name": "Jogo de Banho Coroa",
"price": "22.50",
"price_set": {
"shop_money": {
"amount": "22.50",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "22.50",
"currency_code": "EUR"
}
},
"product_exists": true,
"product_id": 4523821203594,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "MAE",
"taxable": true,
"title": "Jogo de Banho Coroa",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "EUR"
}
},
"variant_id": 43088537649382,
"variant_inventory_management": "shopify",
"variant_title": null,
"vendor": null,
"tax_lines": [],
"duties": [],
"discount_allocations": []
},
{
"id": 141249953214522980,
"admin_graphql_api_id": "gid://shopify/LineItem/23332456543",
"attributed_staffs": [],
"current_quantity": 1,
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 1000,
"name": "Lençol de Banho 450gr",
"price": "8.50",
"price_set": {
"shop_money": {
"amount": "8.50",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "8.50",
"currency_code": "EUR"
}
},
"product_exists": true,
"product_id": 4523823333514,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "",
"taxable": true,
"title": "Lençol de Banho 450gr",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "EUR"
}
},
"variant_id": 32060350595210,
"variant_inventory_management": "shopify",
"variant_title": null,
"vendor": null,
"tax_lines": [],
"duties": [],
"discount_allocations": []
}
],**strong text**
"payment_terms": null,
"refunds": [],
"shipping_address": {
"first_name": "Steve",
"address1": "123 Shipping Street",
"phone": "555-555-SHIP",
"city": "Shippington",
"zip": "40003",
"province": "Kentucky",
"country": "United States",
"last_name": "Shipper",
"address2": null,
"company": "Shipping Company",
"latitude": null,
"longitude": null,
"name": "Steve Shipper",
"country_code": "US",
"province_code": "KY"
},
"shipping_lines": [
{
"id": 271878346596884000,
"carrier_identifier": null,
"code": null,
"discounted_price": "10.00",
"discounted_price_set": {
"shop_money": {
"amount": "10.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "10.00",
"currency_code": "EUR"
}
},
"phone": null,
"price": "10.00",
"price_set": {
"shop_money": {
"amount": "10.00",
"currency_code": "EUR"
},
"presentment_money": {
"amount": "10.00",
"currency_code": "EUR"
}
},
"requested_fulfillment_service_id": null,
"source": "shopify",
"title": "Generic Shipping",
"tax_lines": [],
"discount_allocations": []
}
]
}