# Import matches mode

Source: https://developer.avalara.com/products/excise/integration-guides/excise/bxq1038508098269/

Guide: AvaTax Excise

# Import matches mode

Learn about the ImportMatchesMode option and its behavior when importing business entities in ATE.

**Element type**: Required for Core

**Endpoints/models used**: [BusinessEntityImportRequest](https://developer.avalara.com/api-reference/excise/v1/models/Avalara.Excise.Common.Contracts.Services.BusinessEntityImportRequest/)

When importing business entities, an import request can include an existing business entity. For this reason, your integration must provide a way for users to specify the way that ATE handles existing entities. This is done using the `ImportMatchesMode` option. Below are the available behavior options for when a business entity exists in ATE and in an import request:

-   `NONE`: ATE will ignore the business entity in the import request and will not update the existing business entity.
-   `INSERT`: ATE will add the business entity to ATE, creating multiple business entities for the same company.
-   `UPDATE`: ATE will overwrite the existing business entity in ATE with the entity from the new import request.
-   `COPY`: ATE will create a new business entity and mark it as a copy of an existing entity.

The example below specifies an `ImportMatchesMode` of `INSERT`.

## Example

```
{
  "ImportName": "BE_API_TEST",  //--Required
  "UpdateMatchesMode": "INSERT",  //--Required
  "TerminateNewRecords": false,  //--Required
  "CreateAllAccountTypes": true,  //--Required
  "LoadId": "LOAD_GUID_HERE",  //--Required
  "BusinessEntities": [
    {
      "LegalName": "TEST_BE",  //--Required
      "LegalNamePriority": 0,  //--Required
      "TradeName": "TEST_BE",
      "NameControl": "TES",
      "EffectiveDate": "2024-09-01T14:55:52.950Z",  //--Required
      "ObsoleteDate": "2024-09-01T14:55:52.950Z",
      "Address1": "110 Main Street",
      "Address2": "Suite 100",
      "City": "Houston",
      "Jurisdiction": "TX",
      "PostalCode": "77002",
      "CountryCode": "USA",
      "County": "HARRIS",
      "CustomId": "TEST_BE",  //--Required
      "CustomIdPriority": 0,  //--Required
      "IdCodeAndIdTypePriority": 0,  //--Required
      "BusinessEntityMappingId": "BE_GUID_HERE", //--Required
      "BusinessEntityIdCodes": [  //--Required
        {
          "CountryCode": "USA",  //--Required
          "IdType": "FEIN",  //--Required
          "IdCode": "999999999"  //--Required
        }
      ],
      "BusinessAccounts": [
        {
          "CountryCode": "USA",
          "Jurisdiction": "CA",
          "BusinessType": "BUY",
          "BusinessSubType": "TOBMANUF",
          "CustomId": null,
          "EffectiveDate": "2020-01-01T00:00:00",
          "ObsoleteDate": null,
          "LicenseNumber": "123456789",
          "LicensePercentage": null,
          "BusinessAccountMappingId": null
        }
      ]
    }
  ]
}
```