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

# Automations

> Automate Charlie settings with Shopify Flow templates

Charlie provides pre-built automation templates that leverage **Shopify Flow** to automatically update your fulfillment settings based on schedules, events, or conditions.

<Info>
  Automations are powered by Shopify Flow—Shopify's native automation platform. This means you get the reliability and flexibility of Shopify's infrastructure, with templates designed specifically for Charlie.
</Info>

## Why use automations

<CardGroup cols={2}>
  <Card title="Native Shopify integration" icon="shopify">
    Built on Shopify Flow—no third-party tools or custom code required
  </Card>

  <Card title="Pre-configured templates" icon="layer-group">
    Ready-to-use workflows designed for common fulfillment scenarios
  </Card>

  <Card title="Fully customizable" icon="sliders">
    Modify templates to match your specific business needs
  </Card>

  <Card title="Reliable scheduling" icon="clock">
    Shopify handles execution, retries, and logging
  </Card>
</CardGroup>

## How to access

Go to **Charlie → Automations** to browse available templates.

## Available templates

### Schedule location capacity by day of week

Automatically set different order capacity limits for each day of the week. Perfect for locations with varying staff levels or operating hours.

**Use cases:**

* Set higher capacity on weekdays when more staff is available
* Reduce capacity on weekends for retail stores focused on walk-ins
* Skip fulfillment entirely on specific days

**How it works:**

| Step             | Description                                            |
| ---------------- | ------------------------------------------------------ |
| **Trigger**      | Scheduled time — runs daily at midnight                |
| **Check day**    | Determines the current day of the week                 |
| **Get capacity** | Looks up today's capacity from a per-day configuration |
| **Condition**    | Skips the day if no capacity is set                    |
| **Action**       | Sets the location capacity to today's value            |

All seven days are configured in one place. To skip a day entirely, set its value to null — the workflow will not update the capacity on that day.

**Example configuration:**

| Day       | Capacity   |
| --------- | ---------- |
| Monday    | 100 orders |
| Tuesday   | 100 orders |
| Wednesday | 100 orders |
| Thursday  | 100 orders |
| Friday    | 80 orders  |
| Saturday  | 50 orders  |
| Sunday    | skipped    |

## Setting up an automation

<Steps>
  <Step title="Browse templates">
    Go to **Charlie → Automations** and select a template that matches your needs.
  </Step>

  <Step title="Install the template">
    Click on the template card to open it in Shopify Flow.
  </Step>

  <Step title="Customize the workflow">
    Modify the template to match your requirements:

    * Adjust trigger timing
    * Change conditions
    * Update capacity values or other settings
  </Step>

  <Step title="Activate the workflow">
    Turn on the workflow in Shopify Flow. It will now run automatically based on your configuration.
  </Step>
</Steps>

## Customizing templates

Since automations run in Shopify Flow, you have full control to customize them:

* **Change the schedule** — run at different times or frequencies
* **Add conditions** — only run on certain days, for specific locations, etc.
* **Chain actions** — combine with other Shopify Flow actions (send notifications, update tags, etc.)
* **Create branches** — handle different scenarios with conditional logic

<Tip>
  Templates are starting points. Once installed, you own the workflow and can modify it however you need.
</Tip>

## Building custom automations

Beyond templates, you can create your own automations from scratch using Charlie's Shopify Flow actions:

| Action                    | Description                                    |
| ------------------------- | ---------------------------------------------- |
| **Set location capacity** | Update the daily order capacity for a location |

<Note>
  More Flow actions coming soon. Contact support if you have specific automation needs.
</Note>

## Best practices

<CardGroup cols={2}>
  <Card title="Test before activating" icon="flask">
    Use Shopify Flow's preview feature to verify the workflow behaves as expected
  </Card>

  <Card title="Monitor execution" icon="chart-line">
    Check Shopify Flow's run history to ensure automations are running successfully
  </Card>

  <Card title="Start simple" icon="seedling">
    Begin with a template, then customize once you understand how it works
  </Card>

  <Card title="Document changes" icon="file-lines">
    If you modify a template significantly, rename it to reflect what it does
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Automation not running">
    Check in Shopify Flow that:

    1. The workflow is turned **On**
    2. The trigger conditions are met
    3. No errors appear in the run history
  </Accordion>

  <Accordion title="Capacity not updating">
    Verify that:

    1. The correct location is selected in the Flow action
    2. The capacity value is valid (positive integer)
    3. Charlie has permission to update the location
  </Accordion>

  <Accordion title="Template not appearing in Shopify Flow">
    Ensure Charlie is properly installed and has the required permissions. Try disconnecting and reconnecting the app if issues persist.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Capacity Rules" icon="gauge-high" href="/order-routing/capacity-rules">
    How capacity affects order routing
  </Card>

  <Card title="Location Settings" icon="location-dot" href="/locations/overview">
    Configure location details and capacity
  </Card>
</CardGroup>
