Gainsight

Setup

In Gainsight

  1. Get Access Key and your subdomain from Gainsight (see create “Gainsight Data Source” video)
  2. Explore data in the Gainsight dashboard to use in API

In Cast.app

  1. Create a Gainsight Data Source (video)
  2. Create one or more Gainsight Datasets in JSON along with any Data Transformations using SQL syntax (Transformation may also include data cleanup). Examples on this page include
    • CSM NPS results (video)
    • Contacts Dataset
    • Customer Satisfaction results

Use in Workflow. Cast.app will generate content and recommendations perpetually for all personas for all customers.

Get Access Key and Subdomain

Accessing the Gainsight API requires the following steps:

  1. Register for a Gainsight account: If you do not already have a Gainsight account, you will need to register for one.

  2. Log in with subdomain: Once you have registered for a Gainsight account, you will receive a unique subdomain link that you will need to use to log in to your account.

  3. Go to Administration > Integration > Connectors 2.0: After logging in, navigate to the “Administration” tab and click on “Integration” in the left-hand menu. From there, select “Connectors 2.0” to access the connectors dashboard.

  4. Create a new Gainsight API connector: To create a new Gainsight API connector, click on the “Create Connection” button and select “Gainsight API” as the connector type. Follow the prompts to configure the connector and create a new access key.

  5. Retrieve the access key: Once the connector has been created, you can retrieve the access key by clicking on the three dots next to the connector name and selecting “Edit Connection.” The access key will be displayed in the “API Key” field.

  6. Use the Gainsight API: Now that you have your access key, you can use the Gainsight API to access your data and perform other operations on your Gainsight account. Make sure to include your access key in the header with the Accesskey name of each API request you make.

Note: If a Gainsight API connector is already present, you will not be able to create another one. In that case, simply click on the three dots next to the connector name and select “Edit Connection” to find the access key.

Explore data in the Gainsight dashboard to use in API

  1. Navigate to Administrator > Customer Data > Data Management: Login to your Gainsight account and click on the “Administrator” tab. From there, click on “Customer Data” and then “Data Management” to access the Data Management dashboard.

  2. Explore Objects: Gainsight provides different types of objects as part of its Data Management:

    • Standard Objects: These objects store important customer data like Company, Account/Relationship, and user information in Gainsight’s Matrix Data Architecture (MDA). This lets the users perform actions from other functionalities in Gainsight application directly on the standard objects.
    • System Objects: These objects are set up, shipped, and controlled entirely by Gainsight. They are system-driven and cannot be customized or modified by Admins.
    • Custom Objects: These objects can be created and edited by the Admins. In these objects, the schema is editable and the data can be uploaded, used, and deleted.
  3. Open Object Schema and Data: Click on any object to open its schema and data. In the schema, you can see the fields available in the object.

  4. Select Fields to Use in API Payload: In the fields table, click on the “+” sign and select “Field Name”. This field name will be used to pass in API payload to select columns.

  5. Check Mapped Fields: Note that only mapped fields are allowed to access. Look at the “Mapping” column to see which fields are mapped.

  6. Explore Data: Go to the data tab from the top to explore data. You can use filters and search functions to find specific data.

By following these steps, you can explore the data available in Gainsight and use it in your API requests. Make sure to select the appropriate fields and use the correct endpoint in your API payload to retrieve the desired data.

Creating a Gainsight Datasource

  1. Navigate to the Datasets screen in Cast.app designer by clicking on “Home” at the top of the screen and selecting “Datasets”.
  2. Click on “Add New Dataset”.
  3. Select “Add a Data Source” and choose “Gainsight” in the popup.
  4. On the datasource setup screen, enter your Gainsight access key that you got earlier and provide a descriptive name.
  5. Click on “Add Configuration”.
View full-screen

Creating a Net Promoter Score (NPS) Dataset

The video below shows how to create a dataset using the Gainsight Connector, and how to use the cast.app built-in Query Results dataset to format and transform the raw results from Gainsight dataset (and perform actions like pivot, sort, rename columns, cleanup data, etc).

For example, here is the JSON query to access the gainsight dataset using the Gainsight Connector.

{
  "object": "Nps_Data__gc",
  "json": {
    "select": [
      "Gsid",
      "Company_Id__gc",
      "Person_Id__gc",
      "NPS_score__gc",
      "True_NPS__gc",
      "Survey_Id__gc",
      "Sentiment__gc",
      "Comments__gc",
      "CreatedDate",
      "ModifiedDate"
    ],
    "limit": 1000,
    "offset": 0
  }
}

