--- title: "Create Tasks in Rules Engine" slug: "create-tasks-in-rules-engine" updated: 2026-11-23T12:31:41Z published: 2026-11-23T12:31:41Z canonical: "support.gainsight.com/create-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. # Create Tasks in Rules Engine ## 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, which 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 the 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. ## **Fetch Data** To create a Dataset: 1. Navigate to **Rules Engine > Rules List** tab. 2. Click **Create Rule**, then click on Horizon Rule from the drop-down ![clipboard_ea2b89cfce09cb874667726ac5fb046f2.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_ea2b89cfce09cb874667726ac5fb046f2.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=IZJTS%2Foh0RYX9WRh9pG2GExzfxX7CH1MlWSEFrh0YGs%3D) 3. Provide the following in the **Create Rule** screen: ![clipboard_e728085a3d3cdcfe44f157b267ce483c1.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e728085a3d3cdcfe44f157b267ce483c1.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=5bOVwmcBxprZxjJCGXVHI4JlSQIpbRijF%2Bl%2BxRQpOQM%3D) - Select the Rule for a Company. - Enter a **Rule Name**. - Select a folder for the rule. - Enter **Description** *[Optional]*. 4. Click **Continue**. You are navigated to the Setup Rule screen. 5. Under Data Setup, Click **Prepare Dataset**. ![clipboard_ed67c21516c76b18d5186012d1bb88435.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_ed67c21516c76b18d5186012d1bb88435.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=qPMUBnSOwS6DrtN4HIjPhD2jPih8y6EsooXpYN9qL60%3D) **IMPORTANT:** It is mandatory to have only one output task to execute actions. Ensure to use the Merge task, if there are more than one output task. Matrix Data is the default Data source for all the Rules. ![clipboard_e540c0eb2408c5112c888f54d7b6a982d.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e540c0eb2408c5112c888f54d7b6a982d.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=aX65xYefJTEKSjRg%2FnyblHcWCXoi5eorvdAMnYnP6zk%3D) Gainsight NXT in Salesforce CRM Content in this section supports Gainsight NXT accessing through Salesforce Login. To learn more about Gainsight NXT in Salesforce, click [here](/docs/create-tasks-in-rules-engine#). **Click here to expand for more information about creating Rules from Dataset** You can also use the Salesforce connection as a data source. When you select this data source, you can use objects from Salesforce to build the rule. The source name is the same as the Salesforce Connection name. 6. 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. ![clipboard_e6647ad0b22cd245a7aed8efd50c3195c.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e6647ad0b22cd245a7aed8efd50c3195c.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=c4E%2BaaUu9SCzPkBL1JXzMAy4Er05eePsHa%2FcfxuSksU%3D) 7. Drag and drop the following fields from **Usage Data** to the Canvas section and select the required **Fields**. ![clipboard_e77040fe3d0a02d4e2082538fab00f1ca.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e77040fe3d0a02d4e2082538fab00f1ca.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=IqbLBudoxyf2SlMqRX3HFUbgSVs7hAVgtTmFRAToWoA%3D) 8. Click the **Filters** tab, then click **Add Filter**. 9. Select the filters from the drop-down and apply the required logic. ![clipboard_ea3c827237f616034d1acc8029614d4e7.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_ea3c827237f616034d1acc8029614d4e7.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=XjHcbfFxvXVb6xS%2FQDS1Q0TRNv20%2FNl2Pkv2bEMBiE0%3D) **Important:** Advanced logic **AND** is applied to the selected filters automatically in the **Advanced Logic** section. You can modify the logical operator to OR. Advanced Logic is not case-sensitive in the *Setup Rule*. 10. Click **Save** to create the task as configured. This task is now available for you to proceed further. ![clipboard_e9f8ba1e2dbd827c55498ebd8a6782b4b.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e9f8ba1e2dbd827c55498ebd8a6782b4b.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=0uBWUVFxTjxN7NBQbyo%2FteBerUaCc7ka%2F6HbhiPuilY%3D) **Note:** - If the rich text fields are added in the **Usage data** of a rule task, the **Don’t include HTML tags** checkbox is enabled. Admins can select this option if they want to remove the HTML tags from Rules Engine. - Admins can select the **Notes Plain-Text** field to export the notes field without HTML tags when importing data from the **Activity Timeline** object. 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 Gainsight PX Custom Events** Admins can now fetch custom event data including Account/User and Global context attributes for custom events from Gainsight PX custom events and perform any actions in Rules Engine. In the Setup Rule screen, admins can select the PX Connection and Product Name, for which all the configured events are displayed for selection. Like any other source/object, admins can add show fields/filters based on the selected event properties and also perform merge/transform tasks. To fetch PX usage data, admins must configure the PX Connector in the Gainsight CS application. For more information, refer to the *Gainsight PX Connector* article. **Limitations:** Following are some of the limitations in using PX usage data: - The Date field is mandatory and it must be bounded such that you need to have a start date and end date. - Only the data from the past 180 days is considered. - Event level data is not supported. Gainsight always aggregates EventID to Count (EventID) when dropped in the Show section. - Only 100K records are fetched per rule. ![clipboard_e3205e3e04cf268cf697de1b1b7eb9d65.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/clipboard_e3205e3e04cf268cf697de1b1b7eb9d65.png?sv=2026-02-06&spr=https&st=2026-11-24T16%3A11%3A45Z&se=2026-11-24T17%3A11%3A45Z&sr=b&sp=r&sig=Oze3733m8sRSF%2F3ysT2qT9UiGv%2FDBIr3XbeIGFl1KpA%3D) ## **Fetch Data from S3 Bucket** Gainsight allows you to import data from the Amazon S3 bucket. An S3 dataset task is specifically designed to configure and fetch data from the Amazon S3 bucket. The source files can be stored in the Gainsight bucket or any of your custom buckets. For more information on how to create S3 Dataset tasks, refer to 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 how you can transform data into a polished, actionable dataset in Rules Engine using the Merge, Pivot, and Transformation options, refer to the following articles. - *Merge Tasks in Rules Engine* - *Pivot Tasks in Rules Engine* - *Transformation Tasks in Rules Engine*