> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gainsight PX as a data source

> Bring your Gainsight PX users, accounts, product usage events, engagements and survey responses to Nekt.

Gainsight PX is a product experience platform: it tracks how people use your web or mobile product (page views, sessions, feature usage, custom events) and runs in-app engagements such as guides, dialogs, carousels and NPS surveys. This connector reads your subscription through the Gainsight PX REST API and brings your users and accounts, the features, segments and engagements you configured, the Knowledge Center content and the full history of product usage events and survey responses.

> [!NOTE]
>
> This page is about **Gainsight PX**. Gainsight CS (the customer success platform, also called NXT) is a different product with its own connector: see [Gainsight](https://docs.nekt.com/sources/gainsight.md).

> [!NOTE]
>
> The connector only reads data. It never creates, changes or deletes anything in Gainsight PX.

## Configuring Gainsight PX as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Gainsight PX option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

The connector uses a Gainsight PX **REST API key**. To create one, log in to Gainsight PX as an administrator, open **Administration > REST API**, click **New API Key**, give it a name, check the **Read** permission and click **Generate**. Copy the key.

* **API Key**: the REST API key you generated.
* **Data Center**: the data center of your Gainsight PX subscription: **US** (`api.aptrinsic.com`), **EU** (`api-eu.aptrinsic.com`) or **US2** (`api-us2.aptrinsic.com`). Most subscriptions are on US; ask your Gainsight PX administrator if you are not sure.
* **Start Date**: the earliest date read by the event tables (page views, sessions, custom events, feature and segment matches, engagement views, survey responses, emails, forms, identifies and leads) on their first sync and on a full sync. Users, accounts and the other lists are always read in full.
* **Event Lookback (hours)**: (Default: 24) each sync of the event tables starts this many hours before the previous sync ended, to catch events that reach Gainsight PX late, for example mobile events sent after the device was offline. Raise it if your product sends events with long delays.

> [!WARNING]
>
> Use a **REST API key** with the **Read** permission. The Product key (tag key, `AP-...`) of the Gainsight PX tracking script does not work here. Write and Production Launch permissions are not needed.

> [!TIP]
>
> A key used with the wrong Data Center is rejected by Gainsight PX. If the connection fails with a rejected key that you know is right, try the other data centers.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: keep the suggested type. The event tables are **Incremental**: each sync reads only the events since the previous one. Users, accounts and the other lists are **Full table**: each sync reads them whole and replaces the table.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers.md), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).

> [!WARNING]
>
> Avoid an **Additional Full Sync** on the event tables. A full sync reads every event again from the Start Date, which takes long on busy products, and Gainsight PX only returns the events it still keeps under your subscription's data retention, so older events can disappear from the table.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

> [!WARNING]
>
> For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.

# Streams and Fields

## Available streams

The table below lists every stream, its **slug** (the exact identifier to pass when creating the source via API) and a short description.

| Stream | Slug | Sync | Description |
| - | - | - | - |
| Subscription | `subscription` | Full table | Your Gainsight PX subscription, with its products and product tag keys. |
| User attributes | `user_attributes` | Full table | Definitions of the default and custom user attributes. |
| Account attributes | `account_attributes` | Full table | Definitions of the default and custom account attributes. |
| Users | `users` | Full table | Users, leads and visitors with profile, activity and custom attributes. |
| Accounts | `accounts` | Full table | Accounts (companies) with firmographics, activity and custom attributes. |
| Features | `features` | Full table | Features and modules mapped in Gainsight PX. |
| Segments | `segments` | Full table | Segments defined in Gainsight PX. |
| Engagements | `engagements` | Full table | In-app dialogs, guides, carousels, surveys and emails. |
| Knowledge Center articles | `articles` | Full table | Articles of the Knowledge Center. |
| Knowledge Center bots | `kc_bots` | Full table | Knowledge Center bots (in-app help centers). |
| Custom events | `custom_events` | Incremental | Custom events sent by your product. |
| Page view events | `page_view_events` | Incremental | Page views. |
| Form submit events | `form_submit_events` | Incremental | Form submissions. |
| Session events | `session_events` | Incremental | Sessions started. |
| Feature match events | `feature_match_events` | Incremental | Uses of the mapped features. |
| Segment match events | `segment_match_events` | Incremental | Users matching a segment. |
| Identify events | `identify_events` | Incremental | Visitors identified as users. |
| Lead events | `lead_events` | Incremental | Lead identifications. |
| Email events | `email_events` | Incremental | Deliveries, opens, clicks, bounces and unsubscribes of Gainsight PX emails. |
| Engagement view events | `engagement_view_events` | Incremental | Views, clicks and answers of in-app engagements. |
| Survey responses | `survey_responses` | Incremental | NPS, CES, rating, boolean and multi-question survey answers. |

