Currently, all order lines are assigned to the primary warehouse when using AddOrder except when specifying a warehouse.
However, when placing an order on the website, it assigns the products to a warehouse based on:
- Primary warehouse flag on the product
- Stock on the warehouse
- Primary warehouse
It would to be to add a flag so if set, the products would be assigned to a warehouse the same as on the website front end.