# Gainsight PX

> Keep your product's users and accounts in Gainsight PX, track custom events, read page views, feature use, survey responses and engagements, start or pause engagements, and follow new users, accounts, events and survey responses.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/gainsight-px

## Actions

### Create account

Add a company to Gainsight PX, with its details and custom attributes.

**Inputs**

- Account ID (`account_id`, text, required): The account's ID, the one your product sends Gainsight PX.
- Name (`name`, text, required): The account's name.
- Products (`property_keys`, list, required): The products the record belongs to.
- Plan (`plan`, text): The account's plan.
- Industry (`industry`, text): The account's industry.
- Website (`website`, text): The account's website.
- Employees (`number_of_employees`, number): How many people the company employs. At least 0.
- Renewal date (`renewal_date`, date and time): When the account renews.
- Salesforce account ID (`sfdc_id`, text): The account's Salesforce account ID.
- Parent group ID (`parent_group_id`, text): An ID of your own that groups accounts together, such as a parent company's.
- SIC code (`sic_code`, text): The SIC code.
- NAICS code (`naics_code`, text): The NAICS code.
- D-U-N-S number (`duns_number`, text): The D-U-N-S number.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- Country (`country`, text): The country's name.
- Postal code (`postal_code`, text): The postal code.
- Custom attributes (`custom_attributes`, object): Values for your custom account attributes, by their API names. List them with List custom attributes.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "csm": "example",
    "customAttributes": {},
    "dunsNumber": "example",
    "gsId": "example",
    "healthScore": 1,
    "id": "example",
    "industry": "example",
    "lastModifiedDate": 1,
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "naicsCode": "example",
    "name": "example",
    "nps": 1,
    "numberOfEmployees": 1,
    "numberOfUsers": 1,
    "parentGroupId": "example",
    "plan": "example",
    "propertyKeys": [
      "example"
    ],
    "renewalDate": 1,
    "sfdcId": "example",
    "sicCode": "example",
    "trackedSubscriptionId": "example",
    "website": "example"
  }
}
```

### Create user

Add a user to Gainsight PX, with their profile and custom attributes.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.
- Products (`property_keys`, list, required): The products the record belongs to.
- Email (`email`, text): The user's email address.
- First name (`first_name`, text): The user's first name.
- Last name (`last_name`, text): The user's last name.
- Type (`user_type`, text): What kind of person this is. Leave empty for a user. One of: `USER`, `LEAD`, `VISITOR`.
- Account (`account_id`, text): The account the user belongs to.
- Job title (`title`, text): The user's job title.
- Role (`role`, text): The user's role in your product.
- Phone (`phone`, text): The user's phone number.
- Gender (`gender`, text): The user's gender. One of: `MALE`, `FEMALE`, `OTHER`.
- Score (`score`, number): A score of your own for the user.
- Signed up (`sign_up_date`, date and time): When the user signed up for your product.
- Salesforce contact ID (`sfdc_contact_id`, text): The user's Salesforce contact ID.
- Unsubscribed from all email (`global_unsubscribe`, true/false): Unsubscribe the user from every Gainsight PX email.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- Country (`country`, text): The country's name.
- Postal code (`postal_code`, text): The postal code.
- Custom attributes (`custom_attributes`, object): Values for your custom user attributes, by their API names. List them with List custom attributes.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "accountId": "example",
    "aptrinsicId": "example",
    "createDate": 1,
    "customAttributes": {},
    "email": "example",
    "firstName": "example",
    "firstVisitDate": 1,
    "gender": "MALE",
    "globalId": "example",
    "globalUnsubscribe": true,
    "id": "example",
    "identifyId": "example",
    "lastInferredLocation": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "lastModifiedDate": 1,
    "lastName": "example",
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "numberOfVisits": 1,
    "phone": "example",
    "propertyKeys": [
      "example"
    ],
    "role": "example",
    "score": 1,
    "sfdcContactId": "example",
    "signUpDate": 1,
    "subscriptionId": "example",
    "title": "example",
    "type": "USER"
  }
}
```

