Skip to main content
Gainsight Inc.

Adoption Explorer Functions

Introduction

This article explains how admins can use the wide range of functions available within Adoption Explorer, with simple use cases. You can apply these functions on the required fields, based on your business requirements.

Derived Fields: are the custom measures and dimensions created in an object, using the ingested measures and dimensions. For example, if you have a Page Views field, then by applying Aggregate > Sum function, you can derive the Sum of Page Views.

After you apply a function on the required field and save it, you will now be able to create a usage section on the derived field, within the Adoption Explorer project Layout. The Adoption Explorer project layout can further be added to the C360 page, from Admin > Company > C360 Layouts.

Once an Adoption Explorer layout is added to C360 layout, CSMs can further derive more insights from the Customer 360 page, and can take necessary actions, to drive their business outcomes faster than before.

Adoption Explorer Functions

The function types available in Adoption Explorer are:

  1. Aggregate
  2. Analytics
  3. Data Science
  4. String
  5. Expression Builder
  6. Case Function

Aggregate

Following are the functions available in Aggregate Function Type:

  1. Sum: Returns the summed value of an expression.
  2. Count: Returns the count of an expression.
  3. Count Distinct: Returns the distinct count of an expression.
  4. Min: Returns the minimum value of an expression.
  5. Max: Returns the maximum value of an expression.
  6. Average: Returns the average value of an expression.

You can see the following example on creating derived measure using Aggregate > Sum function.

For instance, you have a person's “page views” data for a company called ABC Financial Services, and you may want to calculate person’s “sum of page views” for this company, you can apply Sum function to achieve the total page views.

To perform this in an Adoption Explorer project:

  1. Navigate to Administration > Adoption Explorer > Administration.
  2. Hover to the required project name and click the Objects icon, you will be landed on the Objects page.
  3. Hover to the required object in which you want to create a Derived Field, and click Fields. You will see the list of ingested fields.
  4. Click + Derived Field. A new window called Add Field appears.
    1. Field Label: Enter the Field Label Name.
    2. From Source: Select the required source from the From Source dropdown list.
    3. Function Type: Select Aggregate from the Function Type dropdown list.
    4. Function List: Select Sum from the Function List dropdown list.
    5. Function Definition: Select the “Page views” field from the Function Definition dropdown list.
    6. Click Save.

1. Overview.gif

  1. In the LAYOUTS page, while creating a usage section, you can see the newly created Derived Field named “Sum of Page Views” in the Show Fields section, as shown in the following image. From the preview, you can now see the “Sum of Page Views” records of a specific company.

2. Step 2.gif

Analytics

Following are the functions available in Analytics Function Type:

  1. Growth: Returns the growth of a field.
  2. Window Cumulative Distance: Calculates the relative rank of the current row within a window partition: (number of rows preceding or peer with current row) / (total rows in the window partition).
  3. Window Dense Rank: Determines the rank of a value in a group of values based on the ORDER BY expression and the OVER clause. Each value is ranked within its partition. Rows with equal values receive the same rank. There are no gaps in the sequence of ranked values if two or more rows have the same rank.
  4. Windo N-Tile: Divides the rows for each window partition, as equally as possible, into a specified number of ranked groups. The NTILE window function requires the ORDER BY clause in the OVER clause.
  5. Window Percent Rank: Calculates the percent rank of the current row using the following formula: (x - 1) / (number of rows in window partition - 1) where x is the rank of the current row.
  6. Window Rank: Determines the rank of a value in a group of values. The ORDER BY expression in the OVER clause determines the value. Each value is ranked within its partition. Rows with equal values for the ranking criteria receive the same rank. Drill adds the number of tied rows to the tied rank to calculate the next rank and thus the ranks might not be consecutive numbers.
  7. Window Row Number: Determines the ordinal number of the current row within its partition. The ORDER BY expression in the OVER clause determines the number. Each value is ordered within its partition. Rows with equal values for the ORDER BY expressions receive different row numbers nondeterministically.
  8. Window First Value: Returns the value of the specified expression with respect to the first row in the window frame.
  9. Window Last Value: Returns the value of the specified expression with respect to the last row in the window frame.
  10. Window Lag: Returns the value for the row before the current row in a partition. If no row exists, null is returned.
  11. Window Lead: Returns the value for the row after the current row in a partition. If no row exists, null is returned.
  12. Window Average: Returns the average value for the input expression values.
  13. Window Count: Returns the count of the number of input rows.
  14. Window Minimum: Returns the minimum value of the expression across all input values.
  15. Window Max: Returns the maximum value of the expression across all input values.
  16. Window Sum: Returns the sum of the expression across all input values.

