The Scenario
Campaign planning season. The promotions lead needs to audit all active Shopify price rules before the next campaign brief goes out. How many codes per rule? Which codes have zero uses? Which price rules are set to expire this month? All of it needs to be in an Excel workbook before the planning session Thursday.
She's been through the Shopify admin. The discounts screen shows price rules one at a time, with codes listed below each rule. There's no export. There are 18 active price rules and she stopped counting codes after 200.
The bad version:
- Open the first price rule, note the discount type and value.
- Count the codes, note each code string and its usage count.
- Navigate back to the discounts list. Open the next rule.
- After two hours, you've covered eight price rules and your notes are already in a format that's hard to query.
The planning session is Thursday. It's Monday. The audit needs to exist before then.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It pulls all price rules and their associated discount codes from Shopify in one operation and writes them into the workbook — one row per code, all the fields the promotions lead needs.
Pull all Shopify price rules and their associated discount codes into my Campaign Audit Excel sheet — highlight rows where usage_count is 0 (unused codes)
What You Get
- One row per discount code, with the parent price rule's type and value, the code string, usage count, and expiry date in labeled columns.
- Unused codes (usage_count of 0) highlighted automatically so the promotions lead can spot dead inventory at a glance.
- All 18 price rules and their codes in one pull — no rule-by-rule navigation.
What If the Data Is Not Quite Ready
You only want active price rules — those that haven't expired
Pull all Shopify price rules where ends_at is null or in the future, and for each list all discount codes with code, usage count, and expires_at — write into my Campaign Audit Excel sheet — highlight unused codes
You need to know the total redemption count per price rule as a summary
Pull all Shopify price rules and their discount codes — write price rule title, discount value, code, usage count, and expires_at into my Campaign Audit Excel sheet — add a column with the total usage count across all codes for that price rule
Codes expiring this month need to be flagged separately from unused codes
Pull all Shopify price rules and their discount codes — write price rule title, type, value, code, usage count, and expires_at into my Campaign Audit Excel sheet — add a flag column: 'unused' if usage count is 0, 'expiring soon' if expires_at is within 30 days, and 'ok' otherwise
Full audit: active rules only, unused flag, expiring-soon flag, per-rule totals, and sort by usage
Pull all Shopify price rules where ends_at is null or future — for each, list all discount codes with code, usage count, expires_at — write price rule title, type, value, code, usage count, expires_at into my Campaign Audit Excel sheet — flag 'unused' (count 0) or 'expiring soon' (within 30 days) — add per-rule total usage column — sort by usage count ascending
Running the sort, expiry flag, and per-rule totals in one pass means the promotions lead walks into Thursday's session with an action-prioritized audit workbook.
Try It
Get the 7-day free trial of SheetXAI and open the campaign audit workbook before Thursday's planning session, then ask SheetXAI to pull all price rules and codes with flags built in. Future campaign cycles will start the same way. Also worth reading: how to bulk create new discount codes once the campaign is planned, or the hub overview for all Shopify workflows.
