Skip to main content
Gainsight Inc.

Load to Person Model using Rules Engine Action Types

Overview

Gainsight Person model stores unique records to represent people in the real world. This model stores person details and attributes of these people in association with a company or Relationship. For more information about the Gainsight Person Object Model, refer the Gainsight Person Object Model article.

This article guides Admins to create a rule that loads records of People from various sources to the Person model. Gainsight provides you with two Action types to load data into the person model. They are:

  • Load to Company Person: This Action Type loads data into the person and Company person Objects.
  • Load to Relationship Person: This Action Type loads data into the Person Company Person, and Relationship Person objects.

Load to Company Person

This section describes the process of using the Load to Company Person Action type. The Load to Company Person Action Type can be configured in two ways: 

Prerequisites

  • Ensure that records in the Company object are available to which you apply lookup for company from the Company Person object. This lookup helps to associate people with companies in Gainsight.
  • Ensure that required fields are added in the dataset that are used for matching fields in the Import Lookup Configuration. For more information, refer the Setup Load to Company Person action section of this article.

Create Rule

  1. Navigate to Administration > Operation > Rules Engine.
  2. Click + RULE to create a new rule. Create Rule page appears.
  3. Enter the following details:
  • Rule For: Select Account
  • Rule Name: Assign a unique rule name
  • Folder: Select a folder for the rule.
  • (Optional) Description: Description to this rule
  1. Click Next. The Setup Rule page appears.

LCP.gif

Setup Rule

If you store your business contacts data in any SFDC or MDA object, you can create a dataset using the source object. Following are the possible source objects that can store the contacts data:

  • SFDC Contact object
  • Any SFDC custom object
  • Any MDA custom object
  • Dataset created from the CSV file in an S3 bucket

For more information on how to create a dataset, refer the Bionic Rule Task Creation article.

If you store your business contacts data in a csv file and upload into any S3 bucket, you can create a dataset by fetching data in this csv file. For the detailed instructions on how to create a dataset from a csv file in the S3 bucket, see the S3 Dataset Task in Bionic Rules article.

Load to Company Person using Contact Object

This sub section describes the process of using the Load to Company Person Action Type, with Contact as the source object.

To apply configuration on Load to Company Person using Account Contact Relationship object, refer the section Load to Company Person using Account Contact Relationship Object.

Create Dataset

To create the Dataset:

  1. Create a rule by following the steps mentioned in the Create Rule section above.
  2. Click DATASET.
  3. From the source dataset, select the Contact Object.

Create contact object.gif

  1. Drag and drop the following fields to the Show section:
    • Contact:: Id
    • Contact:: First Name
    • Contact:: Full Name
    • Contact:: Last Name
    • Contact:: Email
    • Contact::Account ID
    • Contact:: Title
    • Account:: Account Name

Configure contact.png

  1. Click SAVE
  2. Click Setup Action.

Navigate to setup action.gif

Setup Load to Company Person Action Type

This sub section explains you the process of configuring the Load to Company Person Action type using the Contact Object.

To configure Load to Company person:

  1. Click + ACTION.
  2. From the action drop-down menu, select the Load to Company Person Action Type.

Select load to company person action type.gif

  1. Select Update or Upsert as the Operation. Update operation helps to update the existing records in the Company Person object whereas Upsert operation updates the existing records as well as creates new records.

  2. Apply following configuration in the Derived field mappings:

    1. Click the Import Lookup icon in the Actions column for the Company ID target field. The Data import lookup configuration window appears.
    2. Configure the import lookup as explained below:
      1. Lookup Type: Direct
      2. Populate GSID From: Select Company
      3. For field matching between source and lookup objects, select Account Name and Name, in the Source dataset and lookup object (Company) respectively.

Account Name field represents the name of a company and it is a field to store company data in the dataset. When values in the Account Name field in the source dataset and Name field in the lookup object (Company) match, it populates GSID from the Contact object to Company ID field in the Company Person object. You can add a field Account ID from the Contact object (If source object for dataset is Contact) and match with SFDC Account ID from the Company object.

