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
    1. Customers › Export › All customers (keep Customer tags ticked) › Export customers.
    2. More than 50 customers arrive by email.

    Step-by-step guide (opens in a new tab)

  • Shopify’s free GraphiQL app (with only to tag them: write_customers access)

    How to get this: Shopify’s free GraphiQL app
    1. Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
    2. Then open it any time from Apps › Shopify GraphiQL App in your admin.

    Step-by-step guide (opens in a new tab)

Tag customers safely

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

  1. Export customers with tags.
  2. Build the tag file, import the 1-customer test with Overwrite ticked, and check that customer.
  3. 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.

One aliased call per customer
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.

More guides