# Intercompany

# Intercompany Master Data

The module lets group companies, linked through IC partners with an API connection, share master data (items, vendors, G/L accounts and other tables). It allows you to:

- set up the API connection to IC partner companies;
- define which tables and fields are shared (**IC Data**);
- send the configuration to partner companies (**Push to IC Partner**);
- search a record in the partner company and import it into the current company (**IC Search**);
- block local creation and modification of centrally managed fields;
- use number series managed by a partner company.


On the **IC Partner Card** a new inbox type, **API**, is available. When selected, the partner is reached through API calls to its Business Central company.

To set up the connection:

1. Open the partner's **IC Partner Card**.
2. Set **Inbox Type** = **API**.
3. Use the **API Setup** action, or click the **Inbox Details** field: the **API IC Setup** page opens.
4. Fill in the fields and use **Test Connection** to check the link.

If the page is opened from the **Inbox Details** field and confirmed with **OK**, the connection is tested and the name of the connected company is written in the field.

| Field | Description |
|---|---|
| Environment Type | Installation type of the partner company. Currently only **On Premises** is supported. |
| Endpoint URL | Address of the partner company's API service. |
| Company ID | Identifier of the company in the partner's database. |
| Login | User used for the connection. |
| Password | User password (stored securely and shown masked). |

The **Test Connection** action performs a test call and, if it succeeds, shows the message "Successfully connected to" followed by the company name.


The **IC Data** page (searchable with "Tell me") lists the shared data configurations. Each configuration opens in the **IC Data** card.


| Field | Description |
|---|---|
| Code | Configuration code. |
| Description | Configuration description. |
| IC Partner Code | IC partner (company) from which data is read during **IC Search**. |
| Enabled | Activates the configuration: only enabled configurations are used for search and blocking. |


Lists the shared tables.

| Field | Description |
|---|---|
| Table No. | Business Central table to share (e.g. Item, Vendor, G/L Account). |
| Table Name | Name of the table. |
| Field Nos. | Number of fields available in the table. Click it to open the fields page. |
| Sync Field Nos. | Number of fields marked for synchronization. Click it to open the fields page. |

If you change the table on a line, the field settings of the previous table are deleted. Deleting a table line also deletes its field settings; deleting a configuration deletes all its lines.


The **Fields** action in the Tables section opens the **IC Data Fields** page, listing all fields of the table. For each field you can enable the following options:

| Field | Description |
|---|---|
| Field No. / Field Name | Table field (not editable). |
| Sync | The field value is read from the partner company and copied when the record is imported. |
| Blocked | The field is managed centrally: it cannot be changed manually in the current company. |
| Search | The field is used for searching in the **IC Data Search** page and shown as a result column (maximum 4 fields). |

Settings are saved when the page is closed; only fields with at least one option enabled are stored.


The **Push to IC Partner** action on the **IC Data** card sends the configuration (header, tables and fields) to other companies:

1. Open the **IC Data** card.
2. Choose **Push to IC Partner**.
3. Select one or more IC partners (only partners with inbox type **API** are listed) and confirm.

The configuration is created or updated in each selected company; a window shows the progress.


The **IC Search** action is available on the **Items**, **Vendors** and **Chart of Accounts** pages. It opens the **IC Data Search** page when an enabled configuration contains the corresponding table.

1. Choose **IC Search** from the list.
2. Type text in the **Search** field: the search runs in the company of the IC partner set in the configuration, on the fields marked **Search**.
3. Results show up to 4 columns, matching the search fields.
4. Select the desired line and choose **Import**.

The record is created in the current company with its key and the values of the fields marked **Sync**; if it already exists, it is updated. The page closes when done.


- **Blocked fields:** when a table has **Blocked** fields in an enabled configuration:
  - manual changes to those fields are prevented with the message "IC Data, unable to modify" followed by the field name;
  - if the record key fields (e.g. the number) are blocked, records cannot be created or renamed manually: the message "Unable to insert into ..., use IC Data Search" appears. New records must be imported with **IC Search**.
- **Intercompany number series:** the **No. Series** page has an **IC Partner Code** field (hidden by default, can be shown by personalizing the page) and the series lines offer the **Intercompany** implementation. With this setting numbers are not assigned locally but requested from the company of the specified IC partner, which manages the series with the same code. This way several companies can share a single numbering.