> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Association Organization

> Learn how to use the Association Organization feature of the DingTalk Interconnection Platform to enable cross-organization Contacts, App interconnection, and seamless communication and collaboration between parent and child Organizations. Through step-by-step guidance—covering basic Form design, Connector creation and configuration, and Form Data submission—this page helps medium and large Organizations improve management efficiency.

## 1. Use Cases

Association Organization is typically used in the following scenarios:

* Cross-organization communication, business approval, and work reporting.
* Multi-organization permission management with real-time user structure synchronization for higher management efficiency.

## 2. Implementation Steps

### 2.1 Step 1: Basic Form Design

#### 2.1.1 Create and Configure the Query Form

**Steps:**

1. Create a regular form and name it "Get Organization Info".
2. Add a dropdown Select component, name it "Target", and add two options: "Query Parent Organization" and "Query Branch Organization". Set it as required. (See Figure 2.1-1.)

Figure 2.1-1 Adding and configuring the dropdown Select component

3. Click **Save** in the upper-right corner of the page.

#### 2.1.2 Create and Configure the Query Result Record Table

**Steps:**

1. Create a regular form and name it "Parent Organization Query Result Record".
2. Add a Multi-line text component, name it "Connector Return Result", and set its status to hidden. (See Figure 2.1-2.)

Figure 2.1-2 Adding and configuring the Multi-line text component

3. Add a subform component, name it "Parent Organization Query Result", and set its status to read-only. (See Figure 2.1-3.)

Figure 2.1-3 Adding and configuring the subform component

4. Inside the subform, add two Single-line text fields named "Parent Organization Name" and "Parent Organization CorpID", and set their status to read-only. (See Figure 2.1-4.)

Figure 2.1-4 Adding and configuring the Single-line text component

5. Open the **JS Action Panel** on the left side of the page and add the following code to the `didMount` function. (See Figure 2.1-5.)

Figure 2.1-5 Configuring the JS panel content

```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
// Code shown in Figure 2.1-5
// Get the Multi-line text Component data and assign it to the res variable.
// Replace "textareaField_kwlgqhti" with the unique identifier of the Multi-line text Component you created.
const res = this.$("textareaField_kwlgqhti").getValue();
// Convert the data format from string to object.
  let obj = JSON.parse(res);
// Create an empty array named arr to store the processed data.
  let arr = [];
// Iterate through the object to get the Fields to display.
  const list = obj.map(item => {
    let object = {};
// "textField_kwlgqhtk" and "textField_kwlgqhtl" are the unique identifiers of the two Single-line text Components inside the subform.
// Replace them with the unique identifiers of the Single-line text Components you created.
    object.textField_kwlgqhtk = item.union_org_name;
    object.textField_kwlgqhtl = item.union_corpid;
    arr.push(object);
  })
// Write the processed data arr back into the subform Component.
// "tableField_kwlgqhtj" is the unique identifier of the subform Component.
// Replace it with the unique identifier of the subform Component you created.
  this.$("tableField_kwlgqhtj").setValue(arr);
```

6. Click **Save** in the upper-right corner of the page.
7. Repeat steps 1–6 to create the "Branch Organization Query Result Record". (See Figure 2.1-6 for the result.)

Figure 2.1-6 Creating the "Branch Organization Query Result Record" form

### 2.2 Step 2: Create and Configure the Connector

<Note>
  For an introduction to the YiDA Connector feature, see [Integration & Automation - Connector](/yida/integration/gqmveiswrxkgxu9s).
</Note>

Create a connector for the "Get Organization Info" form to retrieve information about associated organizations.

**Steps:**

1. Go to the backend management page > **Get Organization Info** > **Integration & Automation** > **Create Integration & Automation**. (See Figure 2.2-1.)

Figure 2.2-1 Connector entry

2. Name the connector "Query Association Organization Info", select **Form event trigger** as the trigger type, and click **Confirm**.

(See Figure 2.1-2.)

Figure 2.2-2 Creating the connector

3. Name the connector "Query Association Organization Info" > select **Create Success** under **Form event trigger** > select **All Data** under **Data filter** > click **Confirm**. (See Figure 2.2-3.)

Figure 2.2-3 Configuring the connector Form event trigger

4. Add a **Conditional Branch** node. When the condition rule Target equals "Query Parent Organization", add the **Get Parent Organization** connector and a **Create Data** data node. Otherwise, add the **Get Branch Organization** connector and a **Create Organization** data node. (See Figure 2.2-4.)

Figure 2.2-4 Adding and configuring branch conditions

5. Configure the connector under **Branch 1**.

Figure 2.2-5 Selecting the connector app under "Branch 1"

Figure 2.2-6 Selecting the connector execution action for "Branch 1"

Figure 2.2-7 Configuring the connector execution action under "Branch 1"

6. Configure the **Create Data** node under **Branch 1**. (See Figure 2.2-8.)

Figure 2.2-8 Adding and configuring the "Create Data" node under "Branch 1"

7. Configure the connector under **Branch 2**.

Figure 2.2-9 Selecting the connector app under "Branch 2"

Figure 2.2-10 Selecting the connector execution action under "Branch 2"

Figure 2.2-11 Configuring the connector execution action under "Branch 2"

8. Configure the **Create Data** node under **Branch 2**. (See Figure 2.2-12.)

Figure 2.2-12 Configuring the "Create Data" node under "Branch 2"

9. Click **Save** in the upper-right corner of the page, then click **Publish**.

### 2.3 Step 3: Submit Form Data

Trigger the connector, receive the data it returns, and display the processed result.

**Steps:**

Fill in the Form Data and submit. (See Figure 2.3-1.)

Figure 2.3-1 Submitting Form Data

## 3. Result Preview

Figure 3-1 Connector result preview
