--- title: "Automating Relationship Creation in a Company" slug: "automating-relationship-creation-in-a-company" updated: 2026-11-27T13:56:19Z published: 2026-11-27T13:56:19Z 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 This article supports Gainsight NXT, the next evolution of the Customer Success platform. If you are using Gainsight CS Salesforce Edition, you can find supporting documentation by visiting the home page, and selecting CS > Salesforce Edition. Not sure what your team is using? Click [here](/docs/ja/automating-relationship-creation-in-a-company#). 重要 - 画像/情報は四半期ごとのリリースで更新されます! 四半期ごとのリリースにて、最新の機能・情報を反映し、画像を含めた情報は更新されます。 ## 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. ![2..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/2.(6).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=zQ5Rfp%2BOu6cyZKwujr7lp687WfXfXLyg1IDRwqr%2FG3Q%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.(20).png?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=xMFwv%2FoggwxQfzBtszdxga%2BNQRSF3NWcoCoj2VOSzYM%3D) 1. In the Filters section, add a filter to fetch data only for those project records with Status **as Won**. 2. Click **SAVE**. ![4..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/4.(7).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=DniI7fEjB4DqSu9tq8TnF0ZIr5jMf%2BYCdAssIK37H4w%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**.** ![5..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/5.(6).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=M%2F3kt9SoMJ7MfEbvsUiagN%2Fokrcu6V7Bz082NZJcS9o%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**. ![6..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/6.(5).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=NqRzpMezl6lK429tbY8N7t9MFNa2dEZpJgwcl7M8ydQ%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**. ![7..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/7.(6).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=SNoNnDFaE1OUDOtSOltKJBiejvGDvKp859O61dbMOFk%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/ja/schedule-and-execute-rules) the execution of the rule. ![8..GIF](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/8.(7).GIF?sv=2026-02-06&spr=https&st=2026-11-30T20%3A44%3A24Z&se=2026-11-30T21%3A44%3A24Z&sr=b&sp=r&sig=LxxR3EHtDH1F4c69%2FL%2B8JpsymyTAx66Eh8s1DfmxLaQ%3D)