Note: Field name Account Name is used in the dataset just for reference only, you can create a field with different name.

  1. Click ADD ANOTHER to add multiple fields matching.
  2. Click Apply.
  3. Select the option ‘When no matches are found’: Insert null value(s) or Reject record.
  4. Select the option ‘When multiple matches occur’: Use any one match or Mark record with an error.

Company person with contact.gif

For more information on data import lookup, refer the Data import Lookup article.

  1. Click the Import Lookup icon in the actions column for Person ID target field. The Data import lookup configuration window appears.
  2. In Data import lookup configuration window, configure as shown below:
    1. Lookup Type: Direct.
    2. Populate GSID From: Select Person
    3. For field matching between source and lookup objects, Select Email, both in the Source dataset and lookup object (Person) respectively.

      Email is a field in both the source S3 dataset and lookup object (Person). If the values in both these fields match, it populates GSID from Contact object to Person ID field in the Company Person.

      If there are records in the Contact object that match the configuration above, new record in the Person object is created and GSID of new record is populated in the Person ID field in the Company Person object.

    4. Click Apply.

Load to compny person_2.gif

  1. +DERIVED MAPPING FOR COMPANY PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Company Person object.

  2. + DERIVED MAPPING FOR PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Person object.
  1. Field Mappings:
    1. Map the Email field in the dataset with Person:: Email (EMAIL) field. This is a mandatory field mapping. When you select target field as Person::Email, this target field is included in identifiers automatically and you cannot able to remove the selection. This field is used as identifier to resolve the existing person records and update other fields.
    2. Map the remaining fields from the dataset and the target object. If required, select the Include in Identifiers checkbox to any of the target fields while mapping.
    3. ADD CUSTOM FIELD: Click this button to add additional custom field mappings.
  2. + CRITERIA: Click this button to add additional criteria to fine tune which data is synced, or to perform different or multiple actions based on the same data points.
  3. Click SAVE.

Person email mapping.gif

Load to Company Person using Account Contact Relationship Object

This sub section describes the process of using the Load to Company Person action type, by using the Account Contact Relationship as the primary source object. 

To apply configuration on Load to Company Person using Contact object, refer the section Load to Company Person using Contact Object.

Rule Structure

In this rule, two datasets would be created. The first dataset fetches record from Account Contact Relationship object and the second dataset fetches data from the Contact Object. These datasets would then be merged and the Load to Contact Person Action Type would be applied on the Merge task.

Create First Dataset

In this section the first dataset from the Account Company Relationship object would be configured. To set up the Dataset:

  1. Click DATASET.
  2. Select Account Contact Relationship object as source dataset.
  3. Drag and drop the Account Contact Relationship :: Contact ID field to the Show section.
  4. Drag and drop the Account Contact Relationship :: Deleted field to the Filters section.
  5. Click SAVE.
  6. Click <-.

Load to Company Person1.gif

Create Second Dataset

In this section the second dataset from the Contact object would be configured. To set up the Dataset:

  1. Click + TASK and select Dataset.
  2. Select Contact as the source dataset.

Load to Company Person2.gif

  1. Drag and drop the following fields to the Show section:
  • Contact:: Id
  • Contact:: First Name
  • Contact:: Full Name
  • Contact:: Last Name
  • Contact:: Email
  • Contact::Account ID
  • Contact:: Title

pasted image 0.png

  1. Click SAVE.
  2. Click <-.
Create Merge Task

This section describes the process of creating a Mere task which merges records from the above datasets. Gainsight recommends you to refer the Merge Task in Bionic Rules article before proceeding with this section. To configure the merge Task:

  1. Click + TASK and select Merge.
  2. Enter a name in the Task Name field.
  3. Select the first dataset as the source object (here fetch from Account Contact Relationship) for Merge and second dataset (here fetch from Account Contact Relationship) as Target, for Merge operation.
  4. Select Retain common datasets from both datasets as Join type.
  5. Map Contact ID field of the first Dataset (here fetch from Account Contact Relationship) with the Id field of the second dataset (here Fetch from Contact).

Load to Company Person4.gif

  1. Review the fields from both the datasets in the Show Fields section.
  2. Click SAVE.

Save merge.gif

Setup Action: Load to Company Person

