# Import from Infor M3 to DocBits via API

## Step 1: Create an API

1. Open **Infor OS** and navigate to **API Gateway** > **Available APIs**.
2. Click **Add**, then select **Create New**.
3. Fill in the details for the API:
   * **Application Name**: `DocBits-Stage`, `DocBits-Sandbox`, `DocBits-Prod`, or `DocBits-Demo` (based on your environment).
   * **Suite Name**: Same as the application name.
   * **API Context**: Same as the application name.
   * **Description**: Same as the application name.
   * **Icon**: Select a blue document icon.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e630ff5d13d561e93a2896a8b8efa4183cbafd0a%2Fimport_from_infor_m3_to_docbits_via_api_1.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Add a **Target Endpoint**:

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-acaeb061ce5d7e521b415a7f67bd017a573d7cbb%2Fimport_from_infor_m3_to_docbits_via_api_2.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Target Endpoint URL**: Use the appropriate URL for your environment:
  * `https://stage.api.docbits.com`
  * `https://sandbox.api.docbits.com`
  * `https://api.docbits.com`
  * `https://demo.api.docbits.com`
* **Target Endpoint Description**: `Stage`, `Sandbox`, `Prod`, or `Demo` (matching the environment).
* **Proxy Context**: Same as the environment (`Stage`, `Sandbox`, `Prod`, or `Demo`).
* **Proxy Security**: Select **OAuth 2.0**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-5f18ddbfdc4c7541aa533ef167943eb0c09a53fd%2Fimport_from_infor_m3_to_docbits_via_api_3.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Target Endpoint Security**:
  * **Authentication Type**: API Key
  * **Key Mode**: Header
  * **Key Name**: `X-API-KEY`
  * **Key Value**: Retrieve the API key from **DocBits** by navigating to **Settings** > **Global Settings** > **Integration**, then copy the API key and paste it as the key value.
* Save the target endpoint configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-1257885a83e7baec8f4b16f2f07a2bd0e9404f09%2Fimport_from_infor_m3_to_docbits_via_api_4.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Add API Documentation:

* Return to the API documentation section by clicking **Documentation Icon** in the created Endpoint.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-5b90562e6c339be3d3bcb9d2f47ad5329eef6410%2Fimport_from_infor_m3_to_docbits_via_api_5.png?alt=media" alt=""><figcaption></figcaption></figure>

* Scroll down to the **Documentation** section and click **+ Add Documentation**.
  * **Name**: `DocBits-Stage`, `DocBits-Sandbox`, `DocBits-Prod`, or `DocBits-Demo` (matching the environment).
  * **Type**: Swagger
  * **Enter URL or Upload Swagger JSON/YAML**: Use the appropriate Swagger file URL for your environment:
    * `https://stage.api.docbits.com/openapi.json`
    * `https://sandbox.api.docbits.com/openapi.json`
    * `https://api.docbits.com/openapi.json`
    * `https://demo.api.docbits.com/openapi.json`
  * Ensure there is no trailing space at the end of the URL.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e286b0d3e18c3aa693458533567d728dfd2aa0c6%2Fimport_from_infor_m3_to_docbits_via_api_6.png?alt=media" alt=""><figcaption></figcaption></figure>

* The API documentation will automatically be added, and the metadata refresh will be triggered.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-431c36a95d7a4c820986d4565a0f93ac1aa5b3e9%2Fimport_from_infor_m3_to_docbits_via_api_7.png?alt=media" alt=""><figcaption></figcaption></figure>

## Step 2: Create an API Connection Point

1. Navigate to **OS** > **ION** > **Connect** > **Connection Point**.
2. Click **Add** and select **API** as the connection type.
3. Fill in the required details:
   * **Name**: `DocBits_Import`
   * **Description**: `DocBits_Import`
   * **Service Account**: Upload the service account file that was created earlier.

### Step 2.1: Add and Configure Documents

* You don't need to add all documents—only the necessary ones.
* The documents **Sync.ChartOfAccounts** and **Sync.CodeDefinition** are required for auto-accounting.

## Sync.SupplierPartyMaster

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click **Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.SupplierPartyMaster`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-9751ccd7e8de940c6422842f4a966a79d68fe6cf%2Fimport_from_infor_m3_to_docbits_via_api_8.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Configure the ION API:
   * **API Call Name**: `Sync.SupplierPartyMaster`
   * **Click on Select**
   * For **Product**, choose the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/supplier_bod
     ```
   * Click **OK** to confirm the selection.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-ced05e23f97d14fa82d2c06880ff7cd4332acbf1%2Fimport_from_infor_m3_to_docbits_via_api_9.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Set the **Request Body**:
   * For **File**, select **Input Document = No Compression**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f89a24b59fc6cd02ff1262a1294c42311a0b3c76%2Fimport_from_infor_m3_to_docbits_via_api_10.png?alt=media" alt=""><figcaption></figcaption></figure>

