order/updated webhook payload does not have the updated shipping_address

Highlighted
New Member
12 0 0

There is a shop that has "Shipping Address Verification" app installed. I have registered to order/updated event and listen to order changes on this shop.

When the shipping address of an order is corrected by "Shipping Address Verification" app (e.g. address2 changes from null to "Apt 104"), the order/updated webhook payload does not have this change in the shipping_address, while the actual order on Shopify shows this change on the web UI of the Shop.

This is important because we are a shipping company and when the address changes are not reflected on our backend, goods are mailed to the wrong address!

Could this be a bug in Shopify backend? Can someone from Shopify please help us with this?

Thank you so much.

 

0 Likes
Highlighted
New Member
12 0 0

Bump

0 Likes
Highlighted
Shopify Staff
Shopify Staff
181 22 29

Hey @wynd 

I just tested this and I saw the updated address 2 line in the order update webhook. Can you post the request/response of the address update API request, and then also the body of the webhook that you receive? Additionally, it may be helpful if you can send me the request_id from the API response headers so I can see it in our logs. 

Kevin_A | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
12 0 0

Can you post the request/response of the address update API request, and then also the body of the webhook that you receive?

The address update is made by a shopify app that I do not have access to. ("Shipping Address Verification" app)

Our app, wynd, has registered for orders/updated events on the shop and we expect to get the changes made to the order (and the order address) in the payload of the webhook.


Additionally, it may be helpful if you can send me the request_id from the API response headers so I can see it in our logs.

I was not sure which request_id you were referring to so I am including the headers of the webhook payload:

--request POST 'https://xxxwynd-domainxxx/shopify/orders/update' \
--header 'X-Shopify-Test:false' \
--header 'X-Request-Id:54a1659c-e2ef-48fc-bcc6-81fa1421241d' \
--header 'Content-Length:6492' \
--header 'Version:HTTP/1.1' \
--header 'X-Shopify-Api-Version:2020-04' \
--header 'X-Shopify-Topic:orders/updated' \
--header 'User-Agent:Shopify-Captain-Hook' \
--header 'X-Request-Start:1597200352378' \
--header 'Host:xxxwynd-domainxxx' \
--header 'X-Shopify-Order-Id:2637058834592' \
--header 'Accept-Encoding:gzip;q=1.0,deflate;q=0.6,identity;q=0.3' \
--header 'X-Forwarded-Port:443' \
--header 'Total-Route-Time:0' \
--header 'Connection:close' \
--header 'X-Shopify-Hmac-Sha256:onmh/JydQPENnbIcVijNHYKQsIpfEVtiWu/YoOcEjzQ=' \
--header 'X-Shopify-Shop-Domain:xxxsomeshopxxx.myshopify.com' \
--header 'Via:1.1 vegur' \
--header 'X-Forwarded-For:xxx.xxx.xxx.xxx' \
--header 'Accept:*/*' \
--header 'X-Forwarded-Proto:https' \
--header 'Connect-Time:1' \
--header 'Content-Type:application/json' \
--data '{contains customer data that I cannot share on the forum}'

The shipping_address of the webhook payload (anonymized):

"shipping_address": {
"first_name": "xxx",
"address1": "xxx xxxxx Lane",
"phone": "(xxx) xxx-xxxx",
"city": "State College",
"zip": "168xx",
"province": "Pennsylvania",
"country": "United States",
"last_name": "xxx",
"address2": "", <=== EMPTY AFTER UPDATE!
"company": "",
"latitude": xxx,
"longitude": xxx,
"name": "xxx xxx",
"country_code": "US",
"province_code": "PA"
},

The changes to order reflected on the shop's dashboard:

Screen Shot 2020-08-13 at 15.21.09 .png

Please let me know if there is any other information I can provide to help resolve the issue.

Thanks a lot for taking the time to look into this.

0 Likes
Highlighted
New Member
12 0 0

Hi Kevin, thanks for looking into this. I responded with all the details but the forum's spam detection tool thought it's spam and didn't allow my reply be posted.

 

I also reached out to the forum admins, twice, but I didn't hear back or see my reply being posted here.

 

Do you have the means to remove the spam flag so my previous post can appear on the forum?

0 Likes
Highlighted
New Member
12 0 0

@Kevin_AIt seems a forum admin allowed the post I mentioned earlier.

Can you please take a look? Thanks.

0 Likes
Highlighted
New Member
12 0 0

Bump

0 Likes
Highlighted
Shopify Staff
Shopify Staff
181 22 29

Hey @wynd 

Do you have a more recent order example of this happening? Unfortunately the order information you posted above is outside our logging window. 

Kevin_A | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
12 0 0

@Kevin_AHere is a more recent example of an order with this issue:

Headers of the webhook payload:

--request POST 'https://xxxwynd-domainxxx/shopify/orders/update' \
--header 'X-Shopify-Test:false' \
--header 'X-Request-Id:e28bdb1d-76cb-4c9f-b7a2-efbbf6b122af' \
--header 'Content-Length:6236' \
--header 'Version:HTTP/1.1' \
--header 'X-Shopify-Api-Version:2020-04' \
--header 'X-Shopify-Topic:orders/updated' \
--header 'User-Agent:Shopify-Captain-Hook' \
--header 'X-Request-Start:1600475815389' \
--header 'Host:xxxwynd-domainxxx' \
--header 'X-Shopify-Order-Id:2735525789856' \
--header 'Accept-Encoding:gzip;q=1.0,deflate;q=0.6,identity;q=0.3' \
--header 'X-Forwarded-Port:443' \
--header 'Total-Route-Time:0' \
--header 'Connection:close' \
--header 'X-Shopify-Hmac-Sha256:pTqOIcbLx0B+ofI1XvSAtfAsRqN63KsLTu9czSxYpbQ=' \
--header 'X-Shopify-Shop-Domain:XXXX-shop.myshopify.com' \
--header 'Via:1.1 vegur' \
--header 'X-Forwarded-For:xxx.xxx.xxx.xxx' \
--header 'Accept:*/*' \
--header 'X-Forwarded-Proto:https' \
--header 'Connect-Time:1' \
--header 'Content-Type:application/json' \
--data '{contains customer data that I cannot share on the forum}'


