--- title: "Transformation Tasks in Rules Engine" slug: "transformation-tasks-in-rules-engine" updated: 2026-11-23T12:31:41Z published: 2026-11-23T12:31:41Z canonical: "support.gainsight.com/transformation-tasks-in-rules-engine" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Transformation Tasks in Rules Engine This article explains how you can create Transformation tasks in Rules Engine. ## Advantages - 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*](/v1/docs/formula-fields-in-rules-engine) article. ![Matrix data_1.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Matrix_data_1.png?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=bh7d6KCBVNLDmK4nTbgt05gABX2H5DzpP0zm3RC99hI%3D) - 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: [Embedded content](https://player.vimeo.com/video/565509354) - **Rule For**: Company - **Rule Name** Use Case - **Folder**: Select a folder for the rule. - *(Optional)* **Description:** Enter a description for the rule**.** 4. Click **NEXT**. The **Setup Rule** screen is displayed. 5. Click **DATASET**. ![clipboard_eda883cf45d9d55b45af38b8af71fe842.png (1839×595) 2023-03-01 at 7.34.12 PM.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_eda883cf45d9d55b45af38b8af71fe842.png_(1839%C3%97595)_2023-03-01_at_7.34.12_PM(2).jpg?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=m47NM%2FwAIMk9evktQ8mukfXA0tJ2%2FRjpNm4grE1CykQ%3D) ### Configure DataSet (Fetch Task) 1. In the Dataset task, enter: - **Task Name** - *(Optional)* **Task Description** 2. 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*](https://support.gainsight.com/gainsight_nxt/02Data_Management/Old_Data_Management_-_Archived/Managing_Data_In_Gainsight/01Gainsight_Data_Management) article to learn how to create, Custom Objects, Custom Fields, and insert data into Custom fields. ![Usage data.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Usage_data.gif?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=jBUR4nUIHzwI5M%2BFeCJYIQqxsk5aEUtgeqj3kYcIjz4%3D) 3. Add the following fields, in the **Show** section. - Date Field - GS Created Date - GS Modified Date - Views - Page name - Company Name 4. Click **SAVE**. 5. Click **<- ,** to go back. ![Save.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Save.gif?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=BG%2BR%2BVqWZN%2BK75CU6GeU5YW%2BLEYwCzOrYswcueo7nV0%3D) ### 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**. ![Transformation_7.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Transformation_7.png?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=7b1IfQjRrtD%2Bz7lE%2Fr5JSFXq7W1U20ZC8LqgoPtzsh4%3D) 2. 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 3. Add Company Name to the **GroupBy** section. ![Groupby_8.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Groupby_8.gif?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=2%2FFMUBgg%2FydHqAqZnEfs3WvyNx9l10NxI%2B8Kdal52Fc%3D) 4. Select **Count_distinct of views** for **Views** field, in the **Show** section. ![Distinct of views_9.gif](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Distinct_of_views_9.gif?sv=2026-02-06&spr=https&st=2026-11-24T17%3A10%3A45Z&se=2026-11-24T18%3A10%3A45Z&sr=b&sp=r&sig=5Zxy%2FMEJ0qW51FmF1uWid1936zitmSHLClh1P6GCkME%3D) 5. Click **SAVE**. You can now set up an **Action** on the output dataset. **See Also**: - [*Rules Create Tasks in Rules Engine*](/v1/docs/create-tasks-in-rules-engine) - [*Merge Tasks using Rules Engine*](/v1/docs/merge-tasks-using-rules-engine) - [*Pivot Tasks in Rules Engine*](/v1/docs/pivot-tasks-in-rules-engine) - [*Aggregate* *Usage Data with Rules Engine*](/v1/docs/aggregate-usage-data-with-rules-engine) - [*Formula Fields in Rules Engine*](/v1/docs/formula-fields-in-rules-engine)