shopify-admin-automated-order-tagger

Change: Automatically tag orders according to configurable rules (e.g., geography, order amount, product type, risk level, customer tier).

Last repository push
GitHub Stars
205
Forks
23
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "shopify-admin-automated-order-tagger" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-35fb94bc89de568b4cdcefe2cb3bf1a62ae578a59f7828effc116859fd908463. Verify the upstream source and version against https://github.com/40RTY-ai/shopify-admin-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Change: Automatically tag orders according to configurable rules (e.g., geography, order amount, product type, risk level, customer tier).

0 Downloads

Introduction source: third_party · 40RTY-ai · 0.0.1 Reference

SkillPi interpretation

Tasks
Mutation: applies tags to orders based on configurable rules (geography, value, product type, risk level, customer tier).
Inputs and outputs
CSV file `order_tags_<YYYY-MM-DD>.csv` with columns: `order_id`, `order_name`, `existing_tags`, `new_tags`, `matched_rules`
Software, accounts and paid services
Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders,write_orders` API scopes: `read_orders`, `write_orders`
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: shopify-admin-automated-order-tagger
role: order-intelligence
description: "Mutation: applies tags to orders based on configurable rules (geography, value, product type, risk level, customer tier)."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
  - orders:query
  - orderUpdate:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLI

Purpose

Applies tags to orders based on configurable rule sets — geography-based (domestic/international), value-based (high-value, low-value), product-type-based, customer-tier-based, or custom conditions. Supports dry-run mode for safe preview.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_orders,write_orders
  • API scopes: read_orders, write_orders

Parameters

Parameter Type Required Default Description
store string yes — Store domain
rules object[] yes — Array of tagging rules (see Rules Format below)
days_back integer no 7 Lookback window for orders to tag
skip_tagged boolean no true Skip orders that already have the target tag
dry_run boolean no true Preview only — don't apply tags
format string no human Output format: human or json

Rules Format

Each rule has a condition and a tag:

[
  { "condition": "total_price > 500", "tag": "high-value" },
  { "condition": "total_price < 20", "tag": "low-value" },
  { "condition": "shipping_country != US", "tag": "international" },
  { "condition": "shipping_country = US", "tag": "domestic" },
  { "condition": "line_items_count > 5", "tag": "bulk-order" },
  { "condition": "customer_orders > 3", "tag": "repeat-buyer" },
  { "condition": "customer_orders = 1", "tag": "first-time" },
  { "condition": "risk_level = HIGH", "tag": "needs-review" },
  { "condition": "financial_status = PARTIALLY_REFUNDED", "tag": "partial-refund" },
  { "condition": "fulfillment_status = null", "tag": "unfulfilled" },
  { "condition": "discount_codes contains WELCOME", "tag": "welcome-discount" },
  { "condition": "product_type contains Subscription", "tag": "subscription-order" }
]

Safety

⚠️ Mutation skill — always run with dry_run: true first to preview tag assignments before applying.

Workflow Steps

  1. OPERATION: orders — query Inputs: query: "created_at:>='<NOW - days_back days>'", first: 250, select id, name, tags, totalPriceSet, shippingAddress { countryCode }, customer { numberOfOrders }, displayFinancialStatus, displayFulfillmentStatus, riskLevel, lineItems { product { productType } }, discountCodes, pagination cursor Expected output: All recent orders with data needed for rule evaluation

  2. For each order, evaluate all rules:

    • Parse each condition against order data
    • Collect all matching tags
    • If skip_tagged: true, exclude tags already present on the order
  3. If dry_run: true: report matches without applying If dry_run: false:

  4. OPERATION: orderUpdate — mutation (for each order needing new tags) Inputs: { id: <order_id>, tags: <existing_tags + new_tags> } Expected output: Updated order with new tags Batch: Process in batches of 10 to respect rate limits

GraphQL Operations

# orders:query — validated against api_version 2025-01
query OrdersForTagging($query: String!, $after: String) {
  orders(first: 250, after: $after, query: $query) {
    edges {
      node {
        id
        name
        tags
        totalPriceSet { shopMoney { amount currencyCode } }
        shippingAddress { countryCode provinceCode }
        customer { id numberOfOrders }
        displayFinancialStatus
        displayFulfillmentStatus
        riskLevel
        discountCodes
        lineItems(first: 20) {
          edges {
            node {
              product { productType }
              quantity
            }
          }
        }
      }
    }
    pageInfo { hasNextPage endCursor }
  }
}
# orderUpdate:mutation — validated against api_version 2025-01
mutation TagOrder($input: OrderInput!) {
  orderUpdate(input: $input) {
    order { id name tags }
    userErrors { field message }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: Automated Order Tagger               ║
║  Store: <store domain>                       ║
║  Mode: <DRY RUN | LIVE>                      ║
║  Started: <YYYY-MM-DD HH:MM UTC>             ║
╚══════════════════════════════════════════════╝

After each step, emit:

[N/TOTAL] <QUERY|MUTATION>  <OperationName>
          → Params: <brief summary of key inputs>
          → Result: <count or outcome>

On completion, emit:

For format: human (default):

══════════════════════════════════════════════
ORDER TAGGING REPORT  (<days_back> days, <mode>)
  Orders scanned:    <n>
  Orders matched:    <n>
  Tags applied:      <n>  (or "would apply" in dry run)
  ─────────────────────────────
  RULE MATCHES:
    "high-value"       → <n> orders
    "international"    → <n> orders
    "first-time"       → <n> orders
    "repeat-buyer"     → <n> orders

  Output: order_tags_<date>.csv
══════════════════════════════════════════════

Output Format

CSV file order_tags_<YYYY-MM-DD>.csv with columns: order_id, order_name, existing_tags, new_tags, matched_rules

Error Handling

Error Cause Recovery
THROTTLED API rate limit exceeded Wait 2 seconds, retry up to 3 times
Invalid rule Unparseable condition Skip rule, warn in output
ACCESS_DENIED Missing write_orders scope Switch to read-only mode, report matches only

Best Practices

  • Always run dry_run: true first to preview changes.
  • Tags are additive — this skill never removes existing tags.
  • Use with order-risk-report to auto-tag risk levels.
  • Combine with downstream automation tooling for post-tagging actions (e.g., tag "high-value" → assign to VIP fulfillment queue).
  • Useful for filtering orders in Shopify admin — tags make complex order segments searchable.

Version history

  1. v1.1.0 GitHub ↗
    Original release notes

    ## 🤖 New category: Agentic Commerce Readiness The fix-it side of the [**agentiq.report**](https://agentiq.report) audit. The audit tells operators *where* AI shopping agents (ChatGPT, Gemini, Perplexity, agentic checkout) can't find, read, or recommend their store. This release adds **10 skills that remediate those findings** via the native Shopify Admin GraphQL toolkit — closing the loop: **audit finds the gap → run the matching skill → re-audit confirms.** Every skill declares the audit **signals** it fixes (`audit_signals` frontmatter), so a finding in the report maps directly to the skill that resolves it. ### Skills - **`agentic-readiness-audit`** — flagship, read-only store-side scorecard that routes each gap to its fix skill - **`agentic-product-jsonld-backfill`** — barcode/GTIN, vendor, product type for complete Product JSON-LD - **`agentic-image-alt-text`** — descriptive alt text on product media - **`agentic-description-enrichment`** — fact-rich descriptions for AI quoting - **`agentic-metafields-setup`** — define + populate agentic metafields for filtering - **`agentic-product-taxonomy`** — Shopify Standard Product Taxonomy categories - **`agentic-crawler-access`** — allow GPTBot/ClaudeBot/PerplexityBot… in `robots.txt.liquid` - **`agentic-llms-txt`** — publish a curated `/llms.txt` for AI assistants - **`agentic-organization-schema`** — Organization JSON-LD (sameAs, contactPoint) into the theme - **`agentic-policy-readability`** — machine-readable shipping/returns policies Plus a weekly **`agentic-readiness-monitor`** routine that re-audits and alerts on regressions. ### Stats **116 skills across 11 categories** (was 106/10), **21 routines** (was 20). All GraphQL validated against the live Admin 2025-01 schema; `pnpm validate:index` passes (116 skills, 64 operations). ### Notes Theme-editing and policy skills default to `dry_run`/`audit` mode, write inside managed `# BEGIN/END` blocks, and recommend duplicating the theme first.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决电商运营高频刚需:订单自动化分类与标记
  • 支持多维度业务规则(地理/金额/产品/客户等级/风险)
  • 提供 dry-run 安全预览机制,降低生产环境风险
Trigger Precision95/100

Highlights

  • 触发描述精准完整,覆盖所有核心功能维度
  • 边界清晰,无歧义或重叠风险
Structure and Standards90/100

Areas to improve

  • description重复定义 Reported severity: Minor

    顶层frontmatter和skill_body内部均包含description字段

    Recommendation: 建议移除skill_body内部的description字段以避免冗余

Highlights

  • Phase划分清晰,含查询→匹配→更新的完整工作流
  • 提供完整的参数表、规则格式示例和GraphQL操作定义
  • Session Tracking输出规范完善,便于调试和审计
Execution Reliability95/100

Highlights

  • API版本明确(v2025-01),工具来源可靠
  • 异常处理覆盖主要故障场景(限流/权限/规则解析错误)
  • 批处理控制和dry-run机制保障执行安全性
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders,write_orders` API scopes: `read_orders`, `write_orders`

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.