Skip to main content
Gainsight Inc.

Transformation Tasks in Rules Engine

Gainsight NXT


This article explains how you can create Transformation tasks in Rules Engine.


  • A very powerful aggregation machine in Rules Engine.
  • Enables you to summarize data in various methods.
  • Enables you to aggregate data, apply various formulae on data. For more information about the Formula Fields, refer to the Formula Fields in Rules Engine article.

Matrix data_1.png

  • A Rule is demonstrated here and in this rule, you can count unique Pageviews for every page by different customers.

Create Rule

To create a Rule:

  1. Navigate to Administration > Rules Engine.
  2. Click Create Rule.
  3. In the Create Rule screen, enter: 
  • Rule For: Company
  • Rule Name Use Case
  • Folder: Select a folder for the rule.
  • (Optional) Description: Enter a description for the rule.
  1. Click NEXT. The Setup Rule screen is displayed.
  2. Click DATASET.

clipboard_eda883cf45d9d55b45af38b8af71fe842.png (1839×595) 2023-03-01 at 7.34.12 PM.jpg

Configure DataSet (Fetch Task)

  1. In the Dataset task, enter:
  • Task Name
  • (Optional) Task Description  
  1. Select Usage Data as the source object.
    Note: Usage Data is a Custom object. If you do not find this object in the Objects list, you have to create the Object. Refer to the Gainsight Data Management article to learn how to create, Custom Objects, Custom Fields, and insert data into Custom fields.

Usage data.gif

  1. Add the following fields, in the Show section.
  • Date Field
  • GS Created Date
  • GS Modified Date
  • Views
  • Page name
  • Company Name
  1. Click SAVE.
  2. Click <- , to go back.


Transformation Task - Data Aggregation

In the aggregation task,  page views are aggregated against Company and Page name, in order to view unique page views for every page by various customers.

  1. In the Setup Rule screen, navigate to + TASK > Transformation.


  1. Enter:
  • Task Name
  • (Optional) Task Description
  1. Select Fetch data as the source object of the dataset.
  2. Add the following fields to the Show section:
  • Company Name
  • Page Name
  • Views
  1. Add Company Name to the GroupBy section.


  1. Select Count_distinct of views for Views field, in the Show section.

Distinct of views_9.gif

  1. Click SAVE.

You can now set up an Action on the output dataset.

See Also:

  • Was this article helpful?