> ## 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.

# Overview

> Extend Shopify locations with types, tags, and capacity

Charlie extends Shopify's native locations with metadata and settings that power your fulfillment rules.

<Info>
  Charlie syncs automatically with your Shopify locations. Any location you create in Shopify appears in Charlie.
</Info>

## What Charlie adds to locations

| Feature           | Description                                               | Used in                |
| ----------------- | --------------------------------------------------------- | ---------------------- |
| **Types**         | Classify locations as Warehouse or Store                  | Constraints, Routing   |
| **Tags**          | Add custom tags for flexible grouping                     | Constraints, Routing   |
| **Capacity**      | Set daily order limits per location                       | Routing, Automations   |
| **Backlog**       | Track open fulfillment pipeline and rank by queue depth   | Routing                |
| **Handle**        | URL-friendly identifier for the location                  | Storefront, API, theme |
| **Sales targets** | Per-location sales goals tracked in admin and Shopify POS | POS, reporting         |

<Note>
  Shipping configuration (which locations ship, shipping zones, carriers) is managed directly in **Shopify Admin → Settings → Shipping and delivery**.
</Note>

## Identifying locations

Each location has a few identifiers you can use depending on the context:

| Identifier   | Where it's set                                     | Use it for                                                 |
| ------------ | -------------------------------------------------- | ---------------------------------------------------------- |
| **Name**     | Shopify Admin → Locations                          | The merchant-facing display name                           |
| **ID (GID)** | Assigned by Shopify (`gid://shopify/Location/...`) | API calls, CSV imports, function inputs                    |
| **Handle**   | Charlie → Location detail page → **Handle** field  | URL-friendly references in your storefront or integrations |

### Handle

The handle is a short, URL-friendly identifier you assign per location — for example, `paris-warehouse` or `flagship-store`. Handles are useful when you need a stable, human-readable reference that doesn't change if the location name is edited.

Charlie exposes the handle as a public metafield (`charlie_location.handle`) so it's accessible from your storefront, theme, or any app that reads location metafields.

<Steps>
  <Step title="Open the location">
    Go to **Charlie → Locations** and select the location.
  </Step>

  <Step title="Edit the handle">
    On the location detail page, find the **Handle** field and click **Edit**. Pick a short, URL-friendly identifier (lowercase, hyphens, no spaces).
  </Step>

  <Step title="Save">
    Save the handle. It's written to both `$app:location.handle` and `charlie_location.handle` metafields.
  </Step>
</Steps>

<Tip>
  Handles are useful as keys in spreadsheets, scripts, or theme code. Pick a convention (e.g. `city-type`) and apply it consistently across locations.
</Tip>

## Markets at a glance

The location detail page shows the **Shopify Markets** each location serves as chips, so you can see at a glance which markets a location is set up for.

* Each chip is a market name from your Shopify Markets configuration
* Click a chip to jump to that market in **Shopify Admin → Settings → Markets**

<Note>
  Charlie reads markets via the `read_markets` access scope. If your install was set up before this scope was granted, you may need to re-authorize the app.
</Note>

## Browsing your locations

The location list includes pre-created views to help you find locations quickly:

| View           | Shows                                 |
| -------------- | ------------------------------------- |
| **All**        | Every location                        |
| **Active**     | Locations currently active in Shopify |
| **Inactive**   | Locations that are inactive           |
| **Stores**     | Locations with type set to Store      |
| **Warehouses** | Locations with type set to Warehouse  |

Each tab displays a count of matching locations. Your selected view is saved in the URL, so you can bookmark or share filtered views with your team.

## Why extend locations?

<CardGroup cols={2}>
  <Card title="Target rules precisely" icon="bullseye">
    Use types and tags to apply constraints and routing rules to specific locations
  </Card>

  <Card title="Scale without rework" icon="chart-line">
    New locations inherit rules automatically based on their type and tags
  </Card>

  <Card title="Control capacity" icon="gauge-high">
    Limit daily orders per location to match staffing and operational capacity
  </Card>

  <Card title="Stay native" icon="shopify">
    Charlie extends Shopify locations—no duplicate configuration
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Locations sync from Shopify">
    All your Shopify locations appear in Charlie automatically.
  </Step>

  <Step title="Add type and tags">
    Classify each location (Warehouse or Store) and add custom tags.
  </Step>

  <Step title="Set capacity">
    Define how many orders each location can fulfill per day.
  </Step>

  <Step title="Use in rules">
    Reference location types and tags in your fulfillment constraints and order routing rules.
  </Step>
</Steps>

## Example: Regional routing with location tags

A retailer with 3 warehouses and 20 stores wants to:

* Route online orders to warehouses only
* Use stores only for local pickup

**Setup:**

1. Set warehouse locations to type **Warehouse**
2. Set store locations to type **Store**
3. Create a routing rule: prioritize locations where type = Warehouse

**Result:** Online orders route to warehouses first. Stores are only used if explicitly allowed.

## Next steps

<CardGroup cols={2}>
  <Card title="Types" icon="building" href="/locations/types">
    Classify locations as Warehouse or Store
  </Card>

  <Card title="Tags" icon="tags" href="/locations/tags">
    Add custom tags for flexible grouping
  </Card>

  <Card title="Capacity" icon="gauge-high" href="/locations/capacity">
    Set daily order limits per location
  </Card>

  <Card title="Sales targets" icon="bullseye-arrow" href="/locations/sales-targets">
    Track per-location sales goals from admin and POS
  </Card>
</CardGroup>