Every table needs only the **Read** permission of the API key. The Knowledge Center tables (`articles`, `kc_bots`) need the Knowledge Center in your Gainsight PX plan.

To join the tables: events carry `identify_id` (`users.identify_id`) and `account_id` (`accounts.id`); `feature_match_events.feature_id` joins `features.id`; `segment_match_events.segment_id` joins `segments.id`; `engagement_view_events.engagement_id`, `survey_responses.engagement_id` and `email_events.engagement_id` join `engagements.id`; `users.account_id` joins `accounts.id`. The `property_key` of every table is the product tag key, listed per product in `subscription.products`.

## Fields by stream

Fields marked String (JSON) hold a nested object or list as JSON text; use your warehouse's JSON functions to read them. Dates are in UTC.

> [accordion] Subscription
>
> Your Gainsight PX subscription, with its products and their product tag keys (one row).
>
> Table: `subscription` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the Gainsight PX subscription (primary key). |
> | `name` | String | Name of the subscription. |
> | `description` | String | Description of the subscription. |
> | `website` | String | Website of the subscription. |
> | `time_zone` | String | Time zone of the subscription. |
> | `icon_url` | String | URL of the subscription icon. |
> | `products` | String (JSON) | Products of the subscription, each with its name, description and product tag keys (channel, key and URL). |

> [accordion] User attributes
>
> Definitions of the user attributes, default and custom; `api_name` is the key used in `users.custom_attributes`.
>
> Table: `user_attributes` · Primary key: `api_name` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `api_name` | String | API name of the attribute, used as key in custom\_attributes (primary key). |
> | `id` | String | Unique identifier of the attribute. |
> | `name` | String | Display name of the attribute. |
> | `internal_name` | String | Internal name of the attribute. |
> | `description` | String | Description of the attribute. |
> | `type` | String | Data type of the attribute: STRING, DATE\_TIME, BOOLEAN or NUMBER. |
> | `state` | String | State of the attribute: ENABLED, DISABLED or DELETED. |
> | `origin` | String | CUSTOM (created by you) or DEFAULT (built into Gainsight PX). |
> | `created_date` | Datetime | When the attribute was created. |
> | `modified_date` | Datetime | When the attribute was last modified. |
> | `default_value` | String | Default value of the attribute. |

> [accordion] Account attributes
>
> Definitions of the account attributes, default and custom; `api_name` is the key used in `accounts.custom_attributes`.
>
> Table: `account_attributes` · Primary key: `api_name` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `api_name` | String | API name of the attribute, used as key in custom\_attributes (primary key). |
> | `id` | String | Unique identifier of the attribute. |
> | `name` | String | Display name of the attribute. |
> | `internal_name` | String | Internal name of the attribute. |
> | `description` | String | Description of the attribute. |
> | `type` | String | Data type of the attribute: STRING, DATE\_TIME, BOOLEAN or NUMBER. |
> | `state` | String | State of the attribute: ENABLED, DISABLED or DELETED. |
> | `origin` | String | CUSTOM (created by you) or DEFAULT (built into Gainsight PX). |
> | `created_date` | Datetime | When the attribute was created. |
> | `modified_date` | Datetime | When the attribute was last modified. |
> | `default_value` | String | Default value of the attribute. |

