Skip to main content

Import Organization Units

Organization Units, or OUs for short, can be created, imported, and/or updated in EVA using ImportOrganizationUnits. This service creates or updates Organization Units, which EVA then maps to a BackendID.

Creating or importing an OU

{
"OrganizationUnits": [
{
"ParentID": "docs_inc",
"ID": "japan",
"Name": "Japan",
"CurrencyID": "JPY",
"CostPriceCurrencyID": "JPY",
"Status": 0,
"Type": 168
},
{
"ParentID": "japan",
"ID": "tokyo_store",
"Name": "Tokyo Store",
"CurrencyID": "JPY",
"CostPriceCurrencyID": "JPY",
"Status": 1,
"Type": 137
},
]
}

The response will tell you which OUs have been added and/or updated and also return the EVA IDs of these OUs.

In this example, we've created a country container and a shop in that country. In this simple example, we only specified all necessary identifiers on currencies. Additionally, we have set the correct Status and Type.

See OU types and OU statuses for available options.

Adding an address

Addresses can be added in ImportOrganizationUnits like so:

{
"OrganizationUnits": [
{
"ParentID": "japan",
"ID": "tokyo_store",
"Name": "Tokyo Store",
"CurrencyID": "JPY",
"CostPriceCurrencyID": "JPY",
"StatusID": 1,
"TypeID": 168,
"Latitude": 52.375769767286,
"Longitude": 5.217192421803888,
"Address": {
"Address1": "2 Chome-21-13 Kosuge, Katsushika City",
"ZipCode": "124-0001",
"City": "Tokyo",
"CountryID": "JP"
}
},
]
}
Changing address

If a store address has changed, utilize the same service ImportOrganizationUnits, but only update the address object. See update OUs section for more.

Adding opening hours

Opening hours can be added in ImportOrganizationUnits like so:

{
"OrganizationUnits": [
{
"ParentID": "japan",
"ID": "tokyo_store",
"Name": "Tokyo Store",
"CurrencyID": "JPY",
"CostPriceCurrencyID": "JPY",
"StatusID": 1,
"TypeID": 168,
"OpeningHours": [
{
"TypeName": "Visiting",
"DayOfWeek": 1,
"StartTime": "08:00:00",
"EndTime": "18:00:00"
}
]
},
]
}

We've only added opening hours for one day to the example. Normally, you would add an entire array for all days of the week. For more information, see opening hours.

Opening hours template

Post a successful OU import, it is easier to manage opening hours by using a opening hours template. This can be done via the Admin Suite chapter called Opening hours template. This part is not supported via API.

Update OUs

You can easily update an OU using ImportOrganizationUnits too. Omit any field you don't want altered, or send in null values of nullable fields to unset their current value.

Does not apply to addresses and opening hours
  • Specifying a new or different address will create a new address with only the specified data.
  • Every value you specify will either update the existing hours or create an individual record for that day.

To disable an OU, set the IsDeleted boolean to true.

OU types

note

This will determine the OrganizationUnitType.

Frequently combined organization unit types:

Types combinationDescription
Shop, Pickup & EVAThis combination indicates that the organization unit is a shop running on EVA where sales are performed, and one that allows for reservation orders too.
Warehouse & SupplierThis combination indicates that the organization unit can accept delivery orders and at the same time, serve as a supplier of goods to certain stores based on the supplier relations configurations.
Combining types

When providing input for the Type property, make sure to include the values for the desired combination. For example, the value for the Type property of an OU with types Shop, Pickup, and EVA would be 137, representing the sum of Shop (1), Pickup (8), and EVA (128).


OU statuses

The OU statuses are solely for filtering purposes; therefore, any chosen status will have no impact on operational aspects such as transaction processing (sales, returns, etc.) within that organization unit.