Send events to Gainsight PX using RudderStack cloud mode.
3 minute read
After you have successfully instrumented Gainsight PX as a destination in RudderStack, follow this guide to correctly send your events to Gainsight PX in cloud mode.
Find the open source transformer code for this destination in the GitHub repository.
RudderStack requires the userId field for the identify, group, and track calls. If userId is absent, it uses anonymousId instead.
Identify
RudderStack creates a User object in Gainsight PX when you make an identify call. It maps the userId from the event to Gainsight’s identifyId (unique identifier for the User object). If userId is absent, RudderStack uses anonymousId instead.
RudderStack supports all default attributes for the User object. You can map the custom atrributes in the RudderStack event to the Gainsight PX custom attributes using User Attribute Mappingdashboard setting:
RudderStack drops any undefined custom attributes from the event and sends the rest of the attributes to Gainsight PX.
In the above example, hobbyCustomField is a custom field. You need to provide the mapping for hobbyCustomField to the corresponding custom attribute hobbycreated in Gainsight PX. If you do not provide this mapping, RudderStack drops the hobbyCustomField attribute and sends the other attributes to Gainsight PX.
rudderanalytics.track("User Tracked",{description:"Sample user tracking event",status:"Demo",})
RudderStack maps the event name to the eventName field in Gainsight PX.
Specify global context metadata
You can provide the Global Context metadata by specifying the globalContext object in the track event as shown:
rudderanalytics.track("User Tracked",{description:"Sample user tracking event",status:"Demo",globalContext:{projectId:"p-123",},})
Alternatively, you can set the global context for the track events by specifying the key-value pairs under the Global Context Mappingdashboard setting, as shown:
RudderStack gives higher precedence to the global context metadata specified in the event over the key-value pairs specified in the Global Context Mapping setting.
Group
RudderStack associates the user with an account in Gainsight PX when you send a group event. It automatically maps the groupId to the accountId in Gainsight PX.
RudderStack supports all the default fields for Account object. In addition, you can map the custom RudderStack event attributes to Gainsight custom attributes in the Account Attribute Mappingdashboard setting:
In the above example, cultureCustomField is a custom field. You need to provide the mapping for cultureCustomField to the corresponding custom attribute customfield01created in Gainsight PX. If you do not provide this mapping, RudderStack drops the cultureCustomField attribute and sends the other attributes to Gainsight PX.
To update the group details with fewer API calls to Gainsight PX, make sure to set limitAPIForGroup to true in the event’s context, as shown:
rudderanalytics.group('group18',{name:'New Group Name',industry:'Online Streaming',numberOfEmployees:5000,website:'www.new-group.com',cultureCustomField:'customfield01',},{integrations:{All:true,GAINSIGHT_PX:{limitAPIForGroup:true}}},);
Note that the if the groupId is invalid, then RudderStack creates a new group in Gainsight PX with the provided ID.
Location attribute mapping
RudderStack maps the below event properties to the corresponding location properties of the Gainsight PX User and Account objects:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.