Data Science

Segment is the function available in Data Science function type. Segment function allows you to categorize your data into segments, in ascending order.  

You can see the following example on creating segments on a field using Data Science > Segment function.
For instance, you have “ARR” data for a company called ABC Financial Services, and you may want to know into which segment this company’s ARR falls under, you can apply Segment function to achieve this.

To perform this in an Adoption Explorer project:

  1. Click + Derived Field. A new window called Add Field appears.
    1. Field Label: Enter the Field Label Name.
    2. From Source: Select the required source from the From Source dropdown list.
    3. Function Type: Select Data Science from the Function Type dropdown list.
    4. Function List: Select Segment from the Function List dropdown list.
    5. Function Definition:
      1. Select the “ARR” field from the Function Definition dropdown list.
      2. Define the Segments from “Low to High”. Here, Low is defined as Red and High as Green.
    6. Click Save.

3. Segment Config Example.gif

  1. In the LAYOUTS page, while creating a usage section, you can see the newly created Derived Field named “Segmented ARR” in the Show Fields section, as shown in the following image. From the preview, you can now easily know into which segment the selected company’s ARR falls under.

4. Segment Example 2.gif

String

Following are the functions available in String Function Type:

  1. Concat FUNC (string, string,...): Concatenates two or more strings together.
  2. ILike FUNC (string, pattern): Compares argument one and two, and returns True, if the values match.
  3. Initcap FUNC (string): Returns the string using Initial caps.
  4. Length FUNC (string): Returns the number of characters in the string. For example, LENGTH(“string”) returns 6.
  5. Lower FUNC (string): Converts the characters in the string to Lowercase.
  6. Upper FUNC (string): Converts the characters in the string to Uppercase.
  7. String position FUNC (string, substring): Returns the location/position of the substring in a string. For example, POSITION(“doe” in “johndoe”) returns 5. Counting of the position starts with an index 1.
  8. Left String FUNC (string, substring): Returns characters to the left of the argument.  For example, LEFT (Accenture, 6) will return “Accent” as the output.
  9. Right String FUNC (string, substring): Returns characters to the right of the argument. For example, RIGHT(Accenture, 6) will return “enture” as the output.
  10. Substring FUNC( string, x, y ): Extracts characters from position 1 - x of the string an optional y times. Finds the substring based on the position and length. For example, Substring(Agriculture, 2,4) will return values from 2 to 4, i.e “gric” as the output.

You can see the following example on creating derived field using String > Concat function.

For instance, you have “Person Name” and “Page Title” fields in your Person Usage Info object, and you may want to see the records of both the fields in a single field, you can apply Concat function to achieve this.

To perform this in an Adoption Explorer project:

  1. Click + Derived Field. A new window called Add Field appears.
    1. Field Label: Enter the Field Label Name.
    2. From Source: Select the required source from the From Source dropdown list.
    3. Function Type: Select String from the Function Type dropdown list.
    4. Function List: Select Concat from the Function List dropdown list.
    5. Function Definition: Select “Person Name” and “Page views” fields from the Function Definition dropdown list.
    6. Click Save.

5. Concat Field.gif

  1. In the LAYOUTS page, while creating a usage section, you can see the newly created Derived Field named “Concat Function” in the Show Fields section, as shown in the following image. From the preview, you can now see the concatenated records for a specific company.

6. Concat Function Example.gif

Expression Builder

You can use the Expression Builder to perform various arithmetic calculations on data. For instance, you have “Total Seats” and “Used Licensed Seats” fields in your Company Usage Info object, and you may want to know the “Unused Licensed Seats”, you can achieve this by applying expression function.

The following example on Numeric expressions guides you in calculating the number of unused licenses for a customer. The number of unused licenses is the difference between the Total number of assigned licenses and the Total number of Licenses used.

Total number of Assigned Licenses = The number of licenses purchased by the customer.
Total number of used Licenses =  The number of licenses customer is using actively.

