Contact Upsert Should Add Tags Instead of Overwriting or Replacing Them
D
Donald Moore
Whenever you make a call to HighLevel to "upsert" a contact, the current behavior is that any tags that you pass will overwrite/replace (ie. remove current tags) that contact's tags instead of adding the tags that you pass.
Upserts should be additive and should not remove, overwrite, or replace elements from objects, but rather insert them as necessary.
Remove current tags - BAD
Add more tags - GOOD
Another way to do this would be to add a junction (aka "pivot") table for tags that belong to a contact and just add the tags to a junction table, but since we're placing the Array object "Tags" directly on the contact's record instead of creating a separate object and referencing it (like you would in an RDBMS), the "Upsert" function should do something like the following:
contact.tags = [...foundContact.tags, ...newTags]
Log In
P
Phil Smith
Any update on this? This is very frustrating. I use the api for several clients to add leads to the system. I have to create workflows to restore removed tags
K
Kofi Akyeampong
Its definitely frustrating. Been trying to update tags using Make (Integromat) and it always overwrites existing tags
P
Phil Young
The default behavior for upsert should definitely be to only add tags. Overwriting current tags is extremely counterintuitive.