This sub section explains the process of configuring the Load to Company Person Action Type. This action type is performed on the Merge task. To setup the action:

  1. Navigate to the Setup Action page.
  2. Click + ACTION and select the merge task (here Merge).
  3. Select Load to Company Person as the Action.
  4. (Optional) Enter a description in the Description field.

Load to Company Person5.gif

  1. Select Update or Upsert as the Operation. Update operation helps to update the existing records in the Company Person object whereas Upsert operation updates the existing records as well as creates new records.
  2. Apply following configuration in the Derived field mappings:
    1. Click the Import Lookup icon in the Actions column for the Company ID target field. The Data import lookup configuration window appears.

    2. Configure the import lookup as explained below:

      1. Lookup Type: Direct
      2. Populate GSID From: Select Company
      3. For field matching between source and lookup objects, select Acount ID and SFDC Account Id, in the Source dataset and lookup object (Company) respectively.

Account ID field represents the unique ID of a company and it is a field to store company data in the dataset. When values in the Account ID field in the source dataset and SFDC Account Id field in the lookup object (Company) match, it populates GSID from the Contact object to Company ID field in the Company Person object.

Note: Field name Account Name is used in the dataset just for reference only, you can create a field with different name.

  1. Click ADD ANOTHER to add multiple fields matching.
  2. Select the option ‘When multiple matches occur’: Use any one match or Mark record with an error.
  3. Select the option ‘When no matches are found’: Insert null value(s) or Reject record.
  4. Click Apply.

For more information on data import lookup, refer the Data import Lookup article.

  1. Click the Import Lookup icon in the actions column for Person ID target field. The Data import lookup configuration window appears.
  2. In Data import lookup configuration window, configure as shown below:
    1. Lookup Type: Direct.
    2. Populate GSID From: Select Person
    3. For field matching between source and lookup objects, Select Email, both in the Source dataset and lookup object (Person) respectively.

      Email is a field in both the source S3 dataset and lookup object (Person). If the values in both these fields match, it populates GSID from Contact object to Person ID field in the Company Person.

      If there are records in the Contact object that do not match the configuration above, new record in the Person object is created and GSID of new record is populated in the Person ID field in the Company Person object.
    4. Click Apply.

Load to Company Person6.gif

  1. +DERIVED MAPPING FOR COMPANY PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Company Person object.
  2. + DERIVED MAPPING FOR PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Person object.
  1. Field Mappings:
    1. Map the Email field in the dataset with Person:: Email (EMAIL) field. This is a mandatory field mapping. When you select target field as Person::Email, this target field is included in identifiers automatically and you cannot able to remove the selection. This field is used as identifier to resolve the existing person records and update other fields.
    2. Map the remaining fields from the dataset and the target object. If required, select the Include in Identifiers checkbox to any of the target fields while mapping.
    3. ADD CUSTOM FIELD: Click this button to add additional custom field mappings.
  2. + CRITERIA: Click this button to add additional criteria to fine tune which data is synced, or to perform different or multiple actions based on the same data points.

Load to Company Person7.gif

  1. Click SAVE.

  2. Click RUN NOW, to execute the rule now. You can also schedule the rule to run later.

Load to Relationship Person

This section describes the process of using the Load to Relationship person Action Type.

Prerequisites

  • Ensure that records in the Relationship object are available to which you apply lookup for company from the Relationship Person object. This lookup helps to associate people with companies in Gainsight.
  • Ensure that required fields are added in the dataset that are used for matching fields in the Import Lookup Configuration. For more information, refer the Setup Load to Relationship Person action section of this article.

Setup Rule

In this rule, two datasets would be created. The first dataset fetches record from Relationship Contact object and the second fetches data from Contact Object. These datasets would then be merged and the Load to Relationship Person Action Type would be applied on the Merge task.

Create First Dataset

  1. Create a rule by using the steps mentioned above.
  2. Select Relationship Contact as the source object.
  3. Drag and drop the following fields to the Show section:
  • Relationship Contact: Contact
  • Relationship Contact: Id
  • Relationship Contact: Relationship
  • Relationship Contact: Relationship Name
  1. Click SAVE.
  2. Click <- to return to Setup Rule page.

pasted image 0 (1).png

