shopify-admin-bulk-customer-tag-update
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-bulk-customer-tag-update" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e4101295e17b6e1fbee4190800f268fba0c6a137ed646d046591976732893052. 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
Add and/or remove tags on a filtered set of customers, supporting query-based selection, explicit ID lists, and tag merge or replace modes.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Adds and/or removes tags across a filtered set of customers — supports query-based selection, explicit ID lists, and union/replace tag modes.
- Inputs and outputs
- CSV file `bulk_tag_update_<YYYY-MM-DD>.csv` with columns: `customer_id`, `name`, `email`, `previous_tags`, `tags_added`, `tags_removed`, `new_tags`, `status` The `status` column reports `updated`, `noop`, or `error: <message>`.
- Software, accounts and paid services
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_customers,write_customers` API scopes: `read_customers`, `write_customers`
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-bulk-customer-tag-update
role: customer-support
description: "Adds and/or removes tags across a filtered set of customers — supports query-based selection, explicit ID lists, and union/replace tag modes."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- customers:query
- customerUpdate:mutation
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
Applies bulk tag changes (add, remove, or both) to customers selected by a query filter (e.g., total_spent:>=500, tag:newsletter) or by an explicit list of customer GIDs. Tags are how Shopify segments customers for discounts, marketing, and support workflows; this skill makes batch changes safe, dry-runnable, and auditable. Use when migrating from one tag taxonomy to another, when retiring a campaign-specific tag, or when applying a new segment tag identified by an analytics report.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_customers,write_customers - API scopes:
read_customers,write_customers
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 |
| dry_run | bool | no | true | Preview matching customers and the planned tag changes without executing mutations |
| filter | string | conditional | — | Customer query filter (e.g., tag:newsletter, total_spent:>=500); required if customer_ids is omitted |
| customer_ids | array | conditional | — | Explicit list of customer GIDs; required if filter is omitted |
| add_tags | array | no | [] | Tags to add (union with existing tags) |
| remove_tags | array | no | [] | Tags to remove (set difference) |
| mode | string | no | merge | Tag write mode: merge (apply add/remove to existing) or replace (overwrite tags entirely with add_tags only) |
| max_customers | integer | no | 1000 | Run-size cap; abort if filter matches more than this |
Safety
⚠️ Step 2 executes one
customerUpdatemutation per customer in the matched set. Tag changes are immediate and visible to staff and to any apps reading customer tags (loyalty, marketing automation, segmentation).mode: replaceoverwrites existing tags entirely — manually-applied operational tags will be lost. The default isdry_run: trueandmode: merge. Always run dry-run first, review the matched count, and confirmadd_tags/remove_tagsare spelled correctly — Shopify tags are case-sensitive.
Workflow Steps
-
OPERATION:
customers— query Inputs: Whenfilteris set:query: <filter>,first: 250, pagination cursor. Whencustomer_idsis set: batch query withquery: "id:<id1> OR id:<id2> ..."(chunk into batches of 25 IDs). Selectid,displayName,defaultEmailAddress { emailAddress },tags. Expected output: Customer list with current tags. Abort ifmatch_count > max_customers. -
For each matched customer, compute the target tag set:
- If
mode: merge:target = (existing ∪ add_tags) \ remove_tags - If
mode: replace:target = add_tags(remove_tags ignored) Skip the customer iftarget == existing(no-op).
- If
-
OPERATION:
customerUpdate— mutation Inputs: For each customer with a non-empty diff:input: { id: <customer_id>, tags: <target_tag_array> }Expected output:customer.id,customer.tags,userErrors; collect failures
GraphQL Operations
# customers:query — validated against api_version 2025-01
query CustomersForBulkTagging($query: String!, $after: String) {
customers(first: 250, after: $after, query: $query) {
edges {
node {
id
displayName
firstName
lastName
defaultEmailAddress {
emailAddress
}
tags
numberOfOrders
amountSpent {
amount
currencyCode
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
# customerUpdate:mutation — validated against api_version 2025-01
mutation CustomerTagsUpdate($input: CustomerInput!) {
customerUpdate(input: $input) {
customer {
id
displayName
tags
}
userErrors {
field
message
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Bulk Customer Tag Update ║
║ Store: <store domain> ║
║ 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>
If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.
On completion, emit:
For format: human (default):
══════════════════════════════════════════════
BULK TAG UPDATE OUTCOME
Filter: <filter or "<n> explicit IDs">
Mode: <merge|replace>
Add tags: <list>
Remove tags: <list>
Customers matched: <n>
Customers updated: <n> (or "skipped — dry_run")
No-op (already in state): <n>
Errors: <n>
Output: bulk_tag_update_<date>.csv
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "bulk-customer-tag-update",
"store": "<domain>",
"started_at": "<ISO8601>",
"completed_at": "<ISO8601>",
"dry_run": true,
"mode": "merge",
"outcome": {
"matched": 0,
"updated": 0,
"noop": 0,
"errors": 0,
"add_tags": [],
"remove_tags": [],
"output_file": "bulk_tag_update_<date>.csv"
}
}
Output Format
CSV file bulk_tag_update_<YYYY-MM-DD>.csv with columns:
customer_id, name, email, previous_tags, tags_added, tags_removed, new_tags, status
The status column reports updated, noop, or error: <message>.
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
userErrors on customerUpdate |
Invalid input or read-only customer | Log error, skip customer, continue |
match_count > max_customers |
Filter is too broad | Refine filter or raise max_customers deliberately |
Both filter and customer_ids empty |
No selection | Abort with parameter error |
| Tag is empty string | Whitespace-only entry | Strip and skip empty values |
| Case-mismatched remove_tag | Tags are case-sensitive | Re-run with exact casing |
Best Practices
- Always run with
dry_run: truefirst — review the matched count and a sample ofprevious_tags→new_tagsdiffs before committing. - Prefer
mode: merge(the default) for almost all use cases —mode: replaceis appropriate only when fully resetting a customer's tag taxonomy and you have an audited backup of prior tags. - Tags are case-sensitive:
VIPandvipare distinct in Shopify. Standardize casing in your taxonomy. - For ongoing operational segments, prefer date-stamped tag names (e.g.,
cohort-2026-Q2) so historical cohorts remain identifiable as new tags accumulate. - Pair with
vip-customer-identifierorcustomer-spend-tier-taggerto feed segment tags from analytics outputs into the customer record. - Use
remove_tagsas the cleanup pass after a campaign — leaving stale campaign tags clutters segmentation in marketing tools. - When
customer_idsis supplied directly (e.g., from another skill's CSV), the run is fully deterministic — no filter ambiguity.
Version history
-
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
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决电商运营中的高频刚需场景(客户分群、营销活动、折扣发放),显著提升日常运营效率
- 功能完整、逻辑闭环、有明确的应用场景和最佳实践指导
Highlights
- description 明确描述了功能:添加/移除标签、查询筛选、ID 列表、合并/替换模式
- 覆盖了主要功能点,边界清晰,不易与其他 Skill 混淆
Highlights
- 文档结构完整:Purpose、Prerequisites、Parameters、Safety、Workflow Steps、GraphQL Operations、Session Tracking、Output Format、Error Handling、Best Practices
- 有明确的 Phase/步骤划分、出口条件、端到端示例、frontmatter完整、单文件合理长度
Highlights
- 工具来源明确(Shopify Admin API),参数正确(详细参数表)
- 覆盖主要异常(THROTTLED, userErrors, match_count > max_customers, empty filter/customer_ids, empty tag, case-mismatch)
- 不可逆操作有确认机制(默认 dry_run: true,Safety 警告强调先运行 dry-run)
- 有重试机制、错误日志记录、输出文件记录操作结果
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.
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_customers,write_customers` API scopes: `read_customers`, `write_customers`
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.