Skip to main content
dan
Contributor ⭐️⭐️
October 16, 2015
Question

Removing Tags Via Rule

  • October 16, 2015
  • 14 replies
  • 176 views
Has anyone found a good way to remove tags via rules engine? We can easily add them, but could not find a way to delete them or replace them over time. We are looking to create some custom dashboards using a set of specific tags, but they would need to be dynamic for changing conditions.

14 replies

smorrisgainsightcom
Helper ⭐️⭐️⭐️
October 16, 2015
Hi Daniel!  Are you looking to remove all tags from Customers or just a subset?

If you want to do a total wipe of all tag records, you could execute this type of script in Workbench or Developer Console:

List<JBCXM__CustomerInfo__c> UDToUpdate = new List<JBCXM__CustomerInfo__c>();
for(JBCXM__CustomerInfo__c UD : [SELECT JBCXM__Tag__c FROM JBCXM__CustomerInfo__c])
{
UD.JBCXM__Tag__c = null;
UDToUpdate.add(UD);
}

System.debug('Records to Update: ' + UDToUpdate.size());
update UDToUpdate;

If you wanted to only do this for a subset of Accounts, you can add a WHERE clause to further parse down the data that is being removed.

Let me know if this helps.
matthew_lind
VIP ⭐️⭐️⭐️⭐️⭐️
October 19, 2015
Scott, would you clarify for us (Dan and me), can this be done in the Gainsight rules engine? We asked Support, and they said no.
Making people their best....currently disguised as a CS Ops Architect. How can I contribute to your success?
smorrisgainsightcom
Helper ⭐️⭐️⭐️
October 20, 2015
Matt there currently is not a way to remove values via the Rules Engine from the Tag field.  Feel free to shoot me an email smorris@gainsight.com if you'd like to discuss specifics around the script further.
ellenoangieslistcom
Contributor ⭐️⭐️⭐️⭐️⭐️
January 6, 2016
Is there a way to do this via Apex Data Loader instead of Workbench?  
lane_h
Helper ⭐️
January 29, 2016
Hey Scott, Has there been any progress toward automating removal of tags via a rule? Or do you have a suggestion for if we are tracking "At Risk" through a tag what a better way would be?
Director of CX and Scale Programs
smorrisgainsightcom
Helper ⭐️⭐️⭐️
February 1, 2016
Hi Ellen you could do this via a data loader.  Are you using Jitterbit?
smorrisgainsightcom
Helper ⭐️⭐️⭐️
February 1, 2016
At this point there isn't a better way to do it via the Rules Engine since we are dealing with a Multiselect Picklist field type.  You could utilize a custom checkbox field on the Customer Info record to mark a customer as "At Risk".  You could also have a rule that unchecks the box to make sure all "true" records are accurate daily.
ellenoangieslistcom
Contributor ⭐️⭐️⭐️⭐️⭐️
February 1, 2016
I use either Apex data loader and dataloader.io
sam_leonard
Contributor ⭐️⭐️⭐️
May 2, 2016
Hi Scott-

bumping this old topic, i think this solution might work for something I'm trying to do. Would this be a field that would be added in SFDC and imported into GS or is there an easy way to create a checkbox in GS?

Thanks
smorrisgainsightcom
Helper ⭐️⭐️⭐️
May 2, 2016
Hi Sam:

You can add the field to the Customer Info object under Setup -> Create -> Objects in SFDC.  I'd make the default value of the boolean field "unchecked" then from there you can have a rule update the checkbox to be true.  Alternatively you can add the checkbox to the Account object, but typically most customers prefer not adding fields to the Account.  Once this field is added to the Customer Info object you'll be able to then use it in reports and rules.  Let me know if you have any questions!

Scott