Skip to main content
Gainsight Inc.

Load to Person Model using Rules Engine Action Type

This article explains how to use the Load to People Action Type to load data into the Person, Company Person, and Relationship Person objects. 

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.

Prerequisites

Ensure that required fields are added in the dataset that are used for matching fields in the Import Lookup Configuration.

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.

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.

Create First 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.

1. 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

2. Configure_contact.png

  1. Click SAVE
  2. Click <-. 

3. Navigate_to_setup_action.gif

Create Second Dataset

This section explains how to create the second dataset for using the Load to People Action type. This dataset (and the Merge dataset) are needed only when you need to load data to the Relationship person object. If you want to load data only to Person object and Company person object, it is not required for you to create this dataset.

  1. Click + TASK and select Dataset.
  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.

4..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).

5. 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.

6..GIF

Setup Action: Load To People

This section explains how to configure the Load to People Action type. This example ingests data into Person, Company Person, and Relationship Person. However, you can also ingest data only to the Person object or only to the Personand Company Person objects. 

To configure the action type: 

  1. Navigate to the Setup Action page.
  2. Click + ACTION and select the name of the Merge task (Here Merge).
  3. From the Action drop-down menu, Select Load to People
  4. (Optional) Enter a description in the Description field.

7..GIF

  1. From the Operation drop-down menu, select Update or Upsert. Update operation updates the existing records. Upsert operation updates the existing records and also creates new records, if matching records are not found.
  2. In the Person section, map the Email field of Person object with the Email field from dataset. Mapping the Email field is mandatory for Person.

8..GIF

  1. Perform other field mappings as required.

9..GIF

  1. In the Company Association section (associates Person with a Company), apply the following configurations in derived 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. 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. If your organization has multiple Accounts with the same name, you can use the Account ID field from the Contact object the SFDC Account ID field from the Company object to perform the mappings.

Account Name field used in the Dataset stores the names of all your companies. This data is used to map account names with company names in Gainsight, to perform the derived mapping. 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

Notes:

  • You can also use multiple mappings in the Derived mappings section. Gainsight supports upto six fields for mapping.
  • The derived mapping section is mandatory, to associate a Person to a Company.
  1. (Optional) Click ADD ANOTHER to add multiple fields matching.
  2. Select the option Reject record option from the When no matches are found drop-down menu. If you choose other option, you may get undesired results.
  3. Select the Use any one match or Mark record with an error option from the When multiple matches occur drop-down menu.
  4. Click Apply.

10..GIF

  1. Perform other mappings as shown in the table below. 
Source (Object Name : Field Name) Target (Object Name : Field Name)
Contact : Id Company Person : SFDC Contact Id
Contact: Account ID Company Person: SFDC Account ID
Contact: Title Company Person: Title
  1. In the Relationship Association section, apply the following configurations in derived mappings:
    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 mapping.
      5. Select either the Use any one match or Mark record with an error option from the When multiple matches occur drop-down menu. 
      6. Select the Reject record option from the When no matches are found drop-down menu. If you choose other option, you may get undesired results.
      7. Click Apply.

Note

  • It is not mandatory to map Relationship association. You must map relationship association only if you are using Relationships in your organization.  
  • It is mandatory to configure Derived Mappings, to associate a Person to a Relationship.

11..png

  1. Perform other mappings as required.
  2. Click Save.
  3. Click RUN NOW to execute the rule. You can also schedule the rule execution. For more information on how to Schedule rules, refer to the Scheduling Rules article.

To check rule results, refer to the Execution History section of the Scheduling Rules article. You can also check the data ingested into the objects from the Person, Company Person, or Relationship Person objects, by navigating to the Data Management page. To view the association of Person with Company or Relationship, navigate to the respecitve C/R360 page and click the Person section from the left pane. 

  • Was this article helpful?