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

# Order Management

> Track and manage orders placed through chat (optional e-commerce feature)

<Note>
  **E-commerce feature:** This requires Shopify integration. If you're only
  using Cosmo for customer service, skip this page.
</Note>

## What It Is

View and manage customer orders placed through WhatsApp or Instagram chat. Orders sync automatically with Shopify.

<CardGroup cols={2}>
  <Card title="Chat-to-Purchase" icon="messages">
    Customers place orders directly in chat
  </Card>

  <Card title="Order Tracking" icon="map-pin">
    Automatic shipment tracking updates
  </Card>

  <Card title="Two-Way Sync" icon="arrows-rotate">
    Orders sync between Cosmo and Shopify
  </Card>

  <Card title="Status Updates" icon="bell">
    Auto-notify customers of order updates
  </Card>
</CardGroup>

## How It Works

<Steps>
  <Step title="Customer Browses">Customer asks about products in chat</Step>

  <Step title="Cosmo Assists">
    AI shows products, answers questions, recommends items
  </Step>

  <Step title="Customer Orders">
    "I'll take 2" → Cosmo collects payment and shipping info
  </Step>

  <Step title="Order Created">
    Order automatically created in both Cosmo and Shopify
  </Step>

  <Step title="Auto-Updates">
    Customer gets automatic updates on shipping and delivery
  </Step>
</Steps>

## Viewing Orders

Navigate to **Orders** to see:

| Field            | What It Shows                             |
| ---------------- | ----------------------------------------- |
| **Order Number** | Unique order ID                           |
| **Customer**     | Name and contact                          |
| **Status**       | Processing, Shipped, Delivered, Cancelled |
| **Total**        | Order amount                              |
| **Date**         | When order was placed                     |
| **Items**        | Products ordered                          |

## Order Status

Orders automatically sync between Cosmo and Shopify:

* **Pending**: Payment processing
* **Confirmed**: Payment received, preparing to ship
* **Shipped**: Package in transit (includes tracking)
* **Delivered**: Customer received order
* **Cancelled**: Order cancelled (refund processed)

<Info>
  When you update order status in Shopify, customers automatically get notified
  via WhatsApp/Instagram.
</Info>

## Customer Notifications

Automatic messages sent when:

* Order is confirmed
* Order ships (includes tracking link)
* Order is out for delivery
* Order is delivered
* Order is cancelled or refunded

## Troubleshooting

**Orders not appearing?**

* Check Shopify connection in Settings
* Verify order write permissions are enabled
* Wait 5-10 minutes for sync

**Customer not getting notifications?**

* Check 24-hour messaging window (WhatsApp)
* Verify notification settings in Settings
* Confirm customer phone number is correct

**Order not syncing to Shopify?**

* Check API permissions
* Verify products exist in Shopify
* Review error logs in Settings
