Install
$ agentstack add skill-40rty-ai-shopify-admin-skills-shopify-admin-checkout-abandonment-report ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
About
Purpose
Aggregates abandoned checkout data broken down by cart value bucket and hour of day (UTC). Helps identify when and at what price point customers are most likely to abandon checkout. Scoped to what the abandonedCheckouts API provides — device type and geographic location are not available in this API and are not reported.
Prerequisites
- Authenticated Shopify CLI session:
shopify auth login --store - API scopes:
read_checkouts
Parameters
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | format | string | no | human | Output format: human or json | | dryrun | bool | no | false | Preview operations without executing mutations | | daterangestart | string | yes | — | Start date in ISO 8601 (e.g., 2025-01-01) | | daterangeend | string | yes | — | End date in ISO 8601 (e.g., 2025-01-31) | | cartvalue_buckets | array | no | [0, 25, 50, 100, 250] | Array of thresholds defining cart value bands (e.g., [0,25,50,100,250] creates bands: $0–25, $25–50, $50–100, $100–250, $250+) |
Workflow Steps
- OPERATION:
abandonedCheckouts— query
Inputs: first: 250, query: "created_at:>='' created_at:'", pagination cursor Expected output: All abandoned checkouts in range with totalPrice and createdAt; paginate until hasNextPage: false; then aggregate in-memory: (1) count by cart value bucket, (2) count by hour of day (UTC, 0–23)
GraphQL Operations
# abandonedCheckouts:query — validated against api_version 2025-04
query AbandonedCheckoutsReport($first: Int!, $after: String, $query: String) {
abandonedCheckouts(first: $first, after: $after, query: $query) {
edges {
node {
id
createdAt
totalPriceSet {
shopMoney {
amount
currencyCode
}
}
customer {
defaultEmailAddress {
emailAddress
}
}
lineItems {
edges {
node {
title
quantity
variant {
price
}
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: checkout-abandonment-report ║
║ Store: ║
║ Started: ║
╚══════════════════════════════════════════════╝
After each step, emit:
[N/TOTAL]
→ Params:
→ Result:
On completion, emit:
For format: human (default):
══════════════════════════════════════════════
OUTCOME SUMMARY
Total abandoned:
Date range: to
Errors: 0
Output: none
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "checkout-abandonment-report",
"store": "",
"started_at": "",
"completed_at": "",
"dry_run": false,
"steps": [
{ "step": 1, "operation": "AbandonedCheckoutsReport", "type": "query", "params_summary": " to ", "result_summary": " checkouts", "skipped": false }
],
"outcome": {
"total_abandoned": 0,
"date_range_start": "",
"date_range_end": "",
"by_cart_value": [
{ "range": "$0 – $25", "count": 0, "pct": 0.0 }
],
"by_hour_utc": [
{ "hour": "00:00", "count": 0, "pct": 0.0 }
],
"errors": 0,
"output_file": null
}
}
Output Format
Two tables displayed inline (no CSV):
Table 1: Abandonment by Cart Value Bucket
| Cart Value Range | Abandoned Checkouts | % of Total | |-----------------|---------------------|------------| | $0 – $25 | ... | ... | | $25 – $50 | ... | ... | | $50 – $100 | ... | ... | | $100 – $250 | ... | ... | | $250+ | ... | ... |
Table 2: Abandonment by Hour of Day (UTC)
| Hour (UTC) | Abandoned Checkouts | % of Total | |-----------|---------------------|------------| | 00:00 | ... | ... | | 01:00 | ... | ... | | 02:00 | ... | ... | | ... | | |
For format: json, by_cart_value is an array of {range, count, pct} objects; by_hour_utc is an array of {hour, count, pct} objects.
Note: Device type and geographic location are not available in the abandonedCheckouts API and are not reported by this skill.
Error Handling
| Error | Cause | Recovery | |-------|-------|----------| | No checkouts returned | No abandoned checkouts in date range | Widen date range or verify read_checkouts scope | | Invalid date format | Date not in ISO 8601 | Use format YYYY-MM-DD | | Rate limit (429) | Too many paginated requests | Narrow date range or reduce first to 100 |
Best Practices
- For high-traffic stores, narrow the date range to 7–14 days for faster results; paginating 90 days of data can produce many API calls.
- The default
cart_value_bucketsof[0,25,50,100,250]works for most stores — adjust thresholds to match your AOV distribution. - Hours are reported in UTC — convert to your store's local timezone before drawing conclusions about peak abandonment times.
- Run this report weekly and compare the by-hour pattern to your promotional send times to find timing opportunities.
emailis included in the query result — combine with theabandoned-cart-recoveryskill to act on the customers most likely to convert based on their cart value tier.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: 40RTY-ai
- Source: 40RTY-ai/shopify-admin-skills
- License: MIT
- Homepage: http://skills.40rty.ai
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.