> [accordion] Users
>
> Every user (and lead or visitor) Gainsight PX knows, with profile, activity and custom attributes.
>
> Table: `users` · Primary key: `aptrinsic_id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `aptrinsic_id` | String | Gainsight PX internal unique identifier of the user (primary key). |
> | `identify_id` | String | Identifier of the user in your product, as sent to Gainsight PX by the identify call. |
> | `id` | String | Synonym of identify\_id returned by the API. |
> | `global_id` | String | Global user ID, only filled for workspace-enabled subscriptions. |
> | `type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `gender` | String | Gender: MALE, FEMALE, OTHER or EMPTY\_GENDER. |
> | `email` | String | Email address of the user. |
> | `first_name` | String | First name of the user. |
> | `last_name` | String | Last name of the user. |
> | `last_seen_date` | Datetime | When the user was last seen in your product. |
> | `sign_up_date` | Datetime | When the user signed up. |
> | `first_visit_date` | Datetime | When the user first visited your product. |
> | `title` | String | Job title of the user. |
> | `phone` | String | Phone number of the user. |
> | `score` | Integer | Score of the user. |
> | `role` | String | Role of the user. |
> | `subscription_id` | String | Subscription ID of the user. |
> | `account_id` | String | ID of the account the user belongs to (see the accounts table). |
> | `number_of_visits` | Integer | Number of visits of the user. |
> | `location` | String (JSON) | Location (country, state, city, street, postal code, continent, region, time zone and coordinates) set for the user. |
> | `last_inferred_location` | String (JSON) | Location inferred from the IP address of the user's last session. |
> | `property_keys` | Array of strings | Gainsight PX product tag keys (property keys) the user was seen in. |
> | `create_date` | Datetime | When the user record was created in Gainsight PX. |
> | `last_modified_date` | Datetime | When the user record was last modified in Gainsight PX. |
> | `custom_attributes` | String (JSON) | Custom attributes of the user, as a map of attribute API name to value. |
> | `global_unsubscribe` | Boolean | Whether the user unsubscribed from all Gainsight PX emails. |
> | `sfdc_contact_id` | String | Salesforce contact ID of the user. |
> | `channel_metric_list` | String (JSON) | First and last seen dates of the user per channel and environment. |
> | `last_visited_user_agent_data` | String (JSON) | Browser, device and platform of the user's last visit, per product. |

> [accordion] Accounts
>
> Every account (company) Gainsight PX knows, with firmographics, activity and custom attributes.
>
> Table: `accounts` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the account (primary key). |
> | `name` | String | Name of the account. |
> | `tracked_subscription_id` | String | Tracked subscription ID of the account. |
> | `sfdc_id` | String | Salesforce ID of the account. |
> | `last_seen_date` | Datetime | When a user of the account was last seen in your product. |
> | `duns_number` | String | D-U-N-S number of the account. |
> | `industry` | String | Industry of the account. |
> | `number_of_employees` | Integer | Number of employees of the account. |
> | `sic_code` | String | SIC code of the account. |
> | `website` | String | Website of the account. |
> | `naics_code` | String | NAICS code of the account. |
> | `plan` | String | Plan of the account. |
> | `location` | String (JSON) | Location (country, state, city, street, postal code, continent, region, time zone and coordinates) of the account. |
> | `number_of_users` | Integer | Number of users of the account. |
> | `property_keys` | Array of strings | Gainsight PX product tag keys (property keys) the account was seen in. |
> | `create_date` | Datetime | When the account record was created in Gainsight PX. |
> | `last_modified_date` | Datetime | When the account record was last modified in Gainsight PX. |
> | `custom_attributes` | String (JSON) | Custom attributes of the account, as a map of attribute API name to value. |
> | `parent_group_id` | String | ID that groups accounts together (parent account). |
> | `renewal_date` | Datetime | Renewal date of the account. |
> | `health_score` | Integer | Health score of the account. |
> | `gs_id` | String | Gainsight CS (NXT) ID of the account. |
> | `nps` | Number | NPS of the account. |
> | `csm` | String | Customer success manager of the account. |