### Delete account

Delete an account and every user in it.

**Inputs**

- Account (`account_id`, text, required): The account's ID.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete user

Delete a user. Gainsight PX brings them back, with their history, if they're added again within 7 days, unless you delete them for good.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.
- Delete for good (`hard_delete`, true/false): Delete the user and their history for good, so they aren't brought back if added again.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "deleted": true,
    "hardDelete": true,
    "identifyId": "example"
  }
}
```

### Get account

Get an account's details: plan, industry, users, health score, NPS and custom attributes.

**Inputs**

- Account (`account_id`, text, required): The account's ID.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "csm": "example",
    "customAttributes": {},
    "dunsNumber": "example",
    "gsId": "example",
    "healthScore": 1,
    "id": "example",
    "industry": "example",
    "lastModifiedDate": 1,
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "naicsCode": "example",
    "name": "example",
    "nps": 1,
    "numberOfEmployees": 1,
    "numberOfUsers": 1,
    "parentGroupId": "example",
    "plan": "example",
    "propertyKeys": [
      "example"
    ],
    "renewalDate": 1,
    "sfdcId": "example",
    "sicCode": "example",
    "trackedSubscriptionId": "example",
    "website": "example"
  }
}
```

### Get engagement

Get an engagement's name, kind, state and environments.

**Inputs**

- Engagement (`engagement_id`, text, required): The engagement.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "defaultLanguage": "example",
    "description": "example",
    "envs": [
      "example"
    ],
    "id": "example",
    "name": "example",
    "propertyKeys": [
      "example"
    ],
    "state": "example",
    "translationState": "example",
    "type": "example"
  }
}
```

### Get feature adoption

Count how many times a feature was used, and by how many users and accounts, over up to 7 days.

**Inputs**

- Feature (`feature_id`, text, required): The feature.
- From (`since`, date and time, required): The start of the period, at most 7 days before To.
- To (`until`, date and time): The end of the period. Leave empty for now.
- Product (`property_key`, text): Only use in this product.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "dateRangeEnd": 1,
    "dateRangeStart": 1,
    "featureId": "example",
    "featureName": "example",
    "propertyKey": "example",
    "totalEventCount": 1,
    "uniqueAccountCount": 1,
    "uniqueUserCount": 1
  }
}
```

### Get subscription

Get your Gainsight PX subscription's name, time zone and products, with each product's tag key.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "description": "example",
    "id": "example",
    "name": "example",
    "products": [
      {
        "description": "example",
        "name": "example",
        "productKeys": [
          {
            "channel": "example",
            "productKey": "example",
            "url": "example"
          }
        ]
      }
    ],
    "timeZone": "example",
    "website": "example"
  }
}
```

### Get user

Get a user's profile: name, email, account, visits, location and custom attributes.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "accountId": "example",
    "aptrinsicId": "example",
    "createDate": 1,
    "customAttributes": {},
    "email": "example",
    "firstName": "example",
    "firstVisitDate": 1,
    "gender": "MALE",
    "globalId": "example",
    "globalUnsubscribe": true,
    "id": "example",
    "identifyId": "example",
    "lastInferredLocation": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "lastModifiedDate": 1,
    "lastName": "example",
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "numberOfVisits": 1,
    "phone": "example",
    "propertyKeys": [
      "example"
    ],
    "role": "example",
    "score": 1,
    "sfdcContactId": "example",
    "signUpDate": 1,
    "subscriptionId": "example",
    "title": "example",
    "type": "USER"
  }
}
```

### Get user preferences

