Skip to main content
Gainsight Inc.

Salesforce Integration in Gainsight PX (Bi-Directional)

This article explains how to configure the integration between Gainsight PX and Salesforce and vice-versa. 


Salesforce integration in Gainsight PX increases the effectiveness of your product by keeping your customers engaged within their applications. This empowers customer success as you can learn about your customers’ health score at a very early stage to  help CSMs improve the product quality  to ensure customer retention.

With this integration in place, you can slice and dice the product data based on Salesforce attributes. You can also use these granular levels of details to create in-app messaging and personalize engagements for a specific segment of end-users. In addition, you can implement product usage from accounts and contacts in Salesforce reports and views. 

The Gainsight PX Salesforce Integration allows you to fetch data from Salesforce to Gainsight PX and vice versa for the Account, Contact records and various SDFC Custom Objects. If a matching SFDC record is found for a given Gainsight PX record, then the chosen field on the field mapping screen is copied from the Salesforce object to the matched Gainsight PX record.

WARNING: For the integration to work properly, you must ensure that there are no duplicates of the key field used to link Gainsight PX and Salesforce. If there are two records in PX with the same Salesforce ID, the data from both PX records attempts to update the same record in SFDC, in no particular order.


  • If you  do not use the standard SFDC Account and/or standard SFDC Contact objects and instead have your Accounts and Contacts defined as an SFDC Custom Object, this integration also allows you to specify any SFDC Custom Object as the SFDC Source object.
  • This Integration is not available on the AppExchange, and it is not a Managed Package Integration. 


Gainsight PX admin helps you to set-up the integration and fetch data into your application. You must ensure that the existing integration set-up is working. Before you proceed to configuring the Salesforce Integration in Gainsight PX, ensure that the following points are taken care of:

  • The sync must be successful. The last sync date and time is displayed on the card. 
  • Salesforce users must be authenticated. 

Limitation: Gainsight PX does not support integration with the Salesforce sandbox environment.

Integration Schedule

Data is fetched from Salesforce every day at midnight GMT and mapped to Gainsight PX data at 4 AM GMT. Data is pushed to Salesforce every day at 3 AM, 11 AM, and 7 PM GMT. You can also manually sync the data at any point in Gainsight PX by clicking the Synchronize button. 

Salesforce Integration.png

Matching Logic

As a Salesforce admin, you must have access to the objects required for the integration.. You need admin access to configure Data pushed for Account/Contact or equivalent SFDC Custom Object.

To configure Matching Logic:

  1. Navigate to Administration > Integrations.
  2. Click the Settings icon on the Salesforce card. The Matching Logic window appears.

Matching Logicc.png

  1. Enable the Accounts toggle switch under the Retrieve from Salesforce section.
  2. Select the Custom Field Matching checkbox.
  3. Select the required Fields for both Gainsight PX and Salesforce to perform mapping.
  4. Select the Website Domain checkbox. This option enables you to associate Salesforce Account and PX account only if they have the same domain on both objects.

In addition to this, Gainsight PX allows you to map feature metrics. If you enable and/or Contacts option, select the Email checkbox to map the Gainsight PX user email with the Salesforce Contact email to map.

Field Mapping

The Mapped Fields option allows you to map the field(s) in SFDC that you want to import to Gainsight PX.

Supported Field Types

Field mapping allows you to map the field(s) in SFDC that you want to push to Gainsight PX. Authorize your access to Salesforce using the Authorize button on the Salesforce card. Click on the Map Fields icon on the Salesforce card. The Mapping fields window is displayed. 

The following are the type of fields supported for mapping:

PX Data Type SFDC Field Type

Data Pulled from Salesforce

You need to configure the Mapped Fields window on Account/Contact records. For more information about Account Match Scenario and Contact Match Scenario, refer to the Appendix section in this article.

To configure the data pull:

  1. Navigate to Administration > Integrations.If the Salesforce application is enabled for your account, you will see the Salesforce Integration feilds on the right-hand side.
    IMPORTANT: To use the Gainsight PX/Salesforce Integration, you need to sign into Salesforce as a user with Read access to the Accounts object and Contacts object.
  2. Click on the Map Fields icon on the Salesforce card. The Mapping fields window displays.
  3. Select Account and/or Contact tab(s) where data will be pulled from/pushed to Salesforce.

Map fields.png

  1. Select the → data pulled from option.


  1. Select the fields that you want to map.
  2. Click Apply.

On the initial sync after authorization, PX pulls data that is modified within the past six months. Ensure that the last modified date field in SFDC must be updated to be within the last six months for the first sync. From the subsequent sync, PX pulls only the updated records from the previous day.

Once the Salesforce data is linked, you can use it across Gainsight PX. You can slice and dice your data, filter, and analyze engagements based on the Salesforce attributes. The following image shows how to add a filter based on Salesforce accounts.

SFDC Accounts filter.png

Data Pushed to Salesforce

You need to consider the following prerequisites before you can push Account records:

  • SFDC ID must be available on Accounts Explorer and to push Contact records, SFDC Contact ID must be available on Audience Explorer.
  • Gainsight PX only pushes the data to fields contains PX_ as prefix. For example, PX_Test_String, etc.
    • Note: Fields prefixed with PX_ are available as destinations for the push operation. Hence, on the Matching Logic page, such fields are not available for selection in the Salesforce field dropdown for the Custom Field Matching option. Only non-push fields are available in the dropdown.

When you select the → data pushed to option as shown in the following image, the data is pushed from Gainsight PX Account and Contact records to Salesforce.


