I need the SKU data in the Order/Payment Webhook JSON data (it is broken)

gr1nch
New Member
3 0 0

Hi,

Am new to Shopify but I've set up Webhooks which send JSON and I can receive it.  We need to know when certain products are ordered and purchased.

The trouble is SKU data, in fact all line_items data is broken.

Here is an example snippet

fulfillment_status=pending, app_id=null, line_items=[Ljava.lang.Object;@1fbfb8c5, discount_codes=[Ljava.lang.Object;@5159836b, cancelled_at=2020-06-28T23:48:46+01:00, referring_site=null

There is zero product data in the entire JSON payload and it is frustrating to find that the documentation states clearly what is meant to be sent but Shopify either has broken something or that there is an undocumented intended change that they need to let customers know about.

https://shopify.dev/docs/admin-api/rest/reference/events/webhook?api[version]=2020-04

Any advice or help?

0 Likes
gr1nch
New Member
3 0 0

It is a bug - how to report it?

I tested with all API versions and this output of JSON data values of the type  "Ljava.lang.Object;@76690f0b" are occuring instead of the line_items data

0 Likes
gr1nch
New Member
3 0 0

Starting to answer my own question ;)  It could be a problem with Google spreadsheets in how it interprets the JSON data. Looking into it...

0 Likes
achieveapplabs
Shopify Partner
472 36 74

Similar problem with someone using AWS Lambda to parse the webhook request. Check the way that raw data is parsed.

Install Approovly to create and track order approvals | We want to hear from you hello@achieveapplabs.com | Follow us on Twitter @achieveapplabs | Custom Shopify Apps achieveapplabs.com
0 Likes