> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecharlie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Prioritize warehouse shipping

> Always ship from warehouses when stock is available

If you want to reserve store inventory for walk-in customers and only ship from warehouses, set up a **Ranked Location Groups** rule as your first order routing preference.

## How it works

By placing warehouses in the first group of your routing rules, Charlie will always prioritize them for online orders. Stores only fulfill when warehouses can't.

## Setup

<Steps>
  <Step title="Go to Order Routing">
    Navigate to **Charlie → Settings → Order routing** or **Shopify → Settings → Shipping and delivery → Order routing**.
  </Step>

  <Step title="Add a Ranked Location Groups rule">
    Create a new **Ranked Location Groups** rule and make sure it's your **first** preference rule.
  </Step>

  <Step title="Configure groups">
    * **Group 1:** All locations with type = Warehouse
    * **Group 2:** All locations with type = Store

    <Frame>
      <img src="https://mintcdn.com/charlie-6278c0d1/zIZXpEfAUH7cQkz5/images/prioritize-warehouse-ranked-groups.png?fit=max&auto=format&n=zIZXpEfAUH7cQkz5&q=85&s=6887bf977b80cf7d77585efe79594a27" alt="Ranked location groups with warehouses first" width="1396" height="1336" data-path="images/prioritize-warehouse-ranked-groups.png" />
    </Frame>
  </Step>

  <Step title="Enable the rule">
    Toggle the rule on and save.
  </Step>
</Steps>

## Result

| Scenario                                | Fulfillment                  |
| --------------------------------------- | ---------------------------- |
| Warehouse has stock                     | Ships from warehouse         |
| Warehouse out of stock, store has stock | Ships from store             |
| No stock anywhere                       | Order blocked or backordered |

<Tip>
  Combine this with **Safety Stock** on stores to further protect in-store inventory from online orders.
</Tip>

## Related

<CardGroup cols={2}>
  <Card title="Ranked Location Groups" icon="layer-group" href="/order-routing/ranked-location-groups">
    Learn more about location group ranking
  </Card>

  <Card title="Location Types" icon="building" href="/locations/types">
    Set up Warehouse and Store types
  </Card>
</CardGroup>