Get which guides, bots, product updates, surveys and tracking a user has turned on.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "guidedTours": true,
    "onboardingBot": true,
    "productUpdates": true,
    "surveys": true,
    "trackEmailAnalytics": true,
    "trackUsage": true
  }
}
```

### List accounts

List the companies using your product, filtered by name, plan or when they were added.

**Inputs**

- Name contains (`name`, text): Only accounts whose name contains this.
- Plan (`plan`, text): Only accounts on this plan.
- Added since (`created_after`, date and time): Only accounts added from this time on.
- Other conditions (`filter`, text): More conditions in Gainsight PX's filter form, separated by semicolons, such as plan==Gold;numberOfUsers>10.
- Order (`sort`, text): The order. One of: `-createDate` (Newest first), `createDate` (Oldest first), `-lastSeenDate` (Most recently seen), `-lastModifiedDate` (Most recently changed), `name` (Name, A to Z).
- How many (`page_size`, number): How many to return, up to 1,000. Leave empty for 25. From 1 to 1000.
- Next page (`scroll_id`, text): The scroll ID the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "accounts": [
      {
        "createDate": 1,
        "csm": "example",
        "customAttributes": {},
        "dunsNumber": "example",
        "gsId": "example",
        "healthScore": 1,
        "id": "example",
        "industry": "example",
        "lastModifiedDate": 1,
        "lastSeenDate": 1,
        "location": {
          "city": "example",
          "continent": "example",
          "countryCode": "example",
          "countryName": "example",
          "postalCode": "example",
          "regionName": "example",
          "stateCode": "example",
          "stateName": "example",
          "street": "example",
          "timeZone": "example"
        },
        "naicsCode": "example",
        "name": "example",
        "nps": 1,
        "numberOfEmployees": 1,
        "numberOfUsers": 1,
        "parentGroupId": "example",
        "plan": "example",
        "propertyKeys": [
          "example"
        ],
        "renewalDate": 1,
        "sfdcId": "example",
        "sicCode": "example",
        "trackedSubscriptionId": "example",
        "website": "example"
      }
    ],
    "scrollId": "example",
    "totalHits": 1
  }
}
```

### List custom attributes

List the user or account attributes you've set up, with their API names and types.

**Inputs**

- For (`record_type`, text, required): Users' attributes or accounts'. One of: `user` (Users), `account` (Accounts).

**Outputs**

- `data` (list): The response from Gainsight PX.

**Example output**

```json
{
  "data": [
    {
      "apiName": "example",
      "createdDate": 1,
      "defaultValue": "example",
      "description": "example",
      "id": "example",
      "modifiedDate": 1,
      "name": "example",
      "origin": "example",
      "state": "example",
      "type": "example"
    }
  ]
}
```

### List custom events

List the custom events your product recorded, newest first, by name, user or time.

**Inputs**

- Event name (`event_name`, text): Only events with this name.
- User ID (`identify_id`, text): Only this user's, by the ID your product sends Gainsight PX.
- From (`since`, date and time): Only from this time on.
- To (`until`, date and time): Only up to this time.
- Order (`sort`, text): The order. Leave empty for newest first. One of: `-date` (Newest first), `date` (Oldest first).
- How many (`page_size`, number): How many to return, up to 1,000. Leave empty for 25. From 1 to 1000.
- Next page (`scroll_id`, text): The scroll ID the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "customEvents": [
      {
        "accountId": "example",
        "attributes": {},
        "date": 1,
        "eventId": "example",
        "eventName": "example",
        "eventType": "example",
        "globalContext": {},
        "identifyId": "example",
        "propertyKey": "example",
        "referrer": "example",
        "remoteHost": "example",
        "sessionId": "example",
        "url": "example",
        "userType": "example"
      }
    ],
    "scrollId": "example",
    "totalHits": 1
  }
}
```

### List engagements

List your in-app dialogs, guides, sliders, surveys and emails, with their state.

**Inputs**

- Kinds (`content_types`, list): Only engagements of these kinds. Leave empty for all. One or more of: `IN_APP_DIALOG` (Dialog), `IN_APP_GUIDE` (Guide), `IN_APP_CAROUSEL` (Slider), `IN_APP_NOTIFICATION` (Notification), `OUT_BOUND_EMAIL` (Email), `IN_APP_NPS_SURVEY` (NPS survey), `IN_APP_CES_SURVEY` (Customer effort (CES) survey), `IN_APP_RATING_SURVEY` (Rating survey), `IN_APP_BOOLEAN_SURVEY` (Yes or no survey), `IN_APP_MULTIPLE_QUESTION_SURVEY` (Multi-question survey).
- How many (`page_size`, number): How many to return, up to 500. Leave empty for 200. From 1 to 500.
- Page (`page_number`, number): Which page to read, starting at 0. At least 0.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "engagements": [
      {
        "defaultLanguage": "example",
        "description": "example",
        "envs": [
          "example"
        ],
        "id": "example",
        "name": "example",
        "propertyKeys": [
          "example"
        ],
        "state": "example",
        "translationState": "example",
        "type": "example"
      }
    ],
    "isLastPage": true,
    "pageNumber": 1
  }
}
```

