Orders Missing totalWeight

Solved
kobi_beprofit
Shopify Partner
11 0 1

Hi all,

According to the GraphQL documentation, totalWeight is the weight of an order without adjustments for returns/removals, while currentTotalWeight is the weight with adjustments.

We've recently noticed many of our users' orders have totalWeight=0 and currentTotalWeight>0, which doesn't make sense according to the logic above.

Is there any specific reason for an order to lack this field? We're under the impression that all orders that have a currentTotalWeight should also have a totalWeight.

Any assistance would be greatly appreciated.

Thanks!

Kobi

0 Likes
awwdam
Shopify Staff
Shopify Staff
96 10 5

Hey @kobi_beprofit,

I would be happy to take a closer look and pass on any insights I can. Would you be able to provide us with an example x-request-id header that was returned from a recent request where these unexpected values are returning on fields you mentioned?  - cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
kobi_beprofit
Shopify Partner
11 0 1

Hi, thanks for the quick response.

Here's an example x-request-id: a34537b9-13d8-451b-864a-deff9409031e

Please let me know if you have any insights on the issue.

Cheers,

Kobi

0 Likes
awwdam
Shopify Staff
Shopify Staff
96 10 5

This is an accepted solution.

Hey @kobi_beprofit,

We took a closer look with the request-ID, and there doesn't appear to be an issue with the functionality of our API or how the data is being returned. To confirm, you are correct that the values mentioned totalWeight and currentTotalWeight can only be calculated and set by Shopify when an order is processed through the checkout.

In the event that orders have been created via API, these values would have to be manually defined by an app or service in the request. The API endpoint does not validate the passed values to ensure that they meet for example - weight criteria ie."total weight must be greater or equal to current weight",  but instead validates for syntax. When an order is imported, these values would need to be set by the app that is importing them, and for this reason we would suggest contacting a merchant to confirm the origin of orders.

While we are unable to support authenticated app or store related issues from these forums at this time, we can still provide suggestions. I would first directly check an order (json) to determine if the values are expected. If the order was created through our checkout and has those values, have your client contact our support line directly so that we can gather authorization for a more thorough investigation. If the orders are API-created, you may need to work with your client directly to ensure correctly calculated values are being passed.

- Best!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

kobi_beprofit
Shopify Partner
11 0 1

Hi @awwdam 

We've checked with one of our users and indeed the problematic orders were imported from a 3rd party app.

Thanks for you help in understanding this issue.