We create a warehouse attribute. In this warehouse attribute, we create various options like warehouse A , warehouse B and warehouse C.
This warehouse attribute is assigned to our used attribute set. We create products and assigned requisite warehouse.
Now a customer has placed an order with 5 products
a. Product A belongs to Warehouse B
b. Product B belongs to Warehouse A
c. Product C belongs to Warehouse A
d. Product D belongs to Warehouse C
e. Product E belongs to none of warehouses
In this case , our order will be split into 4 different orders:-
a. Order 1 having products of warehouse A, i.e Product B and C
b. Order 2 having product of warehouse B, i.e Product A
c. Order 3 having product of warehouse C, i..e Product D
d. Order 4 will be of none of the warehouses, i.e Product E.