### List features

List the features and modules you track in your product.

**Inputs**

- Product (`property_key`, text): Only this product's features.
- How many (`page_size`, number): How many to return, up to 200. Leave empty for 25. From 1 to 200.
- Page (`page_number`, number): Which page to read, starting at 0. At least 0.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "features": [
      {
        "featureLabels": [
          {
            "color": "example",
            "id": "example",
            "name": "example"
          }
        ],
        "id": "example",
        "name": "example",
        "parentFeatureId": "example",
        "propertyKey": "example",
        "status": "example",
        "type": "example"
      }
    ],
    "isLastPage": true,
    "pageNumber": 1
  }
}
```

### List segments

List the segments your users and accounts are grouped into.

**Inputs**

- How many (`page_size`, number): How many to return, up to 200. Leave empty for 25. From 1 to 200.
- Page (`page_number`, number): Which page to read, starting at 0. At least 0.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "isLastPage": true,
    "pageNumber": 1,
    "segments": [
      {
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### List survey responses

List users' answers to your in-app surveys, newest first, with scores and comments.

**Inputs**

- Survey type (`survey_type`, text): Only answers to surveys of this kind. One of: `IN_APP_SURVEY_NPS` (NPS survey), `IN_APP_SURVEY_CES` (Customer effort (CES) survey), `IN_APP_SURVEY_RATING` (Rating survey), `IN_APP_SURVEY_BOOLEAN` (Yes or no survey), `IN_APP_MULTIPLE_QUESTION_SURVEY` (Multi-question survey).
- User ID (`identify_id`, text): Only this user's, by the ID your product sends Gainsight PX.
- Account (`account_id`, text): Only this account's.
- From (`since`, date and time): Only from this time on.
- To (`until`, date and time): Only up to this time.
- Order (`sort`, text): The order. Leave empty for newest first. One of: `-date` (Newest first), `date` (Oldest first).
- How many (`page_size`, number): How many to return, up to 1,000. Leave empty for 25. From 1 to 1000.
- Next page (`scroll_id`, text): The scroll ID the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "results": [
      {
        "accountId": "example",
        "comment": "example",
        "contactMeAllowed": true,
        "contentId": "example",
        "contentType": "example",
        "date": 1,
        "engagementId": "example",
        "engagementTrackType": "example",
        "eventId": "example",
        "eventType": "example",
        "executionDate": 1,
        "executionId": "example",
        "globalContext": {},
        "identifyId": "example",
        "path": "example",
        "propertyKey": "example",
        "questionType": "example",
        "score": 1,
        "selectionIds": [
          "example"
        ],
        "sessionId": "example",
        "surveyState": "example",
        "userType": "example"
      }
    ],
    "scrollId": "example",
    "totalHits": 1
  }
}
```

### List tracked events

List what users did in your product, newest first: page views, sessions, feature uses, segment matches, form submissions, engagement views, leads or email events.

**Inputs**

