How can customers remove tags themselves?

Hello,

I am looking to create a button that allows customers to remove tags themselves. For example, assume the customer had a tag named “Frequent”, I would run:

{% if customer.tags contains 'Frequent' %}

{% endif %}

Is there anything I can do to achieve this?

I don’t think there’s a way to alter customer data via liquid, so you’d have to build a custom app that connects to the API.

Here’s how that would work:

  1. Build a private app exclusive to your store that has an endpoint to retrieve the removal request from your front end.

  2. When the user clicks that button, you send an http request via JavaScript, to your app with the customer ID + the tag name to remove.

  3. The app gets that request, and then updates the customer via the Customer API.

If you don’t want to go that route, you could brainstorm other ways to achieve your goal. For example, if this is to modify their email marketing status, check with your email marketing software, they may have a form to embed where the user can submit their preferences.