Skip to main content
Gainsight Inc.

Advanced Operations in Data Management

Gainsight NXT

This article supports Gainsight NXT, the next evolution of the Customer Success platform. If you are using Gainsight CS Salesforce Edition, you can find supporting documentation by visiting the home page, and selecting CS > Salesforce Edition.

Not sure what your team is using? Click here.

 

Check Dependencies on a Gainsight Object

Once the custom objects are created and then referenced in a different part of the application, we wish to restrict the Gainsight Administrators from accidentally modifying or deleting the Gainsight objects and their fields as part of the object dependency tracking feature.

Currently, we are tracking the below application areas for dependency of a specific custom object and its fields:

  • Rules
  • Reports
  • Relationships
  • C360
  • R360
  • Shared C360
  • Shared R360
  • S3 Jobs
  • MixPanel
  • Segment
  • Bulk API
  • Import Lookup
  • MDA Lookup
  • Self Lookup
  • Update Keys
  • Calculated Fields

You can search and select a custom or standard field to filter jobs (in individual application areas) that use the selected field in the Dependencies tab. You can see the total number of jobs and filtered jobs for the selected field in the application area.

To identify the dependencies on an object:

  1. Navigate to Administration > Data Management > [Select a custom object for which you want to check dependencies].
  2. Click Dependencies on the left pane to see other features that are dependent on the fields of a custom object you selected.
  3. If you click the arrow icon on the custom object, it navigates you to the feature that has a dependency of this object. It helps you remove the dependency of the fields from the feature and then to delete the custom object and the custom fields. In the following image, the object Usage has a dependency with MDA Lookup.

6.14.1 360 Doc Impact Dependencies List View.jpg

Create Calculated Fields on Gainsight Objects 

  • String and Date functions are supported in Gainsight, to build a calculated field. 
  • In a string function, you can use any field with Data type Email, GS ID, Rich Text Area, SFDC ID, String, and URL.  
  • In a Date Function, you can use any field which has Data type, Date or Datetime.
  • To use a formula function in a custom field, you must ensure that the Data type of the custom field is same as the return type of the formula function. For example, the Date Diff function returns output in Number format. To use this function, your custom field must have data type as either Number, Percentage, or Currency. Substring function returns output in String format. You cannot use it if your custom field’s data type is currency or Date.

List of Supported Formula Functions in Gainsight: 

String Functions

The following table lists all the string functions. 

Formula Name

Syntax

Return Type

Description

Example

Substring

Substring (String field, character position from where extraction must begin, no. of characters to be extracted)

String

This function allows you to extract a part of the string from the original string. You must provide the position of the character in the string from where the extraction must begin and the number of characters upto which the substring must be extracted.

Substring (Prashant,4,3)returns sha. The extraction begins from fourth position and three characters are selected for extraction.

Length

Length (string field)

Number

This function returns the number of characters in a string. Blank spaces and special characters are also taken into account.

Length (Prashant)returns 8, since the string has eight characters..

To Lowercase

To Lower Case (String Field)

String

This function returns the string by converting all the characters into lowercase letters.

To Lower Case(Prashant)returns prashant

To Uppercase

To Upper Case (String Field)

String

This function returns the string by converting all the characters into uppercase letters.

To Upper Case(Prashant)returns PRASHANT.

String Position

String Position (sub-string field, String field)

Number

This function returns the position of the first character of the substring in the main string.

String Position (hant, Prashant)returns 5. The substring here is hant and the first character of this substring is in the 5th position in the main string

Left String

Left String ( String field, number of characters to be extracted)

String

This position extracts a substring from the main string. You must specify the number of characters to be included in the sub string. The character count begins from the left side of the string.

Left String (Prashant, 4)returns Pras. The string length is 8. Number of characters specified is 4. So the count starts from left of string and four characters are extracted.

Right String

Right String ( String field, number of characters to be extracted)

String

This position extracts a substring from the main string. You must specify the number of characters to be included in the sub string. The character count begins from the right side of the string.

Right String (Prashant, 4)returns hant. The string length is 8. Number of characters specified is 4. So the count starts from the right side and four characters are extracted.

Concat

Concat (delimiter, first String field, second string field)

String

This function adds two strings to convert them into a single string. You must provide a delimiter between the two strings. You can use either a comma, space or hyphen as the delimiter

Concat (hyphen,Prashant, Mathapathi)returns Prashant-Mathapathi, since hyphen is used as the delimiter between the two strings.

Date functions

The following table lists all the date functions.

Formula Name

Syntax

Return Type

Description

Example

Date Diff

Date Diff (subtrahend date field, minuend date field, interval)

Number

