# Shopify Order Fulfillment Tracker

> Monitor Shopify order fulfillment in real time. Flag delayed shipments and alert your ops team before customers start asking questions.

Source: https://cotera.co/solutions/ops/shopify-order-fulfillment-tracker

---

- **Team:** Operations
- **Tools:** Shopify
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 2-3 hrs/week

## How it works
1. **Pull Order History** — Retrieve all orders for a customer from Shopify
2. **Check Fulfillment** — Get tracking, carrier, and shipment status per order
3. **Log to Sheets** — Write structured fulfillment data to Google Sheets
4. **Alert on Slack** — Notify the team when orders are stuck or delayed

## Example requests
- Check all orders for vip@bigretailer.com and flag anything unfulfilled over 3 days
- Pull fulfillment status for my top 10 customers and log to the ops spreadsheet
- Monitor orders from last week and alert #shipping-ops about any stuck shipments

## Prompt

```markdown
## Task

Use @Shopify/Get Customer Orders by Email to pull a customer&apos;s order history, then @Shopify/Get Order Fulfillments to check the fulfillment status of each order. Log results to @Google Sheets/Add Rows and send a @Slack/Send Message alert for any orders that are unfulfilled or have shipping issues.

**Example:** Check all orders for vip-customer@example.com, flag anything unfulfilled older than 3 days, and alert the ops team in Slack.

## Input

The user will provide:
1. A customer email address (or list of emails) to check
2. The Slack channel to send alerts to (e.g., #fulfillment-ops)
3. The Google Sheet ID where fulfillment data should be logged
4. Optional: a threshold in days for flagging delayed orders (default: 3 days)

**Example:** "Check orders for sarah@bigclient.com and log to sheet 1A2B3C. Alert #ops if anything is unfulfilled for more than 2 days."

## Context

### Fulfillment Statuses to Watch

**Requires attention:**
- fulfillmentStatus is null (not yet fulfilled)
- shipmentStatus is "label_printed" but no movement in 48+ hours
- shipmentStatus is "failure" or "attempted_delivery"
- Order created more than [threshold] days ago with no fulfillment

**Normal — no alert needed:**
- shipmentStatus is "in_transit" or "delivered"
- fulfillmentStatus is "fulfilled" with tracking info present

### Data to Collect Per Order

For each order, capture:
- Order name/number and creation date
- Financial status (paid, pending, refunded)
- Fulfillment status and tracking number
- Carrier and shipment status
- Line items with quantities
- Days since order was placed

### Spreadsheet Structure

Log to Google Sheets with columns:
| Order # | Customer Email | Created | Total | Financial Status | Fulfillment Status | Tracking # | Carrier | Shipment Status | Days Open | Flagged |

### Alert Logic

Send a Slack message when:
- Any order has been unfulfilled for longer than the threshold
- A shipment shows a failure or attempted_delivery status
- There are more than 3 unfulfilled orders for a single customer

## Output

**Google Sheet:** One row per order with all fulfillment details and a "Flagged" column (YES/NO).

**Slack Alert (if issues found):**

:warning: **Fulfillment Alert — [Customer Name]**

**[Count] orders need attention:**

| Order | Created | Status | Issue |
|-------|---------|--------|-------|
| #1234 | Jan 15 | Unfulfilled | 5 days without shipment |

**Action needed:** Review flagged orders in the [spreadsheet link].

**If no issues:** No Slack message sent. Sheet is updated silently.
```

## Related reading
- [Shopify B2B Order Automation](https://cotera.co/articles/shopify-b2b-order-automation.md)
- [Shopify Order Tracking Automation](https://cotera.co/articles/shopify-order-tracking-automation.md)
- [Automate Shopify Order Management](https://cotera.co/articles/automate-shopify-order-management.md)

