Documentation Home

Importing Inventory

Endpoints

For information about how to use the inventory and fulfillment location endpoints please refer to Admin Rest Endpoints

Customizing the import process

  • AdvancedInventoryImportService
    • Configurable property : Number of retries
    • property name : advanced-inventory.import.retries
    • default : 2
    • purpose : The number of times we should retry set inventory until we decide it's a failure. Intended causes of needing this property is a ConcurrentInventoryModificationException that can be thrown if the record we were modifying was changed between the time we read the record from the database and the time we tried writing our changes to the database.
    • Extension points
    • createInfoRecord : Creates the UpdateInventoryInfo record from the InventoryImportDTO
      • This method should be overridden if InventoryImportDTO and UpdateInventoryInfo have been overridden
    • getImportObjectMapper : Returns the object mapper that should be used to deserialize the import payload
      • This method should be overridden if object mapper needs to be customized. This returns a Jackson ObjectMapper so many aspects of how the payload is parsed can be customized
  • MultipleLocationInventoryImportService
    • In the default implementation, MultipleLocationInventoryImportServiceImpl, the methods getLocationKey and getInventoryListKey return the two keys that the import process looks for. If these should be different then the class should be extended and these methods should be overridden.

Additional Reading