This function accepts two dates, subtracts the first date from the second date and returns the difference in a specified interval. Interval can be days, months, quarters, weeks, and years. If the first date is greater than the second date, the result is displayed as a negative numeral

DateDiff (04/25/2019, 04/30/2019, days) returns 5.  

Date Add

Date Add (Date or DateTime field , numeric value, interval of the numeric value)

Date

This function returns a date after adding a specific number of days, weeks, months, or quarters to the given date. You must provide a date, followed by a number to be added, and the interval for the number. Interval can be either Day, Quarter, Month or week.

Date Add (01/07/2018, 4, week) returns 02/04/2018. Input date is 7th Jan. Four weeks are added to this date and the result is 4th feb.

Date Sub

Date Add (Date or DateTime field , numeric value, interval of the numeric value)

Date

This function returns a date after subtracting a specific number of days, weeks, months, or quarters from the given date. You must provide a date, followed by a number to be subtracted, and the interval for the number. Interval can be either Day, Quarter, Month or week.

Date Sub (01/07/2018, 4, Day) returns 01/03/2018. Input date is 7th Jan.After subtracting 4 days, the output is 3rd Jan.

First Day of Week

First day of Week (Date field)

Date

This function accepts a date and returns the date on which the week started for the given date. Monday is considered to be the start date of the week.

First Day of Week (04/28/2019) returns 04/22/2019 , since the week of 28th April started on 22nd april (Monday).

Last Day of Week

Last Day of the Week (Date field)

Date

This function accepts a date and returns the date on which the week ends for the given date. Sunday is considered to be the last date for the week.

Last Day of Week (04/28/2019) returns 05/25/2019 , since the week of 28th April ends on 5th May (Sunday).

Last Day of Quarter

Last Day of the Week (Date field)

Date

This function accepts a date and returns the date on which the quarter ends for the given date.The last day of the quarter is considered to be the last date of the quarter.

Last Day of Quarter (04/28/2019) returns 06/30/2019.

Month Num

Month Num (Date field)

Number

This function returns the number of the month to which the given date belongs to.

Month Num (04/29/2019) returns 4.

Month Name

Month Name (Date field, format)

String

This function returns the name of the month for a given date. You can select the format in which the month name must be displayed.

Month Name (04/29/2019, Mon), returns Apr. If Month was selected as output format, April would have been displayed.

Week Num

Week Num (Date field)

Number

This function returns the number of the Week (in the year) to which the given date belongs to

Week Num (04/29/2019) returns 17 because the given date falls in the 17th week of 2019 year.

Week in Month

Week in Month (date field)

Number

This function returns the number of the week in a month to which the given date belongs to

Week In Month (04/29/2019) returns 5, since the given date belongs to the 5th week of April

Year Num

Year Num (date field)

Number

This function returns the year to which the given date belongs to

Year Num (04/29/2019) returns 2019

Day of

Day of (Date field)

String

This function returns the day of the week for a given date.

Day of (04/29/2019) returns monday, since the given date falls on a monday.

First Day of Month

First Day of the Month (Date field)

Date

This function accepts a date and returns the date on which the month begins for the given date. The first day of the month is considered to be the start of the month.

First Day of Month (04/29/2019) returns 01/04/2019.

First Day of Quarter

First Day of Quarter (Date field)

Date

This function accepts a date and returns the date on which the quarter begins for the given date. The first day of the quarter is considered to be the start of the quarter.

First Day of Quarter (04/29/2019) returns 01/04/2019.

First Day of Year

First Day of Quarter (Date field)

Date

This function accepts a date and returns the date on which the year begins for the given date. The first day of the year  is considered to be the start of the year.

First Day of Year (04/29/2019) returns 01/01/2019

Last Day of Month

First Day of Quarter (Date field)

Date

This function accepts a date and returns the date on which the month ends for the given date. Last day of the month is considered to be the last date of the month.

Last Day of Month (04/29/2019) returns 04/30/2019.

Last day of Quarter

First Day of Quarter (Date field)

Date

This function accepts a date and returns the date on which the quarter ends for the given date. Last day of the quarter is considered to be the last date of the quarter.

Last Day of Quarter (04/29/2019) returns 06/30/2019.

Last day of Year

First Day of Quarter (Date field)

Date

This function accepts a date and returns the date on which the year ends for the given date. Last day of the year is considered to be the last date of the quarter.

Last Day of Year (04/29/2019) returns 12/31/2019.

Create Calculated Field with String Function

This section shows how to use the Concat Function to merge two string fields into a single field.

