Best answer

Remove tag from Shopify customer once membership canceled

  • 1 October 2021
  • 7 replies
  • 332 views

Hi there,

I’m trying to remove a specific tag from a Shopify Customer when they cancel their membership. I can’t find any actions that do that. Any idea ?

Thanks

icon

Best answer by jayeshkumarbhatia 2 October 2021, 15:01

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @raoulbeltrame 

If there are no Shopify Zap actions available (e.g. Shopify Update Customer) to remove a Tag, then you’d likely have to explore leveraging the Shopify API.

App APIs can be used in Zap with the Code app or Webhooks app.

Code: https://zapier.com/apps/code/help

Webhooks: https://zapier.com/apps/webhook/integrations

 

Consider hiring a Zapier Expert if you need help: https://zapier.com/experts

 

Userlevel 6
Badge +6

Hey @raoulbeltrame ,

 

Shopify has all actions You can try below solution.

 

Action 1 - First find the customer This action will give all the Tags for that particlar customer.

 

 

Action 2 - To remove the tag from all the Tags in Action 1, use Code by Zapier and remove the Tag.

 

Action 3 - Update the customer with the updated Action 2 Tags.

 

Let me know if this works for you!

Thank you, the problem is that to use Code by Zapier I need to use JavaScript and I never code it …so I really don’t know how to start! Is there a JavaScript function already in place that I can use ? Thanks again for your help

Userlevel 6
Badge +6

Thank you, the problem is that to use Code by Zapier I need to use JavaScript and I never code it …so I really don’t know how to start! Is there a JavaScript function already in place that I can use ? Thanks again for your help

 

Hey, There are Javascript code avaiable online. What is the tag name that you want to remove? I can share the code with you shortly.

Thank you so much!

the tag name is “monthly-plan”

really appreciate it!

Userlevel 6
Badge +6

You can try below code.

Below is the screenshot. The tags on Shopify are Tag1,Tag2 and i want to remove Tag1

 

On running the code, it gave me the output like below.

 

 

Below is the Javascript code. Replace Tag1 with monthly-plan on 3rd line in your Javascript code

 

var tags = inputData.tags

var arrayTags = tags.split(',');

var final = arrayTags.filter(e => e !== 'Tag1');

final = final.toString();

output = {final,final}

 

Let me know if this works for you. 

Works PERFECTLY  !

Thank you so much @jayeshkumarbhatia