Gainsight PX is a popular product experience platform. It offers cutting-edge product analytics, product engagement features, and powers the product teams to optimize their customer adoption and onboarding flows.

This guide will help you set up Gainsight PX as a source in RudderStack.

Getting started

Follow these steps to set up your Gainsight PX source in the RudderStack dashboard:

  1. Go to your RudderStack dashboard and click Add Source. From the list of Event Streams sources, select Gainsight PX.
  2. Assign a name to your source and click Continue.
  3. Your Gainsight PX source is now configured. Note the Webhook URL in the Settings tab, as shown:
Gainsight PX source webhook URL
  1. Follow this Gainsight PX user guide to configure a custom webhook in Gainsight PX.
  2. In the Callback URL field, paste the RudderStack webhook URL copied in Step 3 above.
Gainsight PX source webhook URL configuration

Event transformation

In case of a signup event (event.eventType == SIGN_UP), RudderStack maps the event to an identify call. Otherwise, it maps the ingested event to a track event.

The signup event indicates that a new user is created in Gainsight PX, which is typically associated with the identify call.
Gainsight PX allows sending a maximum of 10000 webhook events per day.

Identify

As mentioned above, RudderStack maps a Gainsight PX event to the identify event in case of a user signup.

A sample input payload is shown below:

{
"user": {
"aptrinsicId": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX",
"identifyId": "New!",
"type": "USER",
"gender": "EMPTY_GENDER",
"email": "userEmail@address.com",
"firstName": "XXXXXX",
"lastName": "XXXXX",
"lastSeenDate": 1665582808669,
"signUpDate": 1665582791753,
"firstVisitDate": 1665582791753,
"title": "Mr.",
"score": 0,
"accountId": "IBM",
"numberOfVisits": 1,
"location": {
"countryName": "India",
},
"propertyKeys": [
"AP-XXXXXXXXXXX-2-1"
],
"createDate": 1685582808376,
"lastModifiedDate": 1685582808717,
"customAttributes": null,
"globalUnsubscribe": false,
"lastVisitedUserAgentData": null,
"id": "New!",
"lastInferredLocation": null
},
"account": {
"id": "IBM",
"name": "International Business Machine",
"lastSeenDate": 1685582808669,
"propertyKeys": [
"AP-EOXPSEZGC5LA-2-1"
],
"createDate": 1685578567565,
"lastModifiedDate": 1685582808669
},
"event": {
"eventType": "SIGN_UP",
"eventId": "XXXXXXX-XXXX-XXX-XXX-XXXXXXXXX",
"propertyKey": "AP-XXXXXXXXX-2-1",
"date": 1665582808376,
"sessionId": "XX-XXXXXXXXX-2-XXXXxXXXXXX-XXXXXXXX",
"globalContext": {},
"userType": "USER"
},
"configId": "XXXXXX-XXXXX-XXXX-XXXX-XXXXXX"
}

RudderStack transforms this payload into the following event:

"context": {
"library": {
"name": "unknown",
"version": "unknown"
},
"integration": {
"name": "GAINSIGHTPX"
},
"externalId": [{
"type": "gainsightpxAptrinsicId",
"id": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX"
}]
},
"integrations": {
"GAINSIGHTPX": false
},
"type": "identify",
"traits": {
"type": "USER",
"gender": "EMPTY_GENDER",
"email": "userEmail@address.com",
"firstName": "XXXXXX",
"lastName": "XXXXX",
"title": "Mr.",
"score": 0,
"globalUnsubscribe": false,
"accountId": "IBM",
"numberOfVisits": 1,
"propertyKeys": [
"AP-XXXXXXXXXXX-2-1"
],
"id": "New!",
"country": "India",
"account": {
"id": "IBM",
"name": "International Business Machine",
"numberOfEmployees": 0,
"numberOfUsers": 0
}
},
"userId": "New!",
"createdAt": "20XX-XX-XXT13:53:11.753Z",
"originalTimestamp": "20XX-XX-XXT13:53:11.753Z"

RudderStack also maps the following properties from the Gainsight PX event payload to the RudderStack properties:

Gainsight PX propertyRudderStack property
usertraits
user.identifyIduserId
user.aptrinsicIdcontext.externalId[]
user.signUpDatecreatedAt
user.location.countryNametraits.country
user.location.stateNametraits.state
user.locationtraits
accounttraits.account
account.nametraits.companyName
event.remoteHostcontext.ip
user.lastVisitedUserAgentDatacontext.userAgent

Track

RudderStack ingests different event payloads depending on the Gainsight PX event type. It currently supports the following event types before mapping them to the track call:

  • Feature match
  • Engagement
  • Survey
  • Segment match
  • Custom event

A sample input payload is shown below:

{
"user": {
"aptrinsicId": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX",
"identifyId": "New!",
"type": "USER",
"gender": "EMPTY_GENDER",
"email": "userEmail@address.com",
"firstName": "XXXXXX",
"lastName": "XXXXX",
"lastSeenDate": 1665582808669,
"signUpDate": 1665582791753,
"firstVisitDate": 1665582791753,
"title": "Mr.",
"score": 0,
"accountId": "IBM",
"numberOfVisits": 1,
"location": {
"countryName": "India",
},
"propertyKeys": [
"AP-XXXXXXXXXXX-2-1"
],
"createDate": 1685582808376,
"lastModifiedDate": 1685582808717,
"customAttributes": null,
"globalUnsubscribe": false,
"lastVisitedUserAgentData": null,
"id": "New!",
"lastInferredLocation": null
},
"account": {
"id": "IBM",
"name": "International Business Machine",
"lastSeenDate": 1685582808669,
"propertyKeys": [
"AP-EOXPSEZGC5LA-2-1"
],
"createDate": 1685578567565,
"lastModifiedDate": 1685582808669
},
"event": {
"eventType": "CUSTOM",
"eventId": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX",
"propertyKey": "AP-XXXXXXXXXXX-2-1",
"date": 1665656881448,
"sessionId": "AP-XXXXXXXXXXX-2-1XXXXXXXXXXXX-XXXXXXXXX",
"globalContext": {},
"userType": "USER",
"eventName": "Product Clicked",
"attributes": {
"Audience Size": 5000,
"name": "TESTing TRACK CALL FIRST",
"Launched date": 1520532660000,
"Launched": true
},
"url": "http://127.0.0.1:5501/GPXTEST2.html",
"referrer": ""
},
"configId": "XXXXXX-XXXXX-XXXX-XXXX-XXXXXX"
}

RudderStack transforms this payload into the following track payload:

{
"context": {
"library": {
"name": "unknown",
"version": "unknown"
},
"integration": {
"name": "GAINSIGHTPX"
},
"traits": {
"type": "USER",
"gender": "EMPTY_GENDER",
"email": "userEmail@address.com",
"firstName": "XXXXXX",
"lastName": "XXXXX",
"title": "Mr.",
"score": 0,
"globalUnsubscribe": false,
"accountId": "IBM",
"numberOfVisits": 1,
"propertyKeys": [
"AP-XXXXXXXXXXX-2-1"
],
"id": "New!",
"country": "India",
"account": {
"id": "IBM",
"name": "International Business Machine",
"numberOfEmployees": 0,
"numberOfUsers": 0
}
},
"externalId": [{
"type": "gainsightpxAptrinsicId",
"id": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXv"
}]
},
"integrations": {
"GAINSIGHTPX": false
},
"type": "track",
"properties": {
"propertyKey": "AP-XXXXXXXXXXX-2-1",
"Audience Size": 5000,
"name": "TESTing TRACK CALL FIRST",
"Launched date": 1520532660000,
"Launched": true,
"url": "http://127.0.0.1:5501/GPXTEST2.html"
},
"userId": "New!",
"category": "CUSTOM",
"event": "Product Clicked",
"sentAt": "20XX-XX-XXTXX:XX:XX.XXXZ",
"originalTimestamp": "20XX-XX-XXTXX:XX:XX.XXXZ"
}

The general property mappings for these events are listed in the below table:

Gainsight PX propertyRudderStack property
event.eventTypecategory
event.attributesproperties
event.datesentAt
usercontext.traits
event.urlproperties.url
event.remoteHostproperties.ip
user.identifyIduserId
user.aptrinsicIdcontext.externalId[]
user.lastVisitedUserAgentDatauserAgent
event.globalContextproperties.globalContext

The specific property mappings based on the different Gainsight PX event types are listed as follows:

Feature match

Gainsight PX propertyRudderStack property
event.featureNamename
event.featureIdproperties.featureId

Engagement

Gainsight PX propertyRudderStack property
event.engagementNamename
event.engagementIdproperties.engagementId
event.contentTypeproperties.contentType
event.engagementTypeproperties.engagementType
event.interactionproperties.interaction
event.stepNumberproperties.engagement.stepNumber
event.activationproperties.engagement.activation

Survey

Gainsight PX propertyRudderStack property
event.engagementNamename
event.engagementIdproperties.engagementId
event.contentTypeproperties.contentType
event.scoreproperties.survey.score
event.stepNumberproperties.survey.stepNumber
event.userInputproperties.survey.userInput
event.questionTypeproperties.survey.questionType
event.scoreTypeproperties.survey.scoreType
event.surveyTypeproperties.survey.surveyType
event.contactMeAllowedproperties.survey.contactMeAllowed
event.questionTextproperties.survey.questionText
event.questionHtmlproperties.survey.questionHtml
event.answersproperties.survey.answers
event.questionIdproperties.survey.questionId
event.activationproperties.engagement.activation

Segment

Gainsight PX propertyRudderStack property
event.segmentNamename
event.segmentIdproperties.segmentId

Custom event

Gainsight PX propertyRudderStack property
event.eventNamename

FAQ

Why am I unable to view a new user event even after adding it in Gainsight PX?

Gainsight PX lets you track new user signups in your application, add them to your webhook queue, and send this data to your destination. However, this occurs only when Gainsight PX receives an identify event for the new user signed up in the last hour. For more information, refer to this Gainsight PX webhook integration guide.


Contact us

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

On this page