Skip to main content
Gainsight Inc.

Gainsight PX Contentful Integration

This article explains how to configure the integration between Gainsight PX and Contentful.

Overview 

This article explains how you can integrate Gainsight PX with Contentful to access the knowledge base resources in the PX Knowledge Center bot. When PX is configured with Contentful, you can search and view the articles available in Contentful through Knowledge Center Bot.

Integrate Contentful 

To configure the integration between PX and Contentful:

  1. Login to Gainsight PX with your personal credentials. 
  2. Navigate to Administration > Integrations. Contentful appears in the list of Knowledge Center Integrations.

Contentful 1.png

  1. Click the Settings icon. The Contentful Knowledge Management window displays.

Contentful Configuration CKM.png

  1. Provide the Access Token and Space ID and Environment ID (Optional) of your Contentful account.
  2. Click Apply.

You can now verify the integration by navigating to Knowledge Center Bot.

Validate Integration 

To verify if the integration is successful: 

  1. Navigate to the desired Knowledge Center Bot.
  2. In Editor, click on the Articles Search tab.
  3. From the list of Knowledge Base, select Contentful. The Knowledge Base tab displays.

Contentful Validation.png

Users can now view or search the resources from Contentful in the Knowledge Base tab of the KC bot.

Note: All content types can be searched that have the main content (either RichText or Markdown) in a field with an ID of body. In addition, if there is a field with the ID of description, it is displayed as the article summary/description in the search results.

Add Tag Filters to Contentful Knowledge Base 

When you search Contentful articles from the KC Bot, all the articles that match your search term are displayed. However, Gainsight PX allows you to limit the scope of the search to a few articles by using tags.

Use a tag in your Contentful articles, that you want to be displayed on the KC bot. 

To limit the search scope, issue the API call:

aptrinsic('bot', 'search', {labels: ['test_label']});

Based on the above API call, only those articles which are assigned the test_label label are shown in the KC bot search. 

To clear the search labels, issue the API call:

aptrinsic('bot','search', { labels: [] });