> [accordion] Features
>
> Features and modules mapped in Gainsight PX.
>
> Table: `features` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the feature (primary key). |
> | `name` | String | Name of the feature. |
> | `type` | String | FEATURE or MODULE (a module groups features). |
> | `parent_feature_id` | String | ID of the parent module of the feature. |
> | `property_key` | String | Gainsight PX product tag key (property key) of the feature. |
> | `status` | String | Status of the feature: ACTIVATED or DELETED. |
> | `feature_labels` | String (JSON) | Labels of the feature (id, name and color). |

> [accordion] Segments
>
> Segments defined in Gainsight PX.
>
> Table: `segments` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the segment (primary key). |
> | `name` | String | Name of the segment. |

> [accordion] Engagements
>
> In-app dialogs, guides, carousels, surveys and emails configured in Gainsight PX.
>
> Table: `engagements` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the engagement (primary key). |
> | `name` | String | Name of the engagement. |
> | `description` | String | Description of the engagement. |
> | `type` | String | Type of engagement (EMAIL, IN\_APP\_DIALOG, IN\_APP\_GUIDE, IN\_APP\_NPS\_SURVEY, ...). |
> | `state` | String | State of the engagement: IN\_PROGRESS, STARTED, PAUSED, FAILED, EDITING or COMPLETED. |
> | `property_keys` | Array of strings | Gainsight PX product tag keys (property keys) of the engagement. |
> | `envs` | Array of strings | Environments the engagement runs in. |
> | `default_language` | String | Default language of the engagement. |
> | `languages` | String (JSON) | Languages of the engagement and whether each one is translated. |
> | `translation_state` | String | Translation state of the engagement. |

> [accordion] Knowledge Center articles
>
> Articles of the Knowledge Center.
>
> Table: `articles` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the article (primary key). |
> | `article_name` | String | Name of the article. |
> | `author` | String | Author of the article. |
> | `created_date` | Datetime | When the article was created. |
> | `modified_date` | Datetime | When the article was last modified. |
> | `modified_by` | String (JSON) | User who last modified the article (id and name). |
> | `release_date` | Datetime | Release date of the article. |
> | `default_language` | String | Default language of the article. |
> | `languages` | String (JSON) | Languages of the article and whether each one is translated. |
> | `translation_state` | String | Translation state of the article. |
> | `product_id` | String | ID of the Gainsight PX product of the article. |
> | `product_name` | String | Name of the Gainsight PX product of the article. |
> | `view_type` | String | View type of the article. |
> | `article_kcs` | String (JSON) | Knowledge Center bots the article is published in (kcId and kcName). |

> [accordion] Knowledge Center bots
>
> Knowledge Center bots (in-app help centers).
>
> Table: `kc_bots` · Primary key: `id` · Sync: Full table
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `id` | String | Unique identifier of the Knowledge Center bot (primary key). |
> | `name` | String | Name of the Knowledge Center bot. |
> | `description` | String | Description of the Knowledge Center bot. |
> | `status` | String | Status of the Knowledge Center bot. |
> | `priority` | Integer | Priority of the Knowledge Center bot. |
> | `environments` | Array of strings | Environments the Knowledge Center bot is published in. |
> | `product_id` | String | ID of the Gainsight PX product of the bot. |
> | `product_name` | String | Name of the Gainsight PX product of the bot. |
> | `default_language` | String | Default language of the bot. |
> | `languages` | String (JSON) | Languages of the bot and whether each one is translated. |
> | `created_by` | String (JSON) | User who created the bot (id and name). |
> | `created_date` | Datetime | When the bot was created. |
> | `modified_by` | String (JSON) | User who last modified the bot (id and name). |
> | `modified_date` | Datetime | When the bot was last modified. |