## Sync.RemitToPartyMaster

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.RemitToPartyMaster`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e84aa8242e91603dd5c8e78f4dfa056db79f42d9%2Fimport_from_infor_m3_to_docbits_via_api_11.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.RemitToPartyMaster`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/supplier_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-591f862495b484c4c3c41c0664d05616108e45f1%2Fimport_from_infor_m3_to_docbits_via_api_12.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, select **Input Document = No Compression**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-7043efb499108e83a5e2a330089da3a761eeb870%2Fimport_from_infor_m3_to_docbits_via_api_13.png?alt=media" alt=""><figcaption></figcaption></figure>

## Acknowledge.SupplierInvoice

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Acknowledge.SupplierInvoice`
3. **Configure the ION API**:
   * **API Call Name**: `Acknowledge.SupplierInvoice`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/infor/idm/handle_ack_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f005bf69b686bc136188aa93cc9304fb243dd641%2Fimport_from_infor_m3_to_docbits_via_api_15.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**: Add the following values in the **Request Body** section:
   * For **idm\_doc\_type**, set **Value** = `M3_SupplierInvoice`
   * For **idm\_bod\_id\_field\_name**, set **Value** = `BOD_AlternateDocumentID_1`
   * For **attributes\_map**, set **Value** =

     ```
     {"Export": "Success"}
     ```
   * For **acl\_from**, set **Value** = `Public`
   * For **acl\_to**, set **Value** = `Private`
   * For **set\_to\_error\_on\_rejected**, set **Value** = `True`
   * For **delete\_from\_idm\_on\_rejected**, set **Value** = `True`
   * For **File**, set **Input Document = No Compression**.
   * For **ionapi\_json**: Add the content of the ionapi file.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c7802ca9928e6d37c13cafc1385491279eb45db6%2Fimport_from_infor_m3_to_docbits_via_api_16.png?alt=media" alt=""><figcaption></figcaption></figure>

## Sync.PurchaseOrder

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.PurchaseOrder`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-361f5ed3a22c64ae56133c572c7eafe86ab60983%2Fimport_from_infor_m3_to_docbits_via_api_17.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.PurchaseOrder`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/purchase_order_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-ffbccf7ce2d8512fb83d32d5204836aad446dde5%2Fimport_from_infor_m3_to_docbits_via_api_18.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, set **Input Document = No Compression**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-2e9238cadf310d6d5ca6fe906d880961c4912cc0%2Fimport_from_infor_m3_to_docbits_via_api_19.png?alt=media" alt=""><figcaption></figcaption></figure>

## Sync.ReceiveDelivery

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.ReceiveDelivery`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-09343b57b41578b17919faad8c13eeac77af3c15%2Fimport_from_infor_m3_to_docbits_via_api_20.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.ReceiveDelivery`
   * **Click on Select**
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/import/receive_delivery_bod
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-a62a343003a6c1a11070780fa7cc77e530a5ef8f%2Fimport_from_infor_m3_to_docbits_via_api_21.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **File**, set **Input Document = No Compression**.

## Sync.AdvanceShipNotice

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.AdvanceShipNotice`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-9fe82d2eff61bebb93c808545c99e720ff6c2f57%2Fimport_from_infor_m3_to_docbits_via_api_23.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.AdvanceShipNotice`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f5b4eedb2cb3de827ced0f2d5fac6552bb2fcf20%2Fimport_from_infor_m3_to_docbits_via_api_24.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set **Value** = `AdvanceShipNotice`
   * For **field\_mappings**, set **Value** =

     ```
     { "ID": "//DataArea/LnTaxCode/DocumentID/ID" }
     ```
   * For **File**, set **Input Document = No Compression**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-1986a194a37ac121e5c0731953eb52e274c36692%2Fimport_from_infor_m3_to_docbits_via_api_25.png?alt=media" alt=""><figcaption></figcaption></figure>

## Sync.ChartOfAccounts

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.ChartOfAccounts`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-456259b2ffec6488c3aa50d5db1797796087d78c%2Fimport_from_infor_m3_to_docbits_via_api_26.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.ChartOfAccounts`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f461c7450c334536be17c20da302043a29c4dacd%2Fimport_from_infor_m3_to_docbits_via_api_27.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set Value = `ChartOfAccounts`
   * For **field\_mappings**, set Value =

     ```
     {
         "ID": "//DataArea/ChartOfAccounts/IDs/ID",
         "NominalAccount": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/GLNominalAccount",
         "AccountType": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/AccountType",
         "Description": "//DataArea/ChartOfAccounts/BaseChartOfAccounts/Description",
         "DimensionProfile": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/ID",
         "Dimension1": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[0]/ListID",
         "Usage1": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[0]/Usage",
         "Dimension2": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[1]/ListID",
         "Usage2": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[1]/Usage",
         "Dimension3": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[2]/ListID",
         "Usage3": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[2]/Usage",
         "Dimension4": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[3]/ListID",
         "Usage4": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[3]/Usage",
         "Dimension5": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[4]/ListID",
         "Usage5": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[4]/Usage",
         "Dimension6": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[5]/ListID",
         "Usage6": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[5]/Usage",
         "Dimension7": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[6]/ListID",
         "Usage7": "//DataArea/ChartOfAccounts/DimensionProfileSet/DimensionProfile/DimensionUsage[6]/Usage"
     }
     ```
   * For **File**, set **Input Document = No Compression**.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-8e5d56ae638cd7c0a28182c7c28c9341acc80587%2Fimport_from_infor_m3_to_docbits_via_api_28.png?alt=media" alt=""><figcaption></figcaption></figure>

## Sync.CodeDefinition-AccountingDimension

1. Navigate to the **Documents** tab in the API Connection Point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c36b0f4f4e63bef8c4d0d1b998346ffac8853660%2Fimport_from_infor_m3_to_docbits_via_api_32.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Click Add New Document** and fill in the following details:
   * **Scenario**: `Send to API`
   * **Documents**: `Sync.CodeDefinition`

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-569273930e0c5fbacad66ada104c90fb92b7f085%2Fimport_from_infor_m3_to_docbits_via_api_29.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Configure the ION API**:
   * **API Call Name**: `Sync.CodeDefinition-AccountingDimension`
   * For **Product**, select the API endpoint created in **Step 1: Create an API**.
   * Locate and select:

     ```
     CustomerApi/DocBits-Sandbox/Sandbox/master_data_lookup/xml/import_xml_file
     ```
   * **Click OK** to confirm the configuration.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-96452a0e46a1cf5da3ddba1f5c893ab8c5f34fa2%2Fimport_from_infor_m3_to_docbits_via_api_30.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Configure the Request Body**:
   * For **data\_type**, set Value = `M3Dimension`
   * For **field\_mappings**, set Value =

     ```
     {
         "ID": "//DataArea/CodeDefinition/DocumentID/ID",
         "Dimension": "substring(//DataArea/CodeDefinition/CodeValue/@listID,21)",
         "ListID": "//DataArea/CodeDefinition/ListID",
         "CodeValue": "//DataArea/CodeDefinition/CodeValue",
         "Description": "//DataArea/CodeDefinition/Description"
     }
     ```
   * For **File**, set **Input Document = No Compression**

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-58aa80b812b723be6c554b5a8b9d1f6175934fd0%2Fimport_from_infor_m3_to_docbits_via_api_31.png?alt=media" alt=""><figcaption></figcaption></figure>

## Step 3: Create the Document Flow

1. Navigate to **OS** > **ION** > **Connect** > **Data Flows**.
2. Click **Add** and select **Document Flow**.
3. Fill in the required fields:
   * **Name**: Use a name specific to your environment, such as `M3-to-DocBits-Stage-Import-API`
   * for stage, `M3-to-DocBits-Sandbox-Import-API` for sandbox, or `M3-to-DocBits-Prod-Import-API` for production.
   * **Description**: Same as the name above.
4. Configure the Application Node:
   * Under **Application**, set the **Name** to `M3`.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-ea78341469c24adb9e2065735ff10fc8b902e7af%2Fimport_from_infor_m3_to_docbits_via_api_33.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click the **+** button and select the customer's connection point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-9507037744a48245f931d95c70b7da2676ff7ead%2Fimport_from_infor_m3_to_docbits_via_api_34.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click on the **Document** icon next to the application node.
  * Select all the documents you want to export/sync from LN to DocBits.
  * Ensure these documents match the ones selected in **Step 2: Create an API Connection Point**.
  * If any documents are missing, they must be added to the customer's connection point.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-c401443e7a97b7dff27cbf127e71bff8ca40e902%2Fimport_from_infor_m3_to_docbits_via_api_35.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Configure the API Node:
   * Add a **API** node and position it to the right of the application node.
   * Fill in the required fields:
     * **Name**: `DocBits-API`
     * **Description**: `DocBits-API`
     * **ION API Connector**: Use the connection point created in **Step 2: Create an API Connection Point**.
   * Click the **Document** icon next to the stream node. This should be empty.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-7c030e166716fcbf2c4040c9373bf86cbd44427f%2Fimport_from_infor_m3_to_docbits_via_api_36.png?alt=media" alt=""><figcaption></figcaption></figure>

6. Finalize the Setup:
   * Save the configuration.
   * Click **Activate** to complete the setup.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-04eb7b8851411ccfeec7303f45a07867eeb0c71c%2Fimport_from_infor_m3_to_docbits_via_api_37.png?alt=media" alt=""><figcaption></figcaption></figure>
