Customer cleanup guide
How to add a tag to many Shopify customers without losing data
What you’ll need
Your customers export CSV
How to get this: Your customers export CSV
- Customers › Export › All customers (keep Customer tags ticked) › Export customers.
- More than 50 customers arrive by email.
Shopify’s free GraphiQL app (with only to tag them: write_customers access)
How to get this: Shopify’s free GraphiQL app
- Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
- Then open it any time from Apps › Shopify GraphiQL App in your admin.
Why full rows
Shopify’s help says overwriting replaces all of a customer’s data, including tags. A file with only names, Email and Tags erases the customer’s default address and replaces their tags, so this file keeps every column from your export.
CSV route
- Export customers with tags.
- Build the tag file, import the 1-customer test with Overwrite ticked, and check that customer.
- Import the rest. Files are split under Shopify’s 15 MB limit.
GraphQL route
tagsAdd takes a customer ID and a list of tags and keeps the existing ones. It needs the write_customers scope.
mutation TagSuspectedBots {
c4: tagsAdd(id: "gid://shopify/Customer/7612345678903", tags: ["suspected-bot"]) {
node { id }
userErrors { field message }
}
}Undo
Run the downloaded tagsRemove batches, or use Remove tags on the segment in the admin.