The shipping_address of the webhook payload (anonymized):

"shipping_address": {
"first_name": "xxx",
"address1": "xxx Wailea Alanui Dr",
"phone": "+1 xxx-xxx-xxxx",
"city": "Wailea", <============ This did NOT change to "Kihei" (see below screenshot)
"zip": "967xx",
"province": "Hawaii",
"country": "United States",
"last_name": "xxx",
"address2": "Wailea",  <======== This was NOT removed (see below screenshot)
"company": "",
"latitude": xxx,
"longitude": xxx,
"name": "xxxx xxxx",
"country_code": "US",
"province_code": "HI"
}


The changes to order reflected on the shop's dashboard:

Screen Shot 2020-09-21 at 12.27.04 .png

0 Likes
Highlighted
New Member
12 0 0

@Kevin_A Here is another example of this issue. This one has two incoming webhook requests for update:

Headers of webhook request 1:

--request POST 'https://xxxwynd-domainxxx/shopify/orders/update' \
--header 'X-Shopify-Test:false' \
--header 'X-Request-Id:25b37fed-8248-4563-948b-40a455666b0c' \
--header 'Content-Length:6345' \
--header 'Version:HTTP/1.1' \
--header 'X-Shopify-Api-Version:2020-04' \
--header 'X-Shopify-Topic:orders/updated' \
--header 'User-Agent:Shopify-Captain-Hook' \
--header 'X-Request-Start:1600837805310' \
--header 'Host:xxxwynd-domainxxx' \
--header 'X-Shopify-Order-Id:2748099166368' \
--header 'Accept-Encoding:gzip;q=1.0,deflate;q=0.6,identity;q=0.3' \
--header 'X-Forwarded-Port:443' \
--header 'Total-Route-Time:0' \
--header 'Connection:close' \
--header 'X-Shopify-Hmac-Sha256:OPNglAua7mYjoLWLbfDdN8E0rpV1aYQoEZ/ONiqpL/A=' \
--header 'X-Shopify-Shop-Domain:some-shop.myshopify.com' \
--header 'Via:1.1 vegur' \
--header 'X-Forwarded-For:xxx.xxx.xxx.xxx' \
--header 'Accept:*/*' \
--header 'X-Forwarded-Proto:https' \
--header 'Connect-Time:1' \
--header 'Content-Type:application/json' \
--data '... removed for privacy ...}'

and the shipping_address part of the webhook payload for request 1:

"shipping_address": {
    "first_name": "xxx",
    "address1": "xxx xxx Ave", <===== Did not change
    "phone": "xxxxxxxxxx",
    "city": "Venice",
    "zip": "91xxx", <===== Did not change
    "province": "California",
    "country": "United States",
    "last_name": "xxx",
    "address2": "Unit xxx", <===== Was not removed
    "company": "",
    "latitude": null,
    "longitude": null,
    "name": "xxx xxx",
    "country_code": "US",
    "province_code": "CA"
}

Headers of webhook request 2:

--request POST 'https://xxxwynd-domainxxx/shopify/orders/update' \
--header 'X-Shopify-Test:false' \
--header 'X-Request-Id:a09fa366-446e-4c4e-b8ee-38d807e7d176' \
--header 'Content-Length:6359' \
--header 'Version:HTTP/1.1' \
--header 'X-Shopify-Api-Version:2020-04' \
--header 'X-Shopify-Topic:orders/updated' \
--header 'User-Agent:Shopify-Captain-Hook' \
--header 'X-Request-Start:1600837816183' \
--header 'Host:xxxwynd-domainxxx' \
--header 'X-Shopify-Order-Id:2748099166368' \
--header 'Accept-Encoding:gzip;q=1.0,deflate;q=0.6,identity;q=0.3' \
--header 'X-Forwarded-Port:443' \
--header 'Total-Route-Time:0' \
--header 'Connection:close' \
--header 'X-Shopify-Hmac-Sha256:CN36/sCyDQI9smjkwzh+5dSMp+5QcM6oU45CF/OX+PU=' \
--header 'X-Shopify-Shop-Domain:some-shop.myshopify.com' \
--header 'Via:1.1 vegur' \
--header 'X-Forwarded-For:xxx.xxx.xxx.xxx' \
--header 'Accept:*/*' \
--header 'X-Forwarded-Proto:https' \
--header 'Connect-Time:1' \
--header 'Content-Type:application/json' \
--data '{... removed ...}'

and the shipping_address part of the webhook payload for request 2:

"shipping_address": {
    "first_name": "xxx",
    "address1": "xxx xxx Ave", <== Did not change
    "phone": "xxxxxxxxxx",
    "city": "Venice",
    "zip": "91xxx", <== Did not change
    "province": "California",
    "country": "United States",
    "last_name": "xxx",
    "address2": "Unit xxx", <=== Was not removed
    "company": "",
    "latitude": null,
    "longitude": null,
    "name": "xxx xxx",
    "country_code": "US",
    "province_code": "CA"
}

 

Shopify dashboard screenshot:

Screen Shot 2020-09-24 at 13.00.34 .png

 

 

0 Likes