# Warehouse\_id assigned to lineitem does not correspond with what's seen in app

**URL:** <https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164>\
**Category:** GraphQL API\
**Created:** [March 5, 2021, 8:57pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164 "2021-03-05T20:57:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [March 5, 2021, 8:57pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/1 "2021-03-05T20:57:53Z")

</div>

Please refer to attached images, At the database level it appears that both lineItems on this order are assigned to the same warehouse\_id which is the Primary (id= V2FyZWhvdXNlOjU5NjU=). Here is a GraphQL API query and result showing that ShipHero assigned the same Primary warehouse\_id to both lineitems:

 ![img1](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/d740c3c1fdaf824b95f17a2c87bb7478d7627847.jpeg)

In the APP we see them assigned to different warehouses:

 ![img2](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/3e278ebb3bc1654bfe4995094fdaf6173b694917.jpeg)

Why is “ EQ10VAT001 FGR XS” assigned to the “Cross Dock” in the app UI. But returns the “Primary” warehouse\_id in the API lineitem obect?

These are the only 2 warehouses in our data:  
id identifier legacy\_id  
V2FyZWhvdXNlOjEyODQ0 Cross Dock 12844  
V2FyZWhvdXNlOjU5NjU= Primary 5965

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 6, 2021, 6:42pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/2 "2021-03-06T18:42:22Z")

</div>

Hi @bbarrett!  
Thanks for reaching out!

That might be because your account has MWA (multi-warehouse allocation rules). For those warehouse\_ids they are the ones from when the order first was created on ShipHero. Then the rules run and it allocates based on the Rules criteria.

Let me ask internally if this could be changed and get back to you with a better response.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [March 8, 2021, 2:15pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/3 "2021-03-08T14:15:01Z")

</div>

Tomas – This sounds like a bug. Unfortunately, this is now presenting a larger problem for us. Not having the correct warehouse\_id assigned to the line item will prevent us from distinguishing the lineitems fulfilled from our dropship warehouse. And thus, short circuit our business plans to implement a drop ship program with one of our clients.

How else can I use the API to correctly detect which warehouse a line item is getting fulfilled from? Your app UI seems to be aware of the correct warehouse. How is this working in the app?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 8, 2021, 2:41pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/4 "2021-03-08T14:41:26Z")

</div>

Hi @bbarrett!  
I just confirmed with our team, the allocations for MWA are being pulled from a different place, so those warehouse\_id fields won’t work for MWA accounts at the moment.

We requested for that to be changed or added in a different query or field. We will let you know if this can be built.  
Thanks again for the patience!  
Tom

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [March 8, 2021, 4:45pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/6 "2021-03-08T16:45:59Z")

</div>

Tomas - In the mean time I was hoping you could answer:

How else can I use the API to correctly detect which warehouse a line item is getting fulfilled from? Your app UI seems to be aware of the correct warehouse. How is this working in the app?

Thanks

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 8, 2021, 5:09pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/7 "2021-03-08T17:09:53Z")

</div>

Hi @bbarrett!  
I apologize I missed that question!  
No, unfortunately, there is no other way of accessing that information at the moment. The app is currently using a different logic than the Public API and pulling the information from a place that is specific to MWA functionality, while the Public API gets the information directly from the line items information, that does not contain that MWA logic.  
Let me know if that still doesn’t help.  
Thanks again!  
Tom

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [March 8, 2021, 6:00pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/8 "2021-03-08T18:00:45Z")

</div>

Understood. Thanks. Unfortunately it doesn’t solve our problem.

Is there any possible way to get the association of a LineItem to the warehouse its fulfilled from after the MWA logic is processes?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [March 8, 2021, 7:00pm UTC](https://community.shiphero.com/t/warehouse-id-assigned-to-lineitem-does-not-correspond-with-whats-seen-in-app/1164/9 "2021-03-08T19:00:56Z")

</div>

Hi @bbarrett  
Thanks for confirming that, yes, we have requested for that to be changed or added in a different query or field and will let you know as soon as it gets reviewed.  
Thanks again for the patience!  
Tom
