Wrong order warehouse

Expected behavior:

  • Order is created with fulfillment status pending, ready to ship, and pending quantity set.
  • Inventory shows the quantity allocated from the warehouse selected on creation.
  • Order is set as fulfilled.
  • Inventory gets updated according to order’s quantity and corresponding warehouse.

Current behavior:

  • Order is created with fulfillment status pending and allocated quantity set.
  • Inventory does not show the quantity allocated in the selected warehouse. Also, AllocatedWarehouse is different from LockedWarehouse.
  • Order is set as fulfilled.
  • Inventory gets updated according to order’s quantity but in the wrong warehouse.

Down below are the mutations used for each case (creation and update). Please let me know if I’m missing something.

Thanks in advance.

Create order mutation

mutation {
order_create(
data: {
order_number: “11223362”
shop_name: “API”
fulfillment_status: “pending”
order_date: “2020-08-07”
total_tax: “29.00”
subtotal: “150.00”
total_discounts: “20.00”
total_price: “159.00”
ready_to_ship: true
ignore_address_validation_errors: true
shipping_lines: {
title: “UPS”
price: “0.00”
carrier: “UPS”
method: “Ground”
}
shipping_address: {
first_name: “John”
last_name: “Johnson”
company: “The Johnson Co”
address1: “2543 Duck St.”
address2: “Apt. 2”
city: “Oklahoma”
state: “Oklahoma”
state_code: “OK”
zip: “73008”
country: “US”
country_code: “US”
email: “johnjohnsonco@johnsonco.com
phone: “5555555555”
}
billing_address: {
first_name: “John”
last_name: “Johnson”
company: “The Johnson Co”
address1: “2543 Duck St.”
address2: “Apt. 2”
city: “Oklahoma”
state: “Oklahoma”
state_code: “OK”
zip: “73008”
country: “US”
country_code: “US”
email: “johnjohnsonco@johnsonco.com
phone: “5555555555”
}
line_items: {
sku: “21011”
product_name: “Blender Koi”
partner_line_item_id: “282960811223351”
quantity: 1
price: “150.00”
fulfillment_status: “pending”
quantity_pending_fulfillment: 1
warehouse_id: “V2FyZWhvdXNlOjYxMzUz”

  }
}){'removed for clarity'}

Update order fulfillment mutation

mutation{
order_update_fulfillment_status(
data: {
order_id: “T3JkZXI6MTQwNDQ1NDg3”,
fulfillment_status: “fulfilled”,
remove_inventory: true
}
){
order{
order_number
}
}
}

Hi @YiRo
I apologize for the delay in my response about this.
Is there any chance you could send me the request_id? That way I will know what is your account and then I could inspect what happened with that order number
Thanks in advance!
Tom

Hi @tomasw
Sure, here is it: “request_id”: “5f31e9401c6ce538397e7e18”.

Let me give you more details about what I want to achieve, and perhaps it’ll make it easier for you to point me in the right direction.

I’m trying to reproduce Amazon FBA flow. I need to create the order in a specific warehouse, and then when the order has been shipped outside ShipHero update fulfillment status and remove inventory from that warehouse.

I’ve noted that if I set the order as fulfilled from ShipHero, it works ok but using Graphql does not.

Thanks in advance.

Hi @YiRo
Thanks for the information! that really helped.
So as far as I could check, the account is not Multi Warehouse (About Multi Warehouse and Multi Warehouse Allocation), which means that allocating into different warehouses might not work as intended, and you might notice that it deducts or allocates to the primary warehouse when using the app.
Let me know if I could explain this better
Thanks again!
Tom

Hi @tomasw
Thanks for your quick answer. I was waiting for the MWA feature to be activated in the production environment, wish it is now, but the main issue persists. When I create a new order, I see the inventory allocated from the expected warehouse but, when I set the order as fulfilled using Graphql, the inventory amount does not decrease. If I repeat the process but this time I set the order as fulfilled from the Shiphero admin interface and the inventory change as expected.

Graphql mutation used:
mutation UpdateOrderFulfillmentStatus(
$updateOrderFulfillmentStatusInput: UpdateOrderFulfillmentStatusInput!
) {
order_update_fulfillment_status(data: $updateOrderFulfillmentStatusInput) {
order {
order_number
}
}
}

Hi @YiRo
I apologize for the delayed response.
For that you will need to remove inventory with another mutation.
We made this document about that in case it helps:

https://developer.shiphero.com/order-fulfillment/

Let me know if this is not what you were referring to.
Thanks again!
Tom

Hi @tomasw, thanks again for your help. That’s what I needed.

1 Like