Skip to main content
Gainsight Inc.

Rules Engine - Folder and Task Creation

Gainsight NXT
Gainsight helps innovative companies protect and nurture their most valuable asset - their customers - with the power of our award-winning platform. With our Customer Success Solution, you can gain deeper insights into customer behavior, operationalize the customer lifecycle, and coordinate actions and results across teams.

This article supports Gainsight NXT, the next evolution of the Customer Success platform. New and upgraded customers are deployed on Gainsight NXT.

If you have not upgraded and are using Gainsight Salesforce Edition, you can find supporting documentation here.

Not sure what your team is using? Click here.

 

Create Tasks with Rules Engine

This article provides guidelines on how Admins fetch data from Matrix Data Architecture (MDA) and perform actions using Gainsight’s  Rules Engine that has the capability to transform fetched data in various ways and execute actions with a single Rule. Users can perform Historical Rule Executions faster using Rules Engine because of the data volume.

Before you start exploring how to create tasks using Rules Engine, ensure that you have read the Getting Started with Gainsight Rules article.

Folders in Rules Engine

Rules Engine allows you to create folders and organize your rules in folders. By default, Gainsight provides you a folder known as Uncategorized. You cannot delete this folder. By default, all the rules are part of this folder. If you do not specify a folder while creating a new rule, the rule becomes part of Uncategorized folder. All the folders are displayed in the left pane on the Rules List page. The folder to which a Rule belongs to is displayed against the Rule Name. 

clipboard_ec4e5cbef40bdf6246975be1ca7a8d26a.png

All the folders including the Uncategorized folder are part of the Home folder. Home is the master folder which contains all the folders. You cannot store a rule under the Home folder directly. You can only create folders under the Home folder. You cannot nest folders under the Uncategorized folder. 

22C82A9A-A7DD-4D97-956A-75388D700079.GIF

You can create new folders and move the existing rules into the new folder. You can nest a folder in another folder; up to a single level of nesting is allowed. You can perform the following tasks with folders.

  1. Create Folder

    To create a new folder:

    1. Click the + icon.

    2. Select the folder under which you want to nest this folder. If you do not select a folder name, the rule is stored under the Home folder.

    3. In the Folder Name field, enter a name for the folder.

    4. Click ADD.

CABCEEFF-997B-4EA0-9E72-C5DB35AB814C.GIF

A folder nested under another folder (and not directly under the Home folder), can have the same name as its parent folder. However, two custom folders which exist at the same level under the Home folder cannot have the same name. In the above scenario, you can nest a folder called Scorecard Rules under the existing Scorecard Rules folder. However, two folders which exist at the same level (under the Home folder) cannot have the same name. You cannot create another sub folder under the nested Scorecard Rules folder, since only two levels of nesting is allowed under the Home folder.

FA3AEF85-36C1-48FD-BEED-788F11702105.GIF

  1. Delete Folders

    You can delete a folder if it has no other sub folders under it or does not hold any Rules. You cannot delete the Uncategorized folder. To delete a folder, select the required folder and click the delete icon.

6EEB252F-60BF-4C62-86A7-F463D76EA218.GIF

  1. Move Rules to Folder

    Once you create a folder, you can move the Rules into the newly created folder. A rule cannot be part of multiple folders. To move the rules to a folder:

    1. Select the check box for the required rule(s).

    2. From the MOVE TO folder, select the required folder.

    3. Click OK.

58553EF3-9938-4F5A-A491-CA2D8201B2E5.GIF

  1. Folder for new Rules

    The New Rule page has the Folder field. You can now select a folder for the new rule. If no folder is selected, the Rule is moved to the Uncategorized folder.

7BA79706-CAEF-4128-A50C-3A70B5CBD3BB.GIF

Fetch Data

To create a Dataset:

  1. Navigate to Rules Engine > RULES LIST tab. 
  2. Click +RULE. The Create Rule screen is displayed.

clipboard_e9d58b21cbc1f47a42bc0c416c2ea3b7b.png

  1. Provide the following in the Create Rule screen:
  • Select the Rule for a Company.
  • Enter a Rule Name.
  • Select a folder for the rule.
  • Enter Description [Optional].

clipboard_e48ad42fc52dade8802c348ddd6d5fa9d.png

  1. Click NEXT. You are navigated to the Setup Rule screen.
  2. Click DATASET.

clipboard_eda883cf45d9d55b45af38b8af71fe842.png

  1. Enter the Task Name, Task Description, and Output Dataset Name. If you do not provide a value in the Task Name field, it is auto populated as per the format Fetch from <Object Name>; if you have used the Account object, the task name is auto populated as Fetch from Account (if you do not provide a Task name). 
    Note: Output Dataset Name auto populates from Task Name and it can be changed to different name. It has no dependency on Task Name.
    In this use case, the following details are used:
  • Task Name: Fetch from usage data [Maximum 80 characters and should be Alphanumeric; _ and space are supported]
  • Task Description: Usage data fetch [ Maximum 200 characters]
  • Output Dataset Name: Usage Data [Maximum 60 characters and should be Alphanumeric; _ and space are supported]. This gets pre-populated with the task name by default.

Matrix Data is the default Data source for all the Rules. For more information about the MDA objects and the fields used in Gainsight, refer <Gainsight Object Glossary> (TBA).

Task name.png


Click here to expand for more information about creating Rules from Dataset 
You can also use the Salesforce connection as data source. When you select this data source, you can use objects from Salesforce to build the rule. The source name is same as the Salesforce Connection name.

Dataset from SFDC.GIF

In the above image, the Salesforce Connection name is Salesforce. Hence the source name is displayed as Salesforce.

  1. Select Usage Data as the source object from Matrix Data. The fields available in the Usage Data data source are displayed in the drop-down list.

Selecting Usage Data Object.png

  1. Drag and drop the following fields from Usage Data in the Show section:

Configuring Show sections.png

  1. Drag and drop fields in the Filters section and apply logic as required. Advanced logic AND is applied on the selected filters automatically in the Advanced Logic section. You can modify the logical operator to OR. Advanced Logic is not case-sensitive in Setup Rule.

Fetch data_7.png

  1. Click SAVE to create the task as configured. This task is now available for you to proceed further. You can also click PREVIEW to view the task results in a new window. To navigate back to Tasks list, click <- icon.

Saving and Previewing.png

The following are the limitations in task creation:

Task Number Comments
Max # of tasks allowed 15  
Max # of Show fields in each task 50 In Pivot task, we can pivot on a field using 200 cases
Max # of Group by fields in transformation tasks 10  
Max # of filters allowed in each task 26 This limit is in filters of every task.
Max # of results displayed in Preview Results 100  

Fetch Data from S3 Bucket

Gainsight allows you to import data from Amazon S3 bucket. A S3 dataset task is specifically designed to configure and fetch data from Amazon S3 bucket. The source files can be stored in Gainsight bucket or any of your custom bucket. To learn more about, creating S3 Dataset tasks, refer the S3 Dataset in Rules Engine article.

Transform Data

You can also perform Transformation Tasks in Rules Engine. Transformation tasks supported in Rules Engine include Merge, Transformation, and Pivot. Group by Date and DateTime includes various functions at Day, Week, Month, Quarter, and Year. You can add Date field in the GroupBy section in any of the Transformation tasks (Aggregate/Pivot). For more information about custom grouping, refer to the <<Custom Grouping, Time Series, and Pivoting article>>(TBA). For more information about how you can transform data into a polished, actionable dataset in Rules Engine using the Merge, Pivot, and Transformation options, refer the following articles.

  • Was this article helpful?