Skip to main content

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

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

 


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


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!


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