Create Second Dataset

  1. Click + TASK and select Dataset.
  2. Select Contact as the data source.
  3. Drag and drop the following fields to the Show section
  • Contact: Id
  • Contact: Last Name
  • Contact: First Name
  • Contact: Full Name
  • Contact: Email
  1. Click SAVE.
  2. Click <- to return to Setup Rule page.

pasted image 0 (2).png

Create Merge Task

Gainsight recommends you to refer the Merge task in Bionic Rules article before proceeding further. To create a Merge task:

  1. Click + TASK and select Merge.
  2. Enter a name in the Task Name field.
  3. Select the first Dataset as the left Dataset (here Fetch from Relationship Contact)
  4. Select the second Dataset as the right Dataset. (here Fetch from Contact)
  5. Select Retain common records from both datasets as the merge method.
  6. Map the Contact field in first dataset (here Fetch from Relationship Contact) to Id field in second dataset (here Fetch from Contact).

Load to Company Person8.gif

  1. In the Show Field sections, Modify the name of the Id field of both datasets to maintain unique field names constraint.
  2. Click SAVE.

Merge.gif

Setup Action: Load to Relationship Person 

This section describes the process of setting up the Load to Relationship Person Action type. To configure Load to Relationship Action type:

  1. Navigate to the Setup Action page.
  2. Click + ACTION and select the name of the Merge task (Here Merge)
  3. Select Load to Relationship Person as the Action.
  4. (Optional) Enter a description in the Description field.

pasted image 0 (3).png

  1. Select Update or Upsert as the Operation. Update operation helps to update the existing records in the Relationship Person object whereas Upsert operation updates the existing records as well as creates new records, if matching records are not found.
  2. Apply following configuration in the Derived field mappings:
    1. Click the Import Lookup icon in the Actions column for the Person ID target field. The Data import lookup configuration window appears.
    2. Configure the import lookup section as explained below:
      1. Lookup Type: Direct
      2. Populate GSID From: Select Person
      3. For field matching between source and lookup objects, select Email and Email, in the Source dataset and lookup object (Person) respectively.

Email is a field in both the source dataset and lookup object (Relationship Person). If the values in both these fields match, it populates GSID from Contact object to Person ID field in the Relationship Person.

If there are records in the Contact object that do not match the configuration above, a new record is created in the Person object and GSID of this new record is populated in the Person ID field of Relationship Person and Company Person objects. If a matching record is found only in the Person Object, then new record is created only for the Company Person and Relationship Person objects.

  1. (Optional) Click ADD ANOTHER to add multiple fields matching.
  2. Select the option ‘When multiple matches occur’: Use any one match or Mark record with an error.
  3. Select the option ‘When no matches are found’: Insert null value(s) or Reject record.
  4. Click Apply.

pasted image 0 (4).png

  1. Click the Import Lookup icon in the actions column for Relationship ID target field. The Data import lookup configuration window appears.
  2. Configure the Import Lookup section as explained below.
    1. Lookup Type: Direct
    2. Populate GSID From: Select Relationship
    3. For field matching between source and lookup objects, select Relationship from the source dataset and SFDC Relationship Id, from lookup object (Relationship Person) respectively.
    4. (Optional) Click ADD ANOTHER to add multiple fields matching.
    5. Select the option ‘When multiple matches occur’: Use any one match or Mark record with an error.
    6. Select the option ‘When no matches are found’: Insert null value(s) or Reject record.
    7. Click Apply.

Rel mapping_1.png

  1. + DERIVED MAPPING FOR RELATIONSHIP PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Relationship Person object.
  2. + DERIVED MAPPING FOR PERSON: Click this to add more derived mappings for loading data into the GSID data type fields in the Person object.
  1. Field Mappings:
  1. Map the Email field in the dataset with Person:: Email (EMAIL) field. This is a mandatory field mapping. When you select target field as Person::Email, this target field is included in identifiers automatically and you cannot able to remove the selection. This field is used as identifier to resolve the existing person records and update other fields.
  2. Map the remaining fields from the dataset and the target object. If required, select the Include in Identifiers checkbox to any of the target fields while mapping.
  3. ADD CUSTOM FIELD: Click this button to add additional custom field mappings.

pasted image 0 (6).png

  1. Click RUN NOW, to execute the rule now. You can also schedule the rule to run later.
  • Was this article helpful?