To create a String calculated field:

  1. Navigate to Administration > Data Management.
  2. Select the required object.
  3. Click ADD FIELD.
  4. From the Data type field, select a value (here String).
  5. Click the Calculated field check box.
  6. Click CREATE FORMULA.
  7. Click the click here link.
  8. Drag and drop the required function from the Search Fields/Functions section. Alternatively, you also select the required function from the drop-down menu.

Select string.GIF

  1. Build the formula field as shown below and click SAVE.

Save formula.GIF

Click TEST FORMULA to verify if the formula is working as expected.

8FFBF5B0-EF6A-4914-9642-C1B7915273ED.GIF

Create Calculated Field with Date Function 

This section shows how to use the Date functions to create calculated fields of different data types. The Company object has a date field called Renewal Date which stores the next renewal date of the customer. Generally, renewals which are due in the current quarter given high priority. You can use the Date diff function to calculate the number of days left for renewal in the current quarter.

Follow the procedure mentioned in the previous section, up to step 8. In step four select Number instead of String.

A8903758-9EEE-4F3F-8912-3AB1DD074109.GIF

ADVANCED FORMULA builder helps the Admins to create complex formulas like performing arithmetic operations and case statements.

Basic arithmetic operations with constants

  • Examples : A + 10,  A - 1, A*100 , A/100, (A+B)/2

Case statements

Examples:

  • case when A>0 then 1 else 0 end
  • case when A-B>=0 then A-B else C-B end
  • case when A=B then 1 else 0 end
  • case when A is null then 0 else B * (180/7) end
  • case when (A+B+C+D) = 0 then 0 else ((E+F+G+H+I)/(A+B+C+D)*100) end

Notes:

  • Ensure that the syntax is correct.
  • Once an advanced formula field is set, reverting to a basic formula is not supported as the basic formula builder does not support this operation.

Object Graph in the Gainsight Objects

Object Graphs show Joins between two Gainsight Objects. You can get a pictorial representation of how two Gainsight Objects are linked to each other. This graph gives you a first hand knowledge of what exactly can happen if a record is deleted. Object graph of an Object is located on the Object Graph tab.

Object graphs show Joins between the current Object (Object whose Object Graph page is being viewed) and other Objects.

To view Object Graph for an Object:

  1. Navigate to Administration > Data Management > [select an Object].
  2. Click the Object Graph tab.

Object graph.gif

The first time you click Object Graph, the system will display a message asking you to visit the page again later. It may take a maximum of 10 minutes to load the object graph and to enable the On Delete option in the MDA Joins.

  • Resync option in the Object Graph: When multiple objects are joined through custom fields, sometimes (very rare), these Joins do not appear in the object graph of some objects. The resync button in the object graph assists you to resolve this issue. If you observe that there are any missing joins in any object graph, click the resync button in the object graph. It resyncs all the resources to the MDA database and displays all the missing joins.

    Occurence of this issue is very rare and resync should not be applied on a regular basis. Resyncing operation takes some time depending on the number of joins between multiple objects in Gainsight.

    To see this option in the UI, Navigate to Administration > Data Management > [Select an object] > [Click Object Graph].

resync in Object graph.png

The characteristics of an Object Graph are:

  • Current object is always shown in Blue, whereas other objects to which the current object has MDA Joins are shown in Green, as shown in the image above.
  • Object graph shows MDA joins between the objects, for up to three levels by default. Click more levels to see another three levels of MDA joins in the graph; using this you can see any number of levels of MDA joins.
  • Direction of the arrow between any two objects shows the Joins from one object to another. In the image above, Activity Timeline object has a field in which MDA joins is applied to a field in the Relationship object.
  • If you click this arrow, the pair of fields that are applied with MDA joins along with direction is shown. For more information on MDA Joins, refer to the MDA Joins article.
  • You can see options on the top left side to move the graph in four directions and zoom in/out.
  • Color coding of the MDA joins in the bottom right corner defines the type of On Delete option configuration.
  • Object Graph of the Person object displays the dependent objects connected with Who ID data type fields. This helps admins to assess the impact that the lookup object (connected with Who ID field) will have, when the respective record from the person object is deleted.

Currency Management

Currency Management page is used to host the setting for Tenant level Currency code. Admins can navigate to the Currency Management page from Administration > Currency Management. Tenant Currency setting in this page is the default currency for your data if the system is unable to identify the currency code for any specific currency data.

Currency Management page.png

Default currency for the tenant is United States Dollar (USD). Admins can change the Tenant Currency as shown below:

  1. Navigate to Administration > Currency Management.
  2. Click Update Tenant Currency.
  3. Select a different currency than the one already selected.
  4. Click Update.

Note: Tenant Currency is also called Corporate Currency.

Update_Tenant_Currency.gif

Additional Resources

 

  • Was this article helpful?