- Events (`event_type`, text, required): Which events. One of: `page_view` (Page views), `session` (Sessions), `feature_match` (Feature uses), `segment_match` (Segment matches), `form_submit` (Form submissions), `engagement_view` (Engagement views and clicks), `identify` (Identify calls), `lead` (Leads), `email` (Email, A to Z).
- User ID (`identify_id`, text): Only this user's, by the ID your product sends Gainsight PX.
- Account (`account_id`, text): Only this account's. Not for identify calls, leads or email events.
- From (`since`, date and time): Only from this time on.
- To (`until`, date and time): Only up to this time.
- Order (`sort`, text): The order. Leave empty for newest first. One of: `-date` (Newest first), `date` (Oldest first).
- How many (`page_size`, number): How many to return, up to 1,000. Leave empty for 25. From 1 to 1000.
- Next page (`scroll_id`, text): The scroll ID the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "events": [
      {
        "accountId": "example",
        "contentType": "example",
        "date": 1,
        "email": "example",
        "emailTrackType": "example",
        "engagementId": "example",
        "engagementTrackType": "example",
        "eventId": "example",
        "eventType": "example",
        "featureId": "example",
        "formData": {},
        "globalContext": {},
        "host": "example",
        "identifyId": "example",
        "inferredLocation": {
          "city": "example",
          "continent": "example",
          "countryCode": "example",
          "countryName": "example",
          "postalCode": "example",
          "regionName": "example",
          "stateCode": "example",
          "stateName": "example",
          "street": "example",
          "timeZone": "example"
        },
        "linkUrl": "example",
        "pageTitle": "example",
        "path": "example",
        "propertyKey": "example",
        "queryString": "example",
        "referrer": "example",
        "remoteHost": "example",
        "segmentId": "example",
        "sessionId": "example",
        "userType": "example"
      }
    ],
    "scrollId": "example",
    "totalHits": 1
  }
}
```

### List users

List the people using your product, newest first or in the order you choose, filtered by email, account, type or when they signed up or were last seen.

**Inputs**

- Email (`email`, text): Only the user with this email address.
- Account (`account_id`, text): Only this account's.
- Type (`user_type`, text): Only users of this kind. One of: `USER`, `LEAD`, `VISITOR`.
- Added since (`created_after`, date and time): Only users added from this time on.
- Seen since (`seen_after`, date and time): Only users seen from this time on.
- Other conditions (`filter`, text): More conditions in Gainsight PX's filter form, separated by semicolons, such as plan==Gold;numberOfUsers>10.
- Order (`sort`, text): The order. One of: `-createDate` (Newest first), `createDate` (Oldest first), `-lastSeenDate` (Most recently seen), `-lastModifiedDate` (Most recently changed), `lastName` (Last name, A to Z), `email` (Email, A to Z).
- How many (`page_size`, number): How many to return, up to 1,000. Leave empty for 25. From 1 to 1000.
- Next page (`scroll_id`, text): The scroll ID the last page returned, to read the next page.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "scrollId": "example",
    "totalHits": 1,
    "users": [
      {
        "accountId": "example",
        "aptrinsicId": "example",
        "createDate": 1,
        "customAttributes": {},
        "email": "example",
        "firstName": "example",
        "firstVisitDate": 1,
        "gender": "MALE",
        "globalId": "example",
        "globalUnsubscribe": true,
        "id": "example",
        "identifyId": "example",
        "lastInferredLocation": {
          "city": "example",
          "continent": "example",
          "countryCode": "example",
          "countryName": "example",
          "postalCode": "example",
          "regionName": "example",
          "stateCode": "example",
          "stateName": "example",
          "street": "example",
          "timeZone": "example"
        },
        "lastModifiedDate": 1,
        "lastName": "example",
        "lastSeenDate": 1,
        "location": {
          "city": "example",
          "continent": "example",
          "countryCode": "example",
          "countryName": "example",
          "postalCode": "example",
          "regionName": "example",
          "stateCode": "example",
          "stateName": "example",
          "street": "example",
          "timeZone": "example"
        },
        "numberOfVisits": 1,
        "phone": "example",
        "propertyKeys": [
          "example"
        ],
        "role": "example",
        "score": 1,
        "sfdcContactId": "example",
        "signUpDate": 1,
        "subscriptionId": "example",
        "title": "example",
        "type": "USER"
      }
    ]
  }
}
```