And here is the SQL query to transform results of the Gainsight Connector dataset using the Query Results dataset.

Note: replace dataset_id with the raw dataset name from above.

  SELECT
      Company_id__gc,
      CASE
          WHEN NPS_score__gc > 0 AND NPS_score__gc <= 6 THEN 'Detractors'
          WHEN NPS_score__gc > 6 AND NPS_score__gc <= 8 THEN 'Passives'
          WHEN NPS_score__gc > 8 AND NPS_score__gc <= 10 THEN 'Promoters'
          ELSE "Unknown"
      END AS NPS_score,
      COUNT(1) as "count"
  FROM dataset_id as "gainsight_nps"
  WHERE Company_id__gc IS NOT NULL
  GROUP BY Company_id__gc, NPS_score;
View full-screen

Creating a Contacts Dataset

The video below shows how to create a contact dataset using the Gainsight Connector, and how to use the cast.app built-in Query Results dataset to format and transform the raw results the from Gainsight Contacts dataset (and perform actions like pivot, sort, rename columns, cleanup data, etc).

For example, here is the JSON query to access the gainsight dataset using the Gainsight Connector.

{
  "object": "Company_Person",
  "json": {
    "select": [
      "GSID",
      "Company_ID",
      "Company_ID__gr.Name",
      "Company_ID__gr.Status",
      "Company_ID__gr.Stage",
      "Company_ID__gr.Csm__gr.Name",
      "Company_ID__gr.Csm__gr.Email",
      "Company_ID__gr.OriginalContractDate",
      "Company_ID__gr.Users",
      "Company_ID__gr.Industry",
      "Company_ID__gr.Employees",
      "Person_ID",
      "Person_ID__gr.Name",
      "Person_ID__gr.Email",
      "Person_ID__gr.Phone__gc"
    ],
    "where": {
      "conditions": [
        {
          "name": "Person_ID__gr.Email",
          "alias": "A",
          "operator": "IS_NOT_NULL"
        }
      ],
      "expression": "A"
    },
    "limit": 5000,
    "offset": 0
  }
}

And here is the SQL query to transform results of the Gainsight Connector dataset using the Query Results dataset.

    SELECT * FROM gainsight-contacts-raw
    WHERE (Company_ID, GSID) IN (SELECT Company_ID, min(GSID) FROM gainsight-contacts-raw GROUP BY Company_ID)
    ORDER BY Person_ID__gr_Name;

Creating a Customer Satisfaction Dataset

The video below shows how to create a dataset using the Gainsight Connector, and how to use the cast.app built-in Query Results dataset to format and transform the raw results from Gainsight dataset (and perform actions like pivot, sort, rename columns, cleanup data, etc).

For example, here is the JSON query to access the gainsight dataset using the Gainsight Connector.

{
  "object": "Csat_Data__gc",
  "json": {
    "select": [
      "Gsid",
      "Company_ID__gc",
      "Company_Person_ID__gc",
      "Person_ID__gc",
      "CSAT_Score__gc",
      "Survey_Id__gc",
      "Comment__gc",
      "Response_Date__gc",
      "CreatedDate",
      "ModifiedDate"
    ],
    "limit": 5000,
    "offset": 0
  }
}

And here is the SQL query to transform results of the Gainsight Connector dataset using the Query Results dataset.

Note: replace dataset_id with the raw dataset name from above.

    SELECT Company_ID__gc,
    CASE
        WHEN CSAT_Score__gc = 1 THEN 'Very Dissatisfied'
        WHEN CSAT_Score__gc = 2 THEN 'Dissastified'
        WHEN CSAT_Score__gc = 3 THEN 'Neutral'
        WHEN CSAT_Score__gc = 4 THEN 'Satisfied'
        WHEN CSAT_Score__gc = 5 THEN 'Very Satisfied'
        ELSE "Unknown"
    END AS CSAT_Score,
    COUNT(1) as "count"
    FROM dataset_id as "gainsight_csat"
    WHERE Company_id__gc IS NOT NULL GROUP BY Company_ID__gc, CSAT_Score__gc

Using Gainsight datasets in cast.app

Here’s an example of how to use your newly created Gainsight datasets in cast.app.

View full-screen

View a simple example of a Gainsight-data-driven slide

Note: this video has audio

View full-screen (video has audio)