Gainsight PX is a popular product experience platform that offers cutting-edge product analytics and product engagement features. It allows the product teams to optimize their customer adoption and onboarding flows and design relevant product experiences through email, dialogue, and effective user guides.

RudderStack supports Gainsight PX as a destination to which you can send your event data seamlessly.

Find the open source transformer code for this destination in the GitHub repository.

Getting started

Before you get started, check if the source platform is supported by Gainsight PX by referring to the table below:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported
To know more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you've confirmed that the source platform supports sending events to RudderStack, follow these steps:

  • From your RudderStack dashboard, add the source and select Gainsight PX from the list of supported destinations.
  • Assign a name to this destination and click on Next. You should then see the following Connection Settings screen:
gainsight px connection settings 1 Connection Settings for Gainsight PX

You will need to enter the following settings under Connection Settings:

  • API Key: Enter the API key required for using the Gainsight PX REST API. To generate the API Key, go to your Gainsight dashboard and navigate to Administration - Integrations - Rest API.

More information on the Gainsight PX Rest API can be found here.

  • Product Tag Key: Provide the Tag key for your product. To create a new product or copy a product tag key, go to Administration - Products as shown below:
gainsight px product tag Gainsight PX

Custom Attributes

You can send Custom Attributes for both the User and Account objects using RudderStack.

To create custom attributes in Gainsight PX, go to your Gainsight dashboard and navigate to Administration - Attributes. Then, click on the New Attribute button as shown in the image below:

gainsight px create attribute Create Custom Attribute

You can then provide these mappings in the RudderStack dashboard as shown:

Connection Settings 2

Identify

RudderStack creates a User object in Gainsight PX for the identify call. Gainsight uses the identifyId field as the unique identifier for this object. RudderStack will then map the userId from the message to this identifyId.

If userId is not present, anonymousId will be used instead.

RudderStack supports all the default attributes for the User object. For the custom attributes, you can map the RudderStack payload attribute to the Gainsight PX attribute in the RudderStack dashboard under the User Attribute Mapping section, as shown:

gainsight px user attribute mapping 1 User Custom Attribute Mapping

RudderStack will drop the custom attributes that are not defined in the mapping and send the rest of the attributes to Gainsight PX.

A sample identify call is as shown below:

rudderanalytics.identify("sample-user-id", {
email: "user@domain.com",
name: "Some User",
gender: "M",
countryName: "INDIA",
countryCode: "IN",
city: "CHENNAI",
score: 100,
hobbyCustomField: "Painting",
title: "Doctor",
})

In the above example, hobbyCustomField is a custom field. You will need to provide the mapping for hobbyCustomField to the corresponding Custom Attribute name (hobby, as shown in the screenshot above) in Gainsight PX. If this mapping is not provided, RudderStack will drop the hobbyCustomField attribute and send the other attributes to Gainsight PX.

Location Attribute Mapping

The mapping of the location properties from the Gainsight PX User object to the RudderStack payload is as shown:

Gainsight PX PropertyRudderStack Trait Name
location.countryNamecountryName
location.countryCodecountryCode
location.stateNamestateName
location.stateCodestateCode
location.citycity
location.streetstreet
location.postalCodepostalCode
location.continentcontinent
location.regionNameregionName
location.timeZonetimeZone
location.coordinates.latitudelatitude
location.coordinates.longitudelongitude

Group

For the group calls, RudderStack associates a User with an Account in Gainsight PX. RudderStack will map the groupId to the accountId in the Gainsight PX payload.

All the default fields for Account object are supported. For custom attributes, you can map the custom RudderStack attributes to Gainsight custom attributes in the RudderStack dashboard under Account Attribute Mapping, as shown below:

gainsight px account custom attribute mapping Account Custom Attribute Mapping

A sample group call is as shown:

rudderanalytics.group("sample-group-id", {
name: "Example Group",
industry: "Online Streaming",
numberOfEmployees: 10000,
website: "www.exmaple-group.com",
cultureCustomField: "cool",
})

In the above example, cultureCustomField is a custom field. You will need to provide the mapping for cultureCustomField to the corressponding Custom Attribute name in Gainsight PX. If this mapping is not provided, RudderStack will drop the cultureCustomField attribute and send the other default attributes to Gainsight.

Location Attribute Mapping

The mapping of the location properties from your Gainsight PX Account object to the RudderStack payload is as shown:

Gainsight PX PropertyRudderStack Trait Name
location.countryNamecountryName
location.countryCodecountryCode
location.stateNamestateName
location.stateCodestateCode
location.citycity
location.streetstreet
location.postalCodepostalCode
location.continentcontinent
location.regionNameregionName
location.timeZonetimeZone
location.coordinates.latitudelatitude
location.coordinates.longitudelongitude

Track

RudderStack uses the Gainsight PX's Custom Event API for sending the track calls.

A sample track call is as shown:

rudderanalytics.track("Track User", {
description: "Example track call",
status: "demo",
})

The event field in the RudderStack payload is mapped to the eventName field in the Gainsight PX payload.

You can also set the Global Context metadata for the custom events. The key-value pairs for Global Context must be set in the RudderStack dashboard under Global Context Mapping as shown in the image below:

gainsight px global context Global Context Mapping

For more information on the Global Context feature and how to use it, refer to the Gainsight PX documentation.

The Global Context metadata can also be provided in the track payload, as shown in the following example:

rudderanalytics.track("Track User", {
description: "Example track call",
status: "demo",
globalContext: {
projectId: "p-123",
},
})

In case the Global Context metadata is provided in the RudderStack dashboard (under Global Context Mapping) as well as the payload, the payload will take a higher precedence.

For identify, group and track calls, userId is required. If userId is not present, anonymousId will be used instead.


Contact us

For more information on the topics covered on this page, email us or start a conversation in our Slack community.

Contents