This tutorial demonstrates one example where the Rules Engine may be used to detect inconsistencies with source Salesforce.com (SFDC) data that Gainsight leverages. Parts of Gainsight application may expect source data to be in a particular form to process accurately.  In this example, an administrator may want to set up CoPilot to process titles (such as “Executive”) and finds fewer candidates than expected!  Gainsight pulls from the SFDC instance and if the source SFDC instance does not have standardized titles, CoPilot will miss contacts.  The administrator wants to anticipate and potentially normalize source data to help their CSMs.

Complexity Medium
Description Employ a custom field to allow field comparisons upon update
  • Normally, a Salesforce Administrator should implement a validation rule within SFDC that would ensure that titles or other fields are consistent. 

  • Sometimes you as Gainsight Administrator may not have control over this, hence why Gainsight can be used for these kinds of things.

  • Difference is that the person using SFDC would have to change the value
  1. Create a rule that looks at the source field in SFDC and compare to a pre-defined list of titles.
  2. Create a CTA for an Admin (or CSM) to address  inconsistencies.


  • This tutorial is presented for educational purposes only.
  • Gainsight recommends you to always test the rules before running them in a production environment.
  • Understand your Salesforce environment before performing any operations which may affect your data.

Perform the following steps to use the rules to detect data issues in Salesforce.com.

  1. Perform the pre-work. A demo/test environment has been used to design this tutorial. Some titles are changed in order to test desired outcomes. These steps are presented for completeness.
    1. Navigate to Setup > Build > Customize > Contacts > Fields.


  1. Find the Title field in SFDC. This is a free-form field to end-users. Unless there are restrictions put in place, a user may type whatever title they choose.
  1. Create a "Definitive List" of Titles. Gainsight’s Report Builder can quickly filter on titles within SFDC.  

To inspect titles,

  1. Navigate to Report Builder.
  2. Create a report with the following options:
    1. Select the Contact Object
    2. Show me:
      • Account ID Name
      • Title
    3. Filter:  Title != null
  1. Save as Contact Titles by Company.
  1. Create a Sampling of Contacts with Different Titles.

The following image shows an account that has four (4) CSMs listed.

In SFDC, alter some of the titles so there is a mix of expected and variations on titles
. In this case, instead of having four "CSM" titles there are now several other variants including "Customer Success Manager", "Cust. Succ. Man.", and "C Success M".
  1. Create a New Custom Rule Admin: Detect Bad Contact Titles.

custom rule.PNG

  1. Create Rule parameters.
Rule Parameters1.PNG
  • Using the CONTACT object (Native Data)

  • Show:

    • Contact::COUNT of Title

    • Contact::Account ID

    • Contact::Account ID Name

    • Account::CSM

      Note: This is important as this will be used for designating ownership

    • Account::CSM Name 

      Note: Good for testing - so we know to whom it is assigned

  • Filters

    • This is where you will list specific titles to match
 - only look for “CSM”
    • Contact::Title | not equal to | CSM
    • Customer Info:: Account Name | equals | <Name>
  • Select the Apply to Gainsight customers only check box.

For practical purposes (there may be a LOT of titles to work with), we will focus only on “Citrix”.

  1. Click PREVIEW RESULTS.  Three (3) titles that we entered incorrectly are displayed.

preview results.png
  1. Click NEXT  to navigate to Setup Action page where you click +ACTION.
  2. Select the Call to Action type and select the Create a CTA check box.
create a CTA from RE.png

Create a CTA with the following parameters:

  • Name:  Used to title your CTA. Type @ to see the options available for tokenized comments.
    • Include in identifiers: adds the CTA's name as part of the duplicate checker criteria for the Rules Engine. If there's an existing CTA for an account, but the CTA names have different values, then the rule will create the new CTA. If the CTA names are the same, and the CTA Type and Reason are the same, then a new CTA will not be created. The rule will simply update the existing CTA. The playbook chosen in this step will only be applied if a playbook was not previously assigned.
  • Priority:  Based on previously established Severity Types
  • Type:  Based on previously established Types
  • Status:  Based on previously established Status Types
  • Playbook: Optional.  Based on previously established Playbooks
  • Reason: Based on previously established Reason Types
  • Owner Field: Optional. From the account level can be based on any user lookup field.
  • Due Date: Run Date + x Days.  Drop-downs below address treatment of weekends.
  • Default Owner: Lookup field of all SalesForce Users. This will be used if the Task Owner field is not filled in OR if an account has not been assigned an owner.
  • Link to an existing "Linked Object": Multiple relevant objects can be linked in a rule. All Linked Objects that are linked to the CTA type, will be available in the drop-down. When a linked object is selected from the drop-down, Admins can choose the field to which it should be linked from the Show fields.
  • Post Update to Chatter: Used to control the frequency of Chatter updates.
  • Post Update to Comments: Used to control the frequency of Comments updates.
  • Comments: Optional and shows up in the comments section of the CTA. Type @ to see options available for tokenized comments.
  • Create CTA once in: Admins can select the Create CTA once in check box in the Create CTA action to prevent the creation of CTAs based on the timeframe selected. A separate check box will be available for separate actions.
  1. Click Run Now to allow the CTA to be created.

  2. Ensure that the CTA was created correctly by navigating to Cockpit and checking in the detail view.

IMPORTANT: A rule such as this may be scheduled, or may be run on-demand depending on circumstances.  Again, this is an example of a rule which may help a Gainsight Administrator to normalize or anticipate data coming from SFDC that may affect customers downstream (CSMs, etc.).