API v2 Shipments: inventory levels updated incorrectly

The log:

Jul 2, 2018
4:25 PM
Notified WooCommerce that shipment Shipped 1-6979 via the shipper Local pickup (local_pickup) with tracking 34523452345e.
– ### not public account email ###
4:25 PM
Notified WooCommerce that shipment Shipped 1-6979 via the shipper Local pickup (local_pickup) with tracking 34523452345e.
– ### not public account email ###
4:25 PM
Notified WooCommerce that shipment Shipped 1-6979 via the shipper Local pickup (local_pickup) with tracking 34523452345e.
– ### not public account email ###
4:25 PM
Shipment 1-6979-3 marked as dropshipped
– ### not public account email ###
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-3 has shipped.
– ### not public account email ###
4:25 PM
Marked shipment as shipped, adjusted inventory levels, and recalculated order status
– ### not public account email ###
4:25 PM
Added tracking number 34523452345e
– ### not public account email ###
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-2 has shipped.
– ### not public account email ###
4:25 PM
Marked shipment as shipped, adjusted inventory levels, and recalculated order status
– ### not public account email ###
4:25 PM
Added tracking number 34523452345e
– ### not public account email ###
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-1 has shipped.
– ### not public account email ###
4:25 PM
Marked shipment as shipped, and recalculated order status
– ### not public account email ###
4:25 PM
Added tracking number 34523452345e
– ### not public account email ###
3:35 PM
Shipment 1-6979-3 line ### not public prod sku ### (id 29689142) was modified: - quantity changed from 0 to 5
– ### not public account email ###
3:35 PM
Shipment 1-6979-2 line ### not public prod sku ### (id 29689141) was modified: - quantity changed from 0 to 10
– ### not public account email ###
3:35 PM
Shipment 1-6979-1 line ### not public prod sku ### (id 29689119) was modified: - quantity changed from 25 to 10
– ### not public account email ###
3:35 PM
Created shipment 1-6979-3
– ### not public account email ###
3:35 PM
Created shipment 1-6979-2
– ### not public account email ###
3:35 PM
Batch processing: Dropshipment request sent to Ivan Odintsov (#7) <### not public email ###>
– ### not public email ###
3:35 PM
Order line ### not public prod sku ### (id 36116416) was modified: - selected_option changed from to ### not public details ###
– ### not public account email ###
3:33 PM
Updated address with data: validate=False, validation={‘is_error’: True, ‘additional_text’: ‘City, State and ZIP Code are valid, but street address is not a match’, ‘suggested’: []}
task@ordoro.com
3:33 PM
Created shipment 1-6979-1
– ### not public account email ###
3:33 PM
Order imported
system@ordoro.com
3:31 PM
Order placed
system@ordoro.com

Issue: inventory levels updated incorrectly;
Story:

  • Add the product with qty = 30;
  • Bought 25 from a store;
  • Got the order in API;
  • Create 2 additional shipments and modify default one. Set proper qty for each (By internal logic)
  • Went to the App and see correct inventory levels; Phys On Hand = 30; Committed = 25;
  • Add tracking for each shipment;
  • Have incorrect values in inventory. Phys On Hand = 15
  • Phys On Hand should be = 5.

See the log in the middle:

  1. Added tracking number 34523452345e
  2. Marked shipment as shipped, and recalculated order status
  3. Added tracking number 34523452345e
  4. Marked shipment as shipped, adjusted inventory levels, and recalculated order status

So, it is here, why the inventory levels did not adjust for the first shipment?

I’m not sure what you mean by this:

It may be possible that the api is not calculating v3 orders with > 1 shipments properly in the API, as this is a restriction of v3, but let me know what you meant by the above statement, and we could look into it further.

See the log. This is TIMELINE from the order details page (https://app.ordoro.com/app#/order/1-6979)

So, by default, any order contains a default shipment (meant as first in my initial message)
The ID of the shipment is 1-6979-1.

Following the timeline:
3:35 PM
Created shipment 1-6979-3
3:35 PM
Created shipment 1-6979-2
2 additional shipments were created;
3:35 PM
Shipment 1-6979-3 line (id 29689142) was modified: - quantity changed from 0 to 5
3:35 PM
Shipment 1-6979-2 line (id 29689141) was modified: - quantity changed from 0 to 10
3:35 PM
Shipment 1-6979-1 line (id 29689119) was modified: - quantity changed from 25 to 10
quantity of each shipment was set to proper value
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-3 has shipped.
4:25 PM
Marked shipment as shipped, adjusted inventory levels, and recalculated order status
4:25 PM
Added tracking number 34523452345e
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-2 has shipped.
4:25 PM
Marked shipment as shipped, adjusted inventory levels, and recalculated order status
4:25 PM
Added tracking number 34523452345e
4:25 PM
Attempting to notify WooCommerce that shipment 1-6979-1 has shipped.
4:25 PM
Marked shipment as shipped, and recalculated order status
4:25 PM
Added tracking number 34523452345e
tracking info was updated for each shipment (via API v2), some data was recalculated automatically, pay attention at comments and ID of shipments;

See “Marked shipment as shipped…” for 1-6979-1 and compare it with “Marked shipment as shipped…” of 1-6979-2 and 1-6979-3. The part “adjusted inventory levels” is missed for 1-6979-1.
The qty in 1-6979-1 is 10, and this all, qty and missing string part coincide with what I see in APP now, the qty in inventory is greater than should be by 10.

After an order was dropship requested http://puu.sh/AQ8gh/59075daa5a.png
The values are correct

After tracking info was filled for each shipment http://puu.sh/AQ8pE/9546775226.png
On Hand is greater than should be by 10 (exactly the qty of the first shipment, the shipment where no “adjusted inventory levels” in the comment on the timeline)

I’m looking into what may have happened.

But I must reiterate again: We do not support your use case of creating multiple shipments for v3 orders. If you continue to do this, there will be consequences such as this that occur and we will not offer support for this.

I researched this issue for you, and I believe that the line item for 1-6979-1 was assumed to have been dropshipped. In such a case, Ordoro will not adjust inventory levels, and the comment reflects this.

Does this help?

All items (products) are configured to be dropshipped.
Even more, in the order, all shipments contain the same item (SKU)

About shipments and v3.
I need to provide an ability to add a few tracking numbers for an order.
Because items can be shipped from different locations (warehouses)
You advised to spit orders instead of making shipments, but this way is not good.
We will have one order for a customer (buyer), and the order will be split into a few for a distributor (my app user). This is badly correlates with business logic. V2 shipments were a great and clear way.