1. Home
  2. Docs
  3. Flexie CRM Methods
  4. addTag method

addTag method


addTagAdds a tag and preserves the previously set tags.


Tags are a way to organize data and segment information within your company. You can generate smarts lists of leads, contacts etc by filtering with tags.

Minimum number of  arguments for this method is two.

Structure of the method:

addTag(tags, newTagValue)


tags— this matches the tags field. It will be the name of the field that you will be using to hold tags.

newTagValue— The new tag we want to add


In the example below, we add a tag and see that the end result is all the tags comprising the newly added

{%set allTags = addTag(tags, 'Email#5')%} 

//Output: will output all the tags comprising Email#5 separated by pipe

In this example we will show how to add tags when you are dealing with another entity.

Consider you are dealing with Deals Entity. As one deal may be associated with many leads, we need to get the right lead that we want to add tags to.

leads — is a variable holding a collection of leads associated with the deal
leads[0] — is the first lead from the leads collection
leads[0].tags — is the lead field holding tags

{%set allTags = addTag(leads[0].tags, 'Email#5')%}

//Output: will output all the tags comprising Email#5 separated by pipe

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?