If you have multiple warehouses, when you are generating a document, you always have the ability to choose from which location you are pulling the items for that warehouse.
If you are, for example, selling items from your retail and you have insufficient quantity to complete the sales order, but in your main warehouse you have that item in your stock, the system will recognize that and your backordering will not suggest that you purchase or produce the missing item, the backordering option will suggest that you simply transfer it from your other location, in this case, the main warehouse.
To set this up, the first thing you need to do is to set up your warehouse to be fulfilled from your other location. Go to:
Administration > Warehouses list
Once you open the wanted warehouse, go to edit mode and select the wanted fulfillment option (in this case your other location) from the drop-down menu:
Once you've saved those changes, when you create the sales order, you can find the suggestion which items you need to transfer from one location to another by going to
Inventory > Transfer - fulfillment
Once you open it, you will find a list of all the items that you need to transfer from one location to another, in order to complete your sales orders.
You can use the bulk action to generate the transfer from the list directly:
The transfer document is now generated and it is placed on the transfers list in the inventory module.
Now you can continue to pack the items from the document, which will create the transfer list, and ship them to the wanted location. Once you receive them on stock, you will have sufficient quantity to complete your sales order.