> [accordion] Custom events
>
> Custom events sent by your product to Gainsight PX.
>
> Table: `custom_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `event_name` | String | Name of the custom event. |
> | `attributes` | String (JSON) | Attributes (properties) sent with the custom event. |
> | `url` | String | URL where the custom event was sent from. |
> | `referrer` | String | Referrer URL. |
> | `remote_host` | String | IP address the event came from. |

> [accordion] Page view events
>
> Page views captured by the Gainsight PX tag.
>
> Table: `page_view_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `scheme` | String | URL scheme of the page (http or https). |
> | `host` | String | Host of the page. |
> | `path` | String | Path of the page. |
> | `query_string` | String | Query string of the page URL. |
> | `hash` | String | Hash (fragment) of the page URL. |
> | `query_params` | String (JSON) | Query parameters of the page URL, as a map. |
> | `remote_host` | String | IP address the event came from. |
> | `referrer` | String | Referrer URL. |
> | `screen_height` | Integer | Screen height in pixels. |
> | `screen_width` | Integer | Screen width in pixels. |
> | `languages` | Array of strings | Browser languages of the user. |
> | `page_title` | String | Title of the page. |

> [accordion] Form submit events
>
> Form submissions captured by the Gainsight PX tag.
>
> Table: `form_submit_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `scheme` | String | URL scheme of the page (http or https). |
> | `host` | String | Host of the page. |
> | `path` | String | Path of the page. |
> | `query_string` | String | Query string of the page URL. |
> | `hash` | String | Hash (fragment) of the page URL. |
> | `query_params` | String (JSON) | Query parameters of the page URL, as a map. |
> | `remote_host` | String | IP address the event came from. |
> | `referrer` | String | Referrer URL. |
> | `screen_height` | Integer | Screen height in pixels. |
> | `screen_width` | Integer | Screen width in pixels. |
> | `languages` | Array of strings | Browser languages of the user. |
> | `page_title` | String | Title of the page. |
> | `form_data` | String (JSON) | Data of the form submitted. |

> [accordion] Session events
>
> Sessions started by your users.
>
> Table: `session_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `remote_host` | String | IP address the session came from. |
> | `inferred_location` | String (JSON) | Location inferred from the IP address of the session. |

> [accordion] Feature match events
>
> Uses of the features mapped in Gainsight PX.
>
> Table: `feature_match_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `feature_id` | String | ID of the feature used (see the features table). |

> [accordion] Segment match events
>
> Moments when a user matched a segment.
>
> Table: `segment_match_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `segment_id` | String | ID of the segment the user matched (see the segments table). |

> [accordion] Identify events
>
> Identify calls (a visitor identified as a user).
>
> Table: `identify_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `email` | String | Email address of the identified user. |

> [accordion] Lead events
>
> Lead identifications.
>
> Table: `lead_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `email` | String | Email address of the lead. |