### Start or pause engagement

Start an engagement so users see it, or pause it.

**Inputs**

- Engagement (`engagement_id`, text, required): The engagement.
- Action (`state`, text, required): Start or pause it. One of: `START`, `PAUSE`.
- Environments (`environments`, list): When starting, where to start it. Leave empty for production. One or more of: `PRODUCTION`, `STAGE`, `QA`, `INTEGRATION`.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "defaultLanguage": "example",
    "description": "example",
    "envs": [
      "example"
    ],
    "id": "example",
    "name": "example",
    "propertyKeys": [
      "example"
    ],
    "state": "example",
    "translationState": "example",
    "type": "example"
  }
}
```

### Stop or resume tracking a user

Have Gainsight PX ignore everything a user does, or track them again.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.
- Track this user (`track`, true/false, required): On to track the user, off to ignore everything they do.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "denied": true,
    "identifyId": "example"
  }
}
```

### Track custom event

Record something a user did, such as Report exported, with details of your own, for use in Gainsight PX's analytics and engagements.

**Inputs**

- Event name (`event_name`, text, required): The event's name, such as Report exported.
- User ID (`identify_id`, text, required): The ID of the user who did it.
- Product (`property_key`, text, required): The product it happened in.
- Type (`user_type`, text): What kind of person did it. Leave empty for a user. One of: `USER`, `LEAD`, `VISITOR`.
- Account (`account_id`, text): The user's account.
- When (`date`, date and time): When it happened. Leave empty for now.
- Details (`attributes`, object): Details of your own, by name, such as format: PDF.
- Page URL (`url`, text): The page it happened on.
- Referrer (`referrer`, text): The page the user came from.
- Session ID (`session_id`, text): The user's session in your product.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "accountId": "example",
    "attributes": {},
    "date": 1,
    "eventId": "example",
    "eventName": "example",
    "eventType": "example",
    "globalContext": {},
    "identifyId": "example",
    "propertyKey": "example",
    "referrer": "example",
    "remoteHost": "example",
    "sessionId": "example",
    "url": "example",
    "userType": "example"
  }
}
```

### Update account

Change an account's details or custom attributes. Fields left empty stay as they are.

**Inputs**

- Account (`account_id`, text, required): The account's ID.
- Name (`name`, text): The account's name.
- Products (`property_keys`, list): The products the record belongs to.
- Plan (`plan`, text): The account's plan.
- Industry (`industry`, text): The account's industry.
- Website (`website`, text): The account's website.
- Employees (`number_of_employees`, number): How many people the company employs. At least 0.
- Renewal date (`renewal_date`, date and time): When the account renews.
- Salesforce account ID (`sfdc_id`, text): The account's Salesforce account ID.
- Parent group ID (`parent_group_id`, text): An ID of your own that groups accounts together, such as a parent company's.
- SIC code (`sic_code`, text): The SIC code.
- NAICS code (`naics_code`, text): The NAICS code.
- D-U-N-S number (`duns_number`, text): The D-U-N-S number.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- Country (`country`, text): The country's name.
- Postal code (`postal_code`, text): The postal code.
- Custom attributes (`custom_attributes`, object): Values for your custom account attributes, by their API names. List them with List custom attributes.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "createDate": 1,
    "csm": "example",
    "customAttributes": {},
    "dunsNumber": "example",
    "gsId": "example",
    "healthScore": 1,
    "id": "example",
    "industry": "example",
    "lastModifiedDate": 1,
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "naicsCode": "example",
    "name": "example",
    "nps": 1,
    "numberOfEmployees": 1,
    "numberOfUsers": 1,
    "parentGroupId": "example",
    "plan": "example",
    "propertyKeys": [
      "example"
    ],
    "renewalDate": 1,
    "sfdcId": "example",
    "sicCode": "example",
    "trackedSubscriptionId": "example",
    "website": "example"
  }
}
```