The data push helps you access Gainsight PX data in Salesforce for workflows, creating tasks, sending notifications, reporting, and other integrations. 

Example Use Cases:

  • Schedule an engagement when a customer is within 90 days of renewal.
  • Create tasks for CSMs when an activity needs attention.
  • Use Gainsight PX data with Salesforce support data to create a health score.

When pushing Accounts data, Gainsight PX allows you to push Account KPI metrics that are calculated and not part of the Account object. The following is the list of calculated fields that are supported:

  • Month over Month (MoM) Change
  • Weekly Active Users (WAU) Count
  • Quarterly Active Users (QAU) Count
  • Quarter over Quarter (QoQ) Change
  • Week over Week (WoW) Change
  • Last Week NPS® Score
  • WoW NPS® Score
  • Last Week NPS® Responses
  • WoW NPS® Responses
  • Last Quarter NPS® Score
  • Last Month NPS® Score
  • Last Quarter NPS® Responses
  • Last Month NPS® Responses
  • QoQ NPS® Score
  • QoQ NPS® Responses
  • MoM NPS® Score
  • MoM NPS® Responses
  • Monthly Active Users (MAU) Count: Last 30 days MAU, rolling window
  • Last Month MAU: Last calendar month MAU

Using Salesforce Custom Objects 

You can select a custom object as the Salesforce object for the sync operation. If you do not use the standard SFDC Account and/or standard SFDC Contact objects and instead have your Accounts and Contacts defined in an SFDC Custom Object, this integration also allows you to specify any SFDC Custom Object as the SFDC Source object. If you select a custom object, that object type is used for all sync operations (pull and push).

The dropdown on the right-hand side of the mapping screen allows you to select a target for your sync operation for either accounts or users.

Account drop down.png

Tip: As a best practice, you can continue to sync PX accounts SFDC Accounts and PX users to SFDC Contacts.


  • The Integration requires Salesforce API access with Enterprise, Unlimited or a ​paid upgrade to Professional with API access added. Navigate to the Manage Users > Profiles > System Administrator > System Permissions page and ensure that the API Enabled checkbox is selected.
  • The integration currently supports syncing the Accounts and Contacts standard Salesforce Objects.



Account Match Scenario

Finds the first matching account by iterating through the matching criteria that are selected in the SFDC integration screen. The first account found that matches is selected.

Matching Type Logic Notes
sfdcId to Salesforce ID account.sfdcId equal to  
Custom Field Matching Matching value in the two given fields

Fields must be of the same type, only strings and integral (whole number) numerics are supported.

Website Domain domain equal to domain  
Name equal to  
Recent user domain domain equal to domain Retrieves 100 most recently seen users and extracts they domains from their email addresses. If more than 50 of those have the same domain, those are used to match against the domain of the account's website.

Contact Match Scenario

Finds the first matching contact by iterating through the matching criteria that are selected in the SFDC integration screen.  The first contact found that matches is selected.

The matching is performed in the following order:

Matching Type Logic Notes
sfdcContactId to Salesforce Contact ID

user.sfdcContactID equal to

Custom Field Matching Matching value in the two given fields Fields must be of the same type, only strings and integral (whole number) numeric are supported.
Email equal to If more than one matching email on SFDC, not considered a match
Phone equal to If more than one matching phone on SFDC, not considered a match

KPIs for Push to Salesforce (in addition to Custom Attributes)

Currently, the NPS® is only on the Account level. When a user map contact, only contact’s attributes can be pulled/pushed, no KPIs or individual NPS® responses can be pulled/pushed.



  • Active engagements count
  • Number of engagements field


  • 90 day NPS® Score
  • 90 day NPS® Responses
  • 30 day NPS® Score 
  • 30 day NPS® Responses 
  • 7 day NPS® Score 
  • 7 day NPS® Responses 

Note: For 90 day it is called as “% change in 90 day NPS®” which shows the score for the previous period of time.

Feature Usage

For features, the attributes are organized as:

  • Feature Users Last 90 Days
  • Feature Users Last 30 Days
  • Feature Users Last 7 Days
  • % change in 90 Day Feature Users 
  • % change in 30 Day Feature Users
  • % change in 7 Day Feature Users

Active Usage

  • 90 Day Active User Count
  • % change in 90 Day Active User
  • 30 Day Active User Count
  • % change in 30 Day Active User
  • 7 Day Active User Count
  • % change in 7 Day Active User

Raw list of KPIs Currently In App

  • Feature usage last 30 days
  • Feature usage last 30 days
  • Feature usage last 7 days
  • Feature usage monthly change
  • Feature usage quarterly change
  • Feature usage weekly change
  • Last month NPS® responses
  • Last month NPS® score
  • Last quarter NPS® responses
  • Last quarter NPS® score
  • Last Week NPS® responses
  • Last Week NPS® score
  • Month over month NPS® responses
  • Month over month NPS® score
  • Monthly active users
  • Monthly active users change
  • Quarter over quarter NPS® responses
  • Quarter over quarter NPS® score
  • Quarterly active users
  • Quarterly active users change
  • Week over week NPS® responses
  • Week over week NPS® score
  • Weekly active users
  • Weekly active users change

Knowledge Base Integration 

When PX is configured with Salesforce, you can view and search all the articles available in Salesforce through PX Knowledge Center Bot. For more information, refer to the Integrate Salesforce Knowledge Base with Knowledge Center Bot article from the Additional Resources section.

Additional Resources

 Integrate Salesforce Knowledge Base with Knowledge Center Bot


NPS, Net Promoter, and Net Promoter Score are registered trademarks of Satmetrix Systems, Inc., Bain & Company and Fred Reichheld