# Warehouse\_id changing after create\_order

**URL:** https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911
**Category:** GraphQL API
**Created:** [October 24, 2020, 1:58pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911 "2020-10-24T13:58:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Csraspini](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/csraspini/32/125_2.png) [@Csraspini](https://community.shiphero.com/u/Csraspini)
#### Post date: [October 24, 2020, 1:58pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/1 "2020-10-24T13:58:56Z")

</div>

Hi there,

I am testing order creation and have run into a problem with my warehouses.  
Specifically, I have two virtual warehouses:

1. Primary, for B2C clients
2. B2B, for B2B clients

When a client places an order, our store knows whether it is a B2C or B2B order, and sends the correct warehouse\_id info along with the order.

This works as expected as soon as the order is created: B2C goes into the Primary warehouses and B2B goes into the B2B warehouses. However, after just a minute, the warehouse changes from B2B to Primary. No automation rules are being implemented, so I am not sure what is going on.

Here is the BEFORE (as soon as the order is pulled in):

 ![Schermata 2020-10-24 alle 15.52.52](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/0465e4e5c5b96617132eac2033fcf48fb2a685c4.png)

And here is the AFTER (after refreshing the page):

 ![Schermata 2020-10-24 alle 15.53.08](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/8101d1ea815ccccfb78c394efd17db8e3725cff3.png)

Any ideas as to where the issue is?

Best,  
Claudia

---

<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: [October 26, 2020, 2:45pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/2 "2020-10-26T14:45:30Z")

</div>

Hi @Csraspini!  
It might be because of the MWA Rules or the available quantities, are you creating those orders using the Public API?  
In that case, could you send the request\_id?  
With that id, I can check specifically for that order and have a better insight of what might be coming on.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

### Author: ![Csraspini](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/csraspini/32/125_2.png) [@Csraspini](https://community.shiphero.com/u/Csraspini)
#### Post date: [October 26, 2020, 3:03pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/3 "2020-10-26T15:03:12Z")

</div>

Hi there @tomasw ,  
Thank you for your reply.

I haven’t configured any MWA rules, and all the automation rules have been turned off, too. And I’m not sure if it has to do with available quantities given that the products tested have 0 pcs on hand.

Yes, I am creating these orders via Public API. Here is an example request id: 5f96e50ee94d301bee1b8238

I look forward to your reply!  
Claudia

---

<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: [October 26, 2020, 5:12pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/4 "2020-10-26T17:12:51Z")

</div>

Thanks for that @Csraspini!  
In that case, it won’t matter what you are sending with the `warehouse_id` because your account runs with Multi Warehouse Allocation Rules ( [https://mwa.shiphero.com/multi-warehouse-allocation](https://mwa.shiphero.com/multi-warehouse-allocation) ) which will have “priority” over what `warehouse_id` you are sending, changing allocation to whatever the rules say (proximity, availability to allocate all items, etc.)

For that particular order as it has no inventory on any of the warehouses, it will show as N/A until it is able to allocate to one of them

 ![Screen Shot 2020-10-26 at 14.07.09](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/c1ef16f462217d30e38c481ae36ee0bdb4fee22e.png)

For accounts with MWA Rules, the allocation is set using those rules.  
Let me know if that doesn’t help or I could explain better.  
Thanks again!  
Tom

---

<div class="post-metadata">

### Author: ![Csraspini](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/csraspini/32/125_2.png) [@Csraspini](https://community.shiphero.com/u/Csraspini)
#### Post date: [October 27, 2020, 1:23pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/5 "2020-10-27T13:23:50Z")

</div>

Hi again @tomasw, thank you for that explanation, it makes perfect sense.  
At this point, I have a question: I am currently testing this on a sandbox account, which apparently runs with MWA (I didn’t remember, my bad!)… however, as far as I know, our live account doesn’t have MWA, and we’re currently not planning on using this functionality. Is there any way I can test how sending the warehouse\_id will work on an account without MWA? Should I ask tech to deactivate this feature on my sandbox account?

---

<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: [October 27, 2020, 3:07pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/6 "2020-10-27T15:07:54Z")

</div>

Done @Csraspini!  
I removed the MWA flag for your sandbox account (the one with the `request_id`: 5f96e50ee94d301bee1b8238)  
So now you should only be seeing MW.  
Let me know if it works ok now.  
Thanks again!  
Tom

---

<div class="post-metadata">

### Author: ![Csraspini](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/csraspini/32/125_2.png) [@Csraspini](https://community.shiphero.com/u/Csraspini)
#### Post date: [October 29, 2020, 4:35pm UTC](https://community.shiphero.com/t/warehouse-id-changing-after-create-order/911/7 "2020-10-29T16:35:17Z")

</div>

Hi @tomasw, looks perfect now! Thank you for your help!
