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 theInventoryImportDTO
- This method should be overridden if
InventoryImportDTO
andUpdateInventoryInfo
have been overridden
- This method should be overridden if
- 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 methodsgetLocationKey
andgetInventoryListKey
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.
- In the default implementation,
Additional Reading
- Inventory Extensibility Guide
- Helpful guide for extending how Broadleaf handles importing Inventory
- Location Extensibility Guide
- Helpful guide for extending how Broadleaf handles importing Fulfillment Location