Unused Licensed Seats = Sum of Total Seats - Sum of Used Licensed Seats

To create Numerical Expression for this formula:

  1. Click + Derived Field.
    1. Field Label: Enter the Field Label Name.
    2. From Source: Select the required source from the From Source dropdown list.
    3. Function Type: Select Expression Builder from the Function Type dropdown list.
    4. To create an Expression:
      1. Click inside the expression box to build an Expression.
      2. Select Brackets and click open bracket ( ( ).
      3. Select Fields and choose the required field from the Fields dropdown list. Here, to meet the business use case, Total Seats field is selected.  
      4. Select Operators and choose the required operator. Here, to meet the business use case, select - (subtraction).
      5. Select Fields and choose the required field from the Fields dropdown list. Here, to meet the business use case, Used Licensed Seats field is selected.
      6. Select Brackets and click close bracket ( ) ). This completed the expression.
    5. Click Save.

7. Create Expression.gif

  1. In the LAYOUTS page, while creating a usage section, you can now see the newly created Derived Field named “Unused Licensed Seats” in the Show Fields section, as shown in the following image. From the preview, you can now see the value of the unused licensed seats for a selected company.

8. Expression Output.gif

Case Function

You can use the Case Function to categorize data, based on specific set of requirements. You can use this function to create an output Field (Derived Field). This output field has values for the records that match your specific set of requirements.

Anatomy of Case Expression:

  • Case Function is made up of multiple cases.
  • Every Case consists of multiple Criteria. Each criterion is a specific requirement that any record should match. For example, a Criteria for a customer to be classified as Detractor can be NPS score between 0-6.

Every Case has an associated Action when any record matches with the given criteria. A value (Ex: Detractor) is populated in the Output field. This value can be a custom value or fetched from another field in the source dataset.

Execution of the Case Function detail:

  1. Execution of the Case Expression begins with the evaluation of the first case on a record. If all the criteria in this case are satisfied by the record, the action associated with this case is executed. The execution of Case Function halts here for this record and none of the other cases are evaluated.
  2. However, if the first case is not satisfied, the system evaluates the second case on the same record, and so on. If none of the available cases are satisfied by the record, the default case is executed.

This process is applied to all the records.  

Default: The Case Function also has a default case. This default case does not have any criteria. It only has an action; Default action. You cannot delete the default case. When a record does not match any of the specified criteria, the action associated with the default case is executed.

The various fields present in Case Function formula are:

  • Case Name: Enter a name for the Output column. This name is displayed on the final output page for the Case Expression result.
  • Output Data Type: Select the data type for the output. The options present in the Case Output depends on the Output data type. Three data types are available:
    • Boolean
    • Number
    • String
  • Condition: Case consists of the Criteria(s). You can add multiple criteria by clicking +. The various fields present in a Criteria are:   

    • Field: Select the field on which the Criteria must be applied. All the fields included in the Dataset are displayed here.
    • Operator: Select an Operator to be applied on the field. The operators are displayed based on the field selected.
    • Matching Criteria: Enter the value (matching criteria) which must be satisfied, for this criteria to be successful.
  • Advanced Logic: When you have multiple criteria, select the logical operator to be applied between those criteria(s). By Default, the AND logic is applied.
  • Multiple Cases: Click the Rounded-Plus to create multiple cases.
  • Then: If all the criteria(s) are matched, the action specified in this field is executed. The options available in this field depend on the value selected in the Output Datatype field.
  • (OR): If you select the Output Datatype as Number/String, you will see the (OR) field. You can enter a custom value in the (OR) field, if you want to execute either of the actions specified in “Then” or “(OR)”.
  • Default: This field represents the default case. There is no criteria for this case. It only has action. If all the cases fail, this case is executed.

In the below example, a Case Name called Usage Adoption is created. The Output Datatype for this is String. So, if there is a customer whose “Unused Licensed Seats” are greater than or equal to 30, the field displays Adoption is Low. For the rest of the customers, it displays High, which is the Default Case Action.

9. Case Output.gif

Now, in the LAYOUTS page, while creating a usage section, you can now see the newly created Derived Field named “Usage Adoption” in the Show Fields section, as shown in the following image. From the preview, you can now know if the adoption is low or high for a selected company.

10. Case Layouts page.gif

  • Was this article helpful?