--- title: "Automating Relationship Creation in a Company" slug: "automating-relationship-creation-in-a-company" updated: 2026-11-23T12:31:35Z published: 2026-11-23T12:31:35Z canonical: "support.gainsight.com/automating-relationship-creation-in-a-company" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Automating Relationship Creation in a Company Gainsight NXT ## Overview There can be multiple instances and use cases to create Relationships automatically as per your requirement. In this article, rule configuration is explained for the following use case. When a new business deal is closed, you can track it as a new Relationship. However, creating relationships manually every time a new deal is signed can be tedious. This article explains how to create a rule which automatically creates Relationships based on set criteria. ## Assumptions - A custom object called Project exists. When a new opportunity is identified, it is logged as a new project record. - The Project object has a **Status** field. When this field is set to **Won,** the opportunity is considered won. - When an opportunity is won, the corresponding project record is converted into a new Relationship. - The Project object has a lookup to Company and Relationship Type fields. - A custom field **Business Region** exists in Project object. This field tracks the region from which customer is operating. - A custom field **Geographical Region** exists in Relationship Type object. This field is equivalent to the Business Region object and tracks the region from which customer is operating. ## Create Rule To create a Rule: 1. Navigate to **Administration > Rules Engine**. 2. Click **+ RULE**. **Create Rule** window is displayed. 3. Perform the following actions: 1. **Rule** **For**: Select **Company**. 2. **Rule Name**: Enter a name of the Rule. 3. **Folder:** Select a folder from the drop-down list. 4. *(Optional)* **Description:** Enter a description for the rule. 5. Click **NEXT.** The **Setup Rule** window is displayed. ## Setup Rule Perform following actions in the Setup Rule page: 1. Click **DATASET**. 2. Enter **Task Name** and **Output Dataset Name.** 3. Select the source object, **Project** here from the Source Object drop-down list. ![Automating Relationship Creation in a Company - Gainsight Inc. 2023-04-04 at 3.10.56 PM.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Automating_Relationship_Creation_in_a_Company_-_Gainsight_Inc._2023-04-04_at_3.10.56_PM.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=DKzkLScLYhaYFPevaZR%2B6vBs13y2ynDMGAWiAu8mzSA%3D) 4. Drag and drop the following fields to the **Show** section: - Project Name - GSID - Company ID -> Name - Relationship Type ID -> Name - Business Region ![3..png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/3.(16).png?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=TlelymtfsSApfVoWXBK0EdTHlrOUrQFRwzlU4BCeW9E%3D) 5. In the Filters section, add a filter to fetch data only for those project records with Status **as Won**. 6. Click **SAVE**. ![4..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/4.(2).GIF?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=5ChZf4JZFeMUjrPBZs%2FPizOnCvEVYq3oXaZc%2B6af83Q%3D) ## Setup Action Perform following actions in the Setup Action page: 1. Navigate to the **Setup Action** page. 2. Click **+ ACTION**. 3. Select **Load to Relationship V2** from the **Action** drop-down list. ![Automating Relationship Creation in a Company - Gainsight Inc. 2023-04-04 at 3.12.24 PM.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Automating_Relationship_Creation_in_a_Company_-_Gainsight_Inc._2023-04-04_at_3.12.24_PM.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=V1S3501ybbGiSUY6AQtcqiEBh5uqrhZXo6s0Wh9PLBo%3D) 4. Select **Upsert** from the **Operation** drop-down list**.** 5. Click the **Import Lookup** icon for **Relationship:: Type Id** field. The **Data import lookup configuration** window is displayed. 6. Map the **Business Region** field from the Project object with **Geographic Region** field from the Relationship Type object. 7. Click **APPLY**. ![Automating Relationship Creation in a Company - Gainsight Inc. 2023-04-04 at 3.13.17 PM.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Automating_Relationship_Creation_in_a_Company_-_Gainsight_Inc._2023-04-04_at_3.13.17_PM.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=OjqVj0O40Wqj3ZuQHawUJF%2BSgTjCoUbzCWY%2BaKFwj2o%3D) 8. Click the **Import Lookup** icon for **Relationship:: Company Id** field. The **Data import lookup configuration** window is displayed. 9. Map the **Company ID Name** field of project object with **Name** field of Company object. 10. Click **APPLY**. ![Automating Relationship Creation in a Company - Gainsight Inc. 2023-04-04 at 3.14.05 PM.jpg](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/Automating_Relationship_Creation_in_a_Company_-_Gainsight_Inc._2023-04-04_at_3.14.05_PM.jpg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=kvONax0C8peCEzgZ1ZnQqCdMOirKrZpgwlyTUZZKkNY%3D) 11. Map the **Project** **Name** field from Project object with the **Name** field in Relationship object and mark . 12. Perform other mappings as required. 13. Select at least one field mapping to mark as identifier for Upsert/Update operation. 14. Click **SAVE.** 15. Click **RUN NOW** to run the rule immediately or [*schedule*](/v1/docs/schedule-and-execute-rules-1) the execution of the rule. ![8..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/8.(3).GIF?sv=2026-02-06&spr=https&st=2026-11-24T18%3A47%3A21Z&se=2026-11-24T19%3A47%3A21Z&sr=b&sp=r&sig=s9rBZZlsvX5Q3Mtj1lwYScvlx90uxnOEPF25XjOFaEU%3D)