Skip to main content
Gainsight Inc.

Pivot Tasks in Bionic Rules

Pivot Tasks

This article explains how you can transform data into a polished, actionable dataset in Bionic Rules using the Pivot option. Pivot tasks are helpful when you have lists of things of different types and you want to look at them by type. Example data might include training courses and completion rates, or product usage (downloads/logins/page views, etc.), or a list of open cases with different priorities.

For example, suppose you have a list of Open Cases and one of the columns is 'priority' with values like P1, P2, etc. You can pivot this  and determine for each customer how many P1 cases, P2 cases, etc.  Then, there are tons of potential actions. You may want to set a health score based on how many cases there are of different priorities, or create a CTA for example. You could also write the data into an object, which will then make it easy to report on the pivoted data. 

For additional help, see this short video demo on pivot task configuration.

Create Bionic Rule

  1. Navigate to Rules Engine > RULES LIST tab > Click +RULE.

  1. In the Edit Rule screen, enter the required information in the fields available. In this use case, the following information is used as example:
    • Description: [Optional]

    • Rule Name: Pivot on page names

    • Rule For: Account

    • Rule Type: Bionic

  2. Click NEXT. The Setup Rule screen is displayed.

Create Data Set (Fetch Task)

  1. Click DATASET TASK to create a data set. 

  1. Enter Task Name (here it is fetch from usage data), Task Description (Usagedata fetch), and Output Dataset Name (here, it is Usage Data).

  2. Select Account as the source object, add fields in the Show/Filters sections and click SAVE as shown in the following image.

  1. Click to go to the Setup Rule screen where you can view the fetched dataset that is performed in this Bionic Rule.

Pivot Task to create a single output

  1. In the Setup Rule screen, click +TASK > click Pivot.

  1. Enter Task Name (here it is Pivot on page visits), Task Description (Page visits pivot), and Output Dataset Name (here it is Page visits).
  2. In the Setup Rule screen, select Dataset and Usage Data as source object. Select the following options for the available sections on this screen as used for pivoting task in this example:
    • Pivot on: Page Views 23

    • Show: Account Name 23 

  1. Click on the gear icon for the Page_Views field. The Pivot conditions to evaluate window will be displayed. In this use case the following conditions are used for pivoting on the page views (refer the following image).
  2. Click + ADD to add multiple pivot conditions.
  3. Click OK to save the pivot conditions.

Pivot Task.png

Note: While pivoting any task, you must add one field under GroupBy section. Otherwise, it will display an error message while saving the task. 

5. Add a field in the GroupBy section. (In this use case, it is Account Name 23)

6. Click SAVE. The following message is displayed.

 On Setup Rule screen, you can see the fetched task, pivoted task and also the Data Flow Diagram as shown in the following image.

 Dataflow Diagram.png

Perform Action

  1. In the Setup Rule Action screen, provide the following data as used in this example (refer the following image):
    • Owner field: NA (whatever fields you add in the Setup Rule > Show section, all of them will be available under the dropdown list).

    • Action Type: Load to Company

    • Operation: Update

  2. Click +CRITERIA [No page vies >= Value 0]

  3. Click SAVE.

  1. Navigate to RULES LIST tab where you can run this newly created Bionic Rule by clicking RUN NOW.

Clicking RUN NOW displays the Run Rule window where you can mention date and an email id where you want to send a copy of the Rule Result and then click RUN.

Schedule

You can use this option to schedule the execution of this rule in the same way as you schedule in Rules Engine for other rule types before. For more information about how to schedule an individual rule, refer to the Scheduling Rules article.

See Also:

  • Was this article helpful?