---
schema_version: "1"
id: 4f4340e87f2380252ccb90f95764c335a2d5049acef47f480a752c434f650718
title: Considerations for Importing Availability Data
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/oci_impl_importing_availability_data.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.oci_impl_importing_availability_data.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 949c772c220603028fb18deb1d771b794dbcf6382bed5f9dd28f9743382ef5c1
description: Create or import initial product availability data for the locations and location groups.
products:
  - Commerce
  - Omnichannel Inventory
release: "264"
---
# Considerations for Importing Availability Data

Create or import initial product availability data for the locations and location groups.

If possible, use the headless Commerce API as described in [Inventory Impex](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=impex:Summary) in B2C Commerce API Reference.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)

Note Importing data with Connect API can cause performance and API quota issues.

To create an inventory data file, format the data as a series of JSON entries representing locations and individual inventory records.

Considerations for inventory import data include:

- Separate the top-level entries with line feeds, not commas. Each entry must be on a single line.
- The mode is assumed to be UPDATE.
- Each inventory record entry requires a unique recordId. Best practice is to use a UUID. The record Id protects against importing duplicate data.
- Each inventory record entry requires an effectiveDate.
- Each futures entry requires a nonzero quantity and a future expectedDate.
- The system only creates or updates entries that are included in the data. It doesn’t delete entries that aren’t included. However, if an included entry has an empty value, that value is deleted.
- If you make any changes to your location graph, don’t import inventory data while the changes are in progress. If you have scheduled imports, pause them until the changes are complete.
- To avoid overselling during the initial implementation period, we recommend defining safety stock levels.
- Inventory data file restrictions differ according to the API used for upload:
    - Headless Commerce API
        - File Size Limit: 100 MB
        - Allowed File Formats: JSON, GZIP
    - Core Connect API (Apex or REST)
        - File Size Limit: 10 MB
        - Allowed File Format: JSON

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)

Note For large data sets, you can split the data into multiple files.

The following example illustrates the data format. For readability, the example shows the first few entries on multiple lines. In the import file, each inventory record entry must be on a single line.

`{   // unique identifier for the inventory record   "recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0",   "onHand":10,   "sku":"12389156",   "effectiveDate":"2020-12-08T14:05:22.790896-07:00",   "futures":[  // list of future restocks     {     "quantity":1,     "expectedDate":"2021-04-18T14:05:22.781-07:00"     },     {     "quantity":5,     "expectedDate":"2021-05-18T14:05:22.781-07:00"     }   ],   "safetyStockCount":0,   "locationId":"Warehouse-A" } {   "recordId":"0a87539d-f3dd-47bc-91c7-9c752e312345",   "onHand":10,   "sku":"9485728",   "effectiveDate":"2020-12-08T14:05:22.790896-07:00",   "futures":[     {     "quantity":10,     "expectedDate":"2021-04-18T14:05:22.781-07:00"     }   ],   "safetyStockCount":0,   "locationId":"Warehouse-A" } {"recordId":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0",​"onHand":10,"sku":"sku1",​"effectiveDate":"2020-04-08T14:05:22.790896-07:00",​"futures":[{"quantity":1,"expectedDate":"2020-04-18T14:05:22.781-07:00"}],​"safetyStockCount":0,"locationId":"Warehouse-B"}  {"recordId":"3127e2ad-748b-459a-917c-78bef741602c",​"onHand":10,"sku":"sku1",​"effectiveDate":"2020-04-08T14:05:22.790896-07:00",​"futures":[{"quantity":1,"expectedDate":"2020-04-18T14:05:22.781-07:00"}],​"safetyStockCount":0,"locationId":"Warehouse-B"}  {"recordId":"b709e7a8-7d4f-4458-be0c-a88f1e594f1d",​"onHand":10,"sku":"sku2",​"effectiveDate":"2020-04-08T14:05:22.790896-07:00",​"futures":[{"quantity":1,"expectedDate":"2020-04-18T14:05:22.781-07:00"}],​"safetyStockCount":0,"locationId":"Warehouse-B"}`

To upload the file to Omnichannel Inventory, first request an upload URI by making a POST call to this endpoint. Specify the fileName in the request payload.

```
/organizations/TenantGroupId/​availability-records/imports/
```

For information about other request parameters, such as link time to live and file encoding format, see the B2C Commerce API Reference.

The response includes these values:

- importId—A UUID representing the data import.
- importStatusLink—A unique endpoint you can use to retrieve the status of the data upload.
- uploadLink—The unique endpoint you use to upload the data file.
- uploadMethod—Always POST.
- uploadLinkExpirationUTC—The time when the upload link expires. If you don’t upload the data by that time, you must request a new import.

To start the upload, make a POST call to the uploadLink URI and include the import file as the payload.

To retrieve the status of the upload, make a GET call to the importStatusLink URI.

After creating or importing the initial inventory data, set up ongoing inventory data imports with your external inventory management system using the Omnichannel Inventory APIs.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)

Note For best performance, use delta data imports as much as possible. Try to limit full data imports.