This interaction is used to keep inventory levels up-to-date in Magento by importing the on-hand inventory levels from one, or multiple, warehouses in Brightpearl. The bulk and real-time inventory imports are designed to efficiently and effectively prevent overselling through your Magento stores.
Brightpearl will only send the quantity, all other inventory settings within Magento will be respected.
How Magento inventory levels get updated
The Brightpearl Magento extension provides multiple options for updating inventory levels on Magento using the on-hand availability in Brightpearl:
- Bulk inventory updates
For all SKUs, which can be run manually at any time and can also be set to run as a cron job - automatically running at the specified time and frequency.
- Real-time inventory updates
For individual SKUS which can be run manually at any time and can also be set to update upon certain triggers:
- When a shopper views the product
- When a shopper adds the product to the basket
- When a shopper view the product in their basket
- When a shopper checks out with the product
Time-to-live is way of specifying how long you'd like to Magento to wait before considering if a product inventory level should be checked.
For example if the Default time-to-live is set to be 300 seconds (5 minutes) this means that once the inventory is updated Magento will not ask Brightpearl again for at least 5 minutes. Once those 5 minutes have expired then Magento will get a fresh inventory level the next time it asks Brightpearl.
To compliment this you can also set different Time-to-live periods for different triggers. So you may want to have a much shorter one when the customer attempts to add the product to a basket or when they go through the check out.
A time-to-live (TTL) setting for these triggers prevents excessive requests for inventory updates which could cause performance issues on Magento. It's useful to work with your developers to help find a balance that works for your configuration; where inventory updates are performed regularly enough to keep stock levels in sync without adding any unnecessary overhead on your server.
Which Brightpearl inventory level is used?
No matter how the inventory update is triggered, the update will always use the current on-hand quantity in Brightpearl. The on-hand quantity can be for a single warehouse or the sum of the on-hand quantity at several warehouses.
The on-hand quantity is the quantity in stock less those already allocated to sales orders and is therefore the number actually available for new orders.
Why so many options for updating inventory levels?
Updating inventory levels for hundreds or thousands of products can be an intensive process for your Magento server. These inventory updates are designed to be the most efficient and effective way of preventing overselling, whilst remaining within API throttle limits.
How to manually run a bulk inventory update
- In Magento, ensure that bulk inventory updates are enabled at Interactions > Brightpearl > Configuration.
- To run the bulk stock level import, go to Interactions > Brightpearl > Interactions.
- Select Import Stock Levels (bulk) from the menu and specify:
Batch size: How many products the inventory level will be requested for in one go.
Sleep between saves: The length of time between sending each batch of update requests to Brightpearl
How to manually update the inventory for specific SKU(s)
- In Magento, ensure that real-time inventory updates are enabled at Interactions > Brightpearl > Configuration.
- To run the import, go to Interactions > Brightpearl > Interactions.
- Select Import Stock Levels (real-time) from the menu and specify:
SKU codes: Specify which SKUs to update. Enter comma separated values.
Brightpearl warehouse(s): Specify from which warehouse the on hand inventory level should be used.
Run price index: Check this box if the SKU codes are components of a bundle.
Time-to-live: Specify what time-to-live should be set for the products during the update
Query string limit: This is used to break a large number of specified SKUs up into batches. The Brightpearl API has a maximum of 128 characters per API request.
- Click the Execute button to begin updating the inventory levels.
Continue to sell when out-of-stock
Brightpearl will only send the quantity available of an item, all other inventory settings available within Magento will be respected. This means that if you wish to continue to sell items even when they are out-of-stock you can control this on the product in Magento.