> [accordion] Email events
>
> Delivery, open, click, bounce and unsubscribe events of Gainsight PX emails.
>
> Table: `email_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `engagement_id` | String | ID of the email engagement (see the engagements table). |
> | `email` | String | Email address the message was sent to. |
> | `email_track_type` | String | Email event: PROCESSED, DELIVERED, OPEN, CLICK, BOUNCE, DEFERRED, DROPPED or UNSUBSCRIBE (EMAIL\_TRACK\_ prefix). |
> | `status` | String | Delivery status. |
> | `reason` | String | Reason given for a bounce, drop or deferral. |
> | `bounce_type` | String | Bounce type: DELIVER\_BOUNCE, DELIVER\_BLOCKED or DELIVER\_EXIPERED. |
> | `mta_response` | String | Response of the receiving mail server. |
> | `attempt` | String | Delivery attempt. |
> | `link_index` | Integer | Position of the link clicked. |
> | `link_type` | String | Type of the link clicked (HTML, header or text link). |
> | `link_url` | String | URL of the link clicked. |
> | `inferred_location` | String (JSON) | Location inferred from the IP address of the email event. |

> [accordion] Engagement view events
>
> Views, clicks and answers of in-app engagements (dialogs, guides, carousels and surveys).
>
> Table: `engagement_view_events` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `engagement_id` | String | ID of the engagement (see the engagements table). |
> | `engagement_track_type` | String | ENGAGEMENT\_VIEW or ENGAGEMENT\_CLICK. |
> | `content_id` | String | ID of the engagement content. |
> | `content_type` | String | Content type (IN\_APP\_DIALOG, IN\_APP\_GUIDE, IN\_APP\_CAROUSEL, IN\_APP\_SURVEY\_NPS, IN\_APP\_SURVEY\_CES, ...). |
> | `execution_date` | Datetime | When the engagement was shown; the same on every event of one engagement view (e.g. each answer of a multi-question survey). |
> | `execution_id` | String | ID of the engagement view; the same on every event of one view (e.g. each answer of a multi-question survey). |
> | `view_event_id` | String | ID of the view event this event relates to. |
> | `carousel_state` | String | Carousel state: VIEWED or COMPLETED. |
> | `slide_id` | String | ID of the carousel slide. |
> | `sequence_number` | Integer | Sequence number of the step or slide. |
> | `link_url` | String | URL of the link clicked. |
> | `guide_state` | String | Guide state: VIEWED or COMPLETED. |
> | `step_id` | String | ID of the guide step. |
> | `survey_state` | String | Survey state: VIEWED or COMPLETED. |
> | `contact_me_allowed` | Boolean | Whether the user allowed to be contacted about the survey answer. |
> | `score` | Integer | Score given in the survey (NPS, CES or rating). |
> | `comment` | String | Comment left in the survey. |
> | `question_type` | String | Type of the survey question answered. |
> | `selection_ids` | Array of strings | IDs of the options selected in the survey question. |
> | `path` | String | Path of the page where the engagement was shown. |

> [accordion] Survey responses
>
> Answers to in-app surveys: NPS, CES, rating, boolean and multi-question surveys.
>
> Table: `survey_responses` · Primary key: `event_id` · Sync: Incremental (by `date`)
>
> | Field | Type | Description |
> | :- | :- | :- |
> | `event_id` | String | Unique identifier of the event (primary key). |
> | `date` | Datetime | When the event happened (UTC), used as the incremental replication key. |
> | `identify_id` | String | Identifier of the user who generated the event (see the users table). |
> | `account_id` | String | ID of the account of the user (see the accounts table). |
> | `property_key` | String | Gainsight PX product tag key (property key) the event was captured in. |
> | `event_type` | String | Type of the event. |
> | `session_id` | String | ID of the session the event belongs to. |
> | `user_type` | String | Type of user: LEAD, USER, VISITOR or EMPTY\_USER\_TYPE. |
> | `global_context` | String (JSON) | Global context attributes sent with the event. |
> | `engagement_id` | String | ID of the engagement (see the engagements table). |
> | `engagement_track_type` | String | ENGAGEMENT\_VIEW or ENGAGEMENT\_CLICK. |
> | `content_id` | String | ID of the engagement content. |
> | `content_type` | String | Content type (IN\_APP\_DIALOG, IN\_APP\_GUIDE, IN\_APP\_CAROUSEL, IN\_APP\_SURVEY\_NPS, IN\_APP\_SURVEY\_CES, ...). |
> | `execution_date` | Datetime | When the engagement was shown; the same on every event of one engagement view (e.g. each answer of a multi-question survey). |
> | `execution_id` | String | ID of the engagement view; the same on every event of one view (e.g. each answer of a multi-question survey). |
> | `view_event_id` | String | ID of the view event this event relates to. |
> | `carousel_state` | String | Carousel state: VIEWED or COMPLETED. |
> | `slide_id` | String | ID of the carousel slide. |
> | `sequence_number` | Integer | Sequence number of the step or slide. |
> | `link_url` | String | URL of the link clicked. |
> | `guide_state` | String | Guide state: VIEWED or COMPLETED. |
> | `step_id` | String | ID of the guide step. |
> | `survey_state` | String | Survey state: VIEWED or COMPLETED. |
> | `contact_me_allowed` | Boolean | Whether the user allowed to be contacted about the survey answer. |
> | `score` | Integer | Score given in the survey (NPS, CES or rating). |
> | `comment` | String | Comment left in the survey. |
> | `question_type` | String | Type of the survey question answered. |
> | `selection_ids` | Array of strings | IDs of the options selected in the survey question. |
> | `path` | String | Path of the page where the engagement was shown. |

## Implementation Notes

### Data Quality Considerations

* **Event tables are read day by day.** Each request covers one day of events, from the Start Date (first sync) or from the Event Lookback before the previous sync (later syncs, 24 hours by default), up to the moment the sync started. The overlap catches events that reach Gainsight PX late; events are merged by `event_id`, so nothing is duplicated. Events that arrive later than the lookback, such as feature matches recalculated with Gainsight PX's feature backfill, are only read by a full sync of that table.
* **A failed sync never skips events.** The position of an event table only moves forward when the whole table was read; if a sync fails, the next one reads the same period again. If Gainsight PX answers a page twice, the table is not updated in that sync instead of being loaded in part.
* **Users and accounts are read in full on every sync.** Gainsight PX does not tell which users or accounts changed since a date (activity such as `last_seen_date` may change without a new `last_modified_date`), so these tables are replaced by the current list on each sync.
* **Custom attributes.** `custom_attributes` holds every custom attribute of a user or account as JSON, keyed by the attribute's API name; `user_attributes` and `account_attributes` describe each one (name, type, state).
* **Surveys.** Each answer of a multi-question survey is its own row in `survey_responses`; the rows of one survey view share `execution_id`. `score` holds the NPS, CES or rating score, `comment` the free text and `selection_ids` the options picked. `survey_responses` is the survey part of `engagement_view_events`.
* **Dates set to 0 by Gainsight PX** (for example a user who never visited) are loaded as empty, not as 1970.
* **Permissions.** If the API key or the plan does not give access to a table (for example the Knowledge Center), that table is skipped and shown as failed, the sync log names it and says why, and the other tables keep syncing. A rejected API key fails the whole sync.
* **Not available.** Feature adoption statistics, engagement error and collision monitoring, user preferences and Knowledge Center translations (XLIFF) are not extracted.

### API Limits & Performance

* Gainsight PX allows about 200 requests per second and 1 million requests per day per subscription. When Gainsight PX asks the connector to slow down, it waits and tells you in the sync log.
* Users, accounts and events are read 500 to 1,000 per request. The first sync of the event tables reads the whole history since the Start Date and can take a while on busy products; choose a recent Start Date if you do not need the full history.

## Troubleshooting

| Error or symptom | What it means | What to do |
| :- | :- | :- |
| "Gainsight PX rejected the API key of this source" | The key is wrong or was deleted, or the Data Center does not match your subscription. | Create a REST API key with the Read permission under Administration > REST API, and check the Data Center (US, EU or US2). |
| "The API key of this source is not allowed to read ..." or "... cannot be read: ...: the API key is not allowed to read it (403)" | The key has no Read permission. | Edit the key in Administration > REST API and check Read, or deselect the tables listed. |
| "... does not offer it for this subscription (404)" | The feature behind the table (for example the Knowledge Center) is not part of your Gainsight PX plan. | Deselect the table. |
| "Could not connect to Gainsight PX" | Gainsight PX did not answer. | Check the Data Center of the source; if it is right, the next sync tries again. |
| "Gainsight PX is limiting the request rate" | Gainsight PX asked the connector to slow down. | No action needed; the sync waits and continues. |
| "Gainsight PX announced more records than it returned", "stopped returning the next page", "returned the same page twice" or "returned events outside the requested dates" | Gainsight PX answered in an unexpected way; the table was not updated in this sync. | Usually temporary; the next sync tries again. If it repeats, contact Nekt support. |
| "Gainsight PX returned an unexpected answer" or "did not answer correctly ... even after several tries" | The Gainsight PX API changed or kept failing. | Contact Nekt support if it repeats. |

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

> [card] [Download Gainsight PX skills file](https://docs.nekt.com/sources/gainsight-px.md)
>
> Gainsight PX connector documentation as plain markdown, for use in AI agent contexts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.