### Update user

Change a user's profile or custom attributes. Fields left empty stay as they are.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.
- Products (`property_keys`, list): The products the record belongs to.
- Email (`email`, text): The user's email address.
- First name (`first_name`, text): The user's first name.
- Last name (`last_name`, text): The user's last name.
- Type (`user_type`, text): What kind of person this is. Leave empty for a user. One of: `USER`, `LEAD`, `VISITOR`.
- Account (`account_id`, text): The account the user belongs to.
- Job title (`title`, text): The user's job title.
- Role (`role`, text): The user's role in your product.
- Phone (`phone`, text): The user's phone number.
- Gender (`gender`, text): The user's gender. One of: `MALE`, `FEMALE`, `OTHER`.
- Score (`score`, number): A score of your own for the user.
- Signed up (`sign_up_date`, date and time): When the user signed up for your product.
- Salesforce contact ID (`sfdc_contact_id`, text): The user's Salesforce contact ID.
- Unsubscribed from all email (`global_unsubscribe`, true/false): Unsubscribe the user from every Gainsight PX email.
- City (`city`, text): The city.
- State (`state`, text): The state or region.
- Country (`country`, text): The country's name.
- Postal code (`postal_code`, text): The postal code.
- Custom attributes (`custom_attributes`, object): Values for your custom user attributes, by their API names. List them with List custom attributes.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "accountId": "example",
    "aptrinsicId": "example",
    "createDate": 1,
    "customAttributes": {},
    "email": "example",
    "firstName": "example",
    "firstVisitDate": 1,
    "gender": "MALE",
    "globalId": "example",
    "globalUnsubscribe": true,
    "id": "example",
    "identifyId": "example",
    "lastInferredLocation": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "lastModifiedDate": 1,
    "lastName": "example",
    "lastSeenDate": 1,
    "location": {
      "city": "example",
      "continent": "example",
      "countryCode": "example",
      "countryName": "example",
      "postalCode": "example",
      "regionName": "example",
      "stateCode": "example",
      "stateName": "example",
      "street": "example",
      "timeZone": "example"
    },
    "numberOfVisits": 1,
    "phone": "example",
    "propertyKeys": [
      "example"
    ],
    "role": "example",
    "score": 1,
    "sfdcContactId": "example",
    "signUpDate": 1,
    "subscriptionId": "example",
    "title": "example",
    "type": "USER"
  }
}
```

### Update user preferences

Turn a user's guided tours, onboarding bot, product updates, surveys or tracking on or off. Preferences left empty stay as they are.

**Inputs**

- User ID (`identify_id`, text, required): The user's ID, the one your product sends Gainsight PX when the user signs in.
- Guided tours (`guided_tours`, true/false): Whether the user gets guided tours.
- Onboarding bot (`onboarding_bot`, true/false): Whether the user gets the onboarding bot.
- Product updates (`product_updates`, true/false): Whether the user gets product updates.
- Surveys (`surveys`, true/false): Whether the user gets surveys.
- Track email opens and clicks (`track_email_analytics`, true/false): Whether opens and clicks in the user's emails are tracked.
- Track usage (`track_usage`, true/false): Whether the user's use of your product is tracked.

**Outputs**

- `data` (object): The response from Gainsight PX.

**Example output**

```json
{
  "data": {
    "guidedTours": true,
    "onboardingBot": true,
    "productUpdates": true,
    "surveys": true,
    "trackEmailAnalytics": true,
    "trackUsage": true
  }
}
```
