Issues with the new carrier service API data points

Hello there!

We’re looking into implementing features related to this update, however while looking at the data we’re seeing some interesting things across many shops. Carrier Service API now includes order totals and customer tags - Shopify developer changelog

We looked at a number of real shipping rate requests, and the subtotal_price in many cases is larger than the sum of the item prices.

Which of the following reasons could be causing this? Are all possible, and how would we differentiate between them?

  • Some items might be marked as non-shippable/non-physical items, but are included in the subtotal, total, and discount
  • Some items belong to a different shipping profile and the carrier app request we’re seeing doesn’t include them, but are included in the subtotal, total, and discount
  • Some items are shipped from a different store location, and the carrier app isn’t configure to handle this location so they aren’t included in the request items, but are included in the subtotal, total, and discount

Another issue is that after logging in as a customer, the rate request still doesn’t include the customer object in some cases, just null. It seems quite inconsistent. I believe the issue with the customer logging in is that the rates do not recalculate based on the change in the login state - instead Shopify uses its internal cache. If I change a cart item’s quantity, then a new rate request is sent, and now the customer object exists. So this definitely seems like a bug - shipping must recalculate upon login/logout.

Looking forward to any clarifications you can provide!

Thank you