Gainsight Standard EditionThis article supports Gainsight Standard Edition. This Edition is built on Gainsight's state of the art Matrix Data Architecture (MDA) platform, and is designed for customer success professionals for driving revenue, increasing retention, and scaling operations. To learn more about Gainsight Standard Edition, click here.
If you are using Gainsight Salesforce Edition, which is built on Salesforce and customer business data is stored in SFDC, you can find supporting documentation here.
Merge Tasks with Rules Engine
Gainsight’s Rules Engine integrates raw customer data into Gainsight and design multi-step data transformations with a merge option that transforms the data into a polished, actionable dataset.
Note: Merging a dataset to itself (Self-Merge) is not supported in Rules Engine.
Create a Rule
- Navigate to Rules Engine > RULES LIST tab.
- Click +RULE.
- In the Edit Rule screen, enter the required information in the fields available. In this use case, the following information is used as example:
- Rule For: Company
- Rule Name: Merge task
- Description: [Optional]
- Click NEXT. The Setup Rule screen is displayed.
Create Data Set 1 (Fetch Task 1)
- Click DATASET TASK to create data set 1.
- Enter Task Name (here it is Fetch from Company Object), Task Description (Optional), and Output Dataset Name (here it is Fetch from Company).
- Select Company as the source object, add fields in the Show/Filters sections and click SAVE.
- Click <- to go to the Setup Rule screen where you can view the first fetched dataset that is performed in this Rule.
Create Data Set 2 (Fetch Task 2)
- Click +TASK > Dataset to create data set 2.
- Enter Task Name (here it is fetch from Survey Participant), Task Description (Optional), and Output Dataset Name (here it is fetch from mda).
- Select Survey Participant as the source object, add fields in the Show/Filters sections and click SAVE.
- Click <- to go to the Setup Rule screen where you can view the second fetched data set that is performed in this Rule.
If you click NEXT, it shows the following error message.
Or, if you click Setup Action directly, it will also show the following error message.
The reason behind showing these error messages is for having two output tasks available in the Setup Rule screen. You should apply merge/pivot/aggregate multiple datasets to one output dataset to proceed further. The following sections provide step-by-step guidelines about how you can apply merge/pivot/aggregate multiple datasets fetched from multiple/single sources to create a single dataset task.
Even though you can setup actions on all the dataset tasks in a rule, you should apply merge and create a single output dataset task. Even if you do not want to setup an action on the final output dataset task, it should be created else the actions you setup on any dataset task will not be executed.
Merge Task to create single output
We now create a merge task which retains all records of Customers whose <MRR> is greater than 100 and who have responded to our <<Surveys>>(TBA).
- In the Setup Rule screen, click +TASK > click Merge.
- Enter Task Name (here it is merge task), Task Description (Optional), and Output Dataset Name (here it is merge task).
- In the Criteria section, select the following options for the available fields as used in this example:
- Merge: Fetch from Company
- With: Fetch from Survey Participant
- Select Join Type: Retain common records from both dataset
Note: For information about various join types, refer to the <<Join Types>>(TBA) article.
- Click + MERGE ON FIELD.
- Select Source: CSM Company ID, Company ID
- Select Target: Responded by Company ID, Responded By Company ID Name.
- The Show Fields section displays the list of fields fetched from both the Datasets. You can select the required fields to be displayed in the final result.
Use the Show Selected checkbox:
- Select to view the fields used in the merge task.
- De-select to view the newly added field in the respective Dataset task that is used in the merge task.
- [Optional] Select the Enable to S3 check box if you want to export it to S3. For more information about how you can Export to S3, please refer to the Export to S3 from Gainsight Rule article.
- Click SAVE and <-. The merged task will be available on the Setup Rule screen as shown in the following image.
We now create a Action for our Rule in which a CTA is created for every Customer whose MRR is greater then or equal to 100 and who responded to our <<Surveys>>(TBA).
- In the Setup Rule Action screen, provide the following data as used in this example:
- Action Type: Call to Action 2.0
- Company Identifier: Company Id
- Name: Enter a name
- Type: Activity
- Priority: High
- Reason: Survey Response
- Default Owner: Select a default owner for the CTA
- Click SAVE. For more information on how to set rule actions, refer to the <<Setup Rule Action Types>>(TBA) article.
- Click RUN NOW to test the newly created rule. The Run Rule window is displayed. You can mention an email id where you want to receive a copy of the Rule Result and then click RUN.
Schedule the Rule
Use this option to schedule the execution of this rule in the same way you have scheduled custom rules. For more information about how to schedule an individual rule, refer to the <<Scheduling Rules >>(TBA) article.