Stock Level Management

For any product that has it’s Track Inventory field checked, to be able to be purchased from your store it must have an associated Stock Level record with available stock. If the product has the Track Inventory field set to false, then the associated Stock Levels will have no impact on the product’s availability or where an Order Product’s stock is allocated from.

When Track Inventory = true, a product’s availability in your store can be determined by the Available to Sell value on the Stock Level record. When Available to Sell is 0 or below, the product won’t be able to be purchased from your store unless the Stock Level has Backorder enabled. The Count on Hand figure will remain the same until the product has been shipped and has left your Stock Location (warehouse or physical store, etc.).

This article covers the following topics:


Key Calculations

Count on Hand

Calculation is as follows:

Sum of all Stock Adjustments since the latest Initial Inventory or Stock Take Adjustment record.

Each time stock is shipped, returned or transferred, a Stock Adjustment record is created.

It is highly discouraged to manually change this value as it would eventually be overwritten when the field is next recalculated. Use the steps detailed in Adjusting Inventory below instead.

Available To Sell

Calculation is as follows:

Count On Hand minus the sum of all Order Product quantities for orders that:

  1. Have Checkout Step = complete
  2. Are not in a shipped order status
  3. Are not in a cancelled order status

Each new order or updating the Quantity on an Order Product will update the Available to Sell for the Stock Level the Order Product looks up to.

When manually adding a new Order Product in Salesforce, you won’t have a Stock Level field to set until after you have set the quantity so not knowing the Stock Level, Available to Sell can’t update. After you have saved the record, you can then set a Stock Level. After that, changing the Quantity or changing the order status will update the Available to Sell.

Orders in a Shipped or Cancelled Status (see below) do not further adjust the Available to Sell, even when the Quantity is changed. To avoid making changes that don’t adjust Available to Sell, restrict editing Order Products by making the Shipped and Cancelled statuses an Activated Status Category.

It is highly discouraged to manually change this value as it would eventually be overwritten when the field is next recalculated. Use the steps detailed in Adjusting Inventory below instead.

Activated Order Status Category


Stock Adjustments as Order Status Changes

If tracking inventory, you will need to configure what order statuses specify that the order’s products have been shipped (no longer at the Stock Location) as well as when an order has been cancelled (the products have become available to sell again).

There are two Custom Metadata Types that determine what orders statuses equate to products being shipped or cancelled:

  1. Order Shipped Status
  2. Order Cancelled Status

Order Shipped

Order Shipped metadata determines which order statuses have been considered shipped. All products in an order that has been moved to a shipped status have their Count On Hand amount reduced by the quantity in the order. Once Count on Hand have been reduced this order will not reduce them any further if the order changes status to another shipped status.

If you move the status from a shipped status to a non-shipped status, the Count on Hand reductions will be reverted. If you have order statuses later than the initial shipped status, you may want to consider also setting those later statuses as shipped statuses in the metadata so Count on Hand does not revert when moving to those statuses.

Order Cancelled

Order Cancelled metadata determines what status is considered cancelled. Moving to a cancelled status reverts any Count on Hand reductions caused by moving an order to a shipped status. It will also revert all Available to Sell reductions for the order.

For stock levels to adjust as the order status changes, you will first need to configure both of these Custom Metadata Types.

Steps to configure:

Metadata Settings Example


Custom Metadata Example Setup:

Default Setting for Order Shipped Status is Shipped and Activated

Custom Metadata Shipped

Default Setting for Order Cancelled Status is Cancelled

Custom Metadata Cancelled

Order Status API’s (Order Status to match the Custom Metadata fields):

Custom Metadata Settings


What Stock is Assigned to an Order Product

A stock level is considered Available to fulfill all or part of an order if:

  1. The Stock Level’s Available to Sell is greater than 0 or is set to Backorderable = true
  2. The orders delivery method matches that of it’s Stock Location

Since Stock Locations can be configured to fulfill orders via shipping, Click and Collect, both or none, the stock levels are filtered first based on the customer’s selected delivery option and then the highest priority Stock Location is selected for each Order Product (i.e. a Stock Level belonging to a Click and Collect only Stock Location, will not be available if the customer chooses to get the order delivered).

When an order is created by StoreConnect, a product’s available Stock Level is selected for each Order Product in this priority:

  1. As selected by the customer if delivery is Click and Collect
  2. Priority stock level if it’s Stock Location is Active
  3. Priority stock location that is Active
  4. Stock Level with the most Available to Sell

Prioritising Stock Levels

When multiple Stock Locations exist, a product can have multiple Stock Levels but each product can only have one priority stock level. A Stock Level can be prioritised by setting Priority = true on that Stock Level. Setting a Stock Level as the priority will unselect the previous priority Stock Level for that product.

Prioritising Stock Locations

Where more than one Stock Location exists and there is no available priority Stock Level, The Stock Level belonging to the priority Stock Location is used, provided it is available. As a last resort, the Stock Level with the most Available to Sell will be used for that Order Product.

A Stock Location can be prioritised by setting Priority = true on that Stock Location. Setting a Stock Level as the priority will unselect the previous priority Stock Location.

Fallback Stock Level

Because stock can be held in numerous Stock Locations, a product can be purchased in quantity where some of the stock needs to come from one location and the rest from another. Or some of that product is available to ship and the rest is on backorder. StoreConnect does not split these up into separate Order Products and will take the stock from the first available stock location based on priority and falls back tot he stock level with the most Available to Sell. This may mean a stock level, even if not backorderable, can end up with a negative Available to Sell.

StoreConnect leaves it up to you to decide on how you want to manage this scenario. You could split the order items up and supply some from one Stock Level and the rest from another, meaning you are shipping from more than one location at a higher cost. You could perform a stock transfer and transfer stock from one location to the other to then be shipped together, meaning you move the stock to one location and ship to the customer from there, adding time before shipping the order but potentially being a cheaper shipping option. A combination of the above depending on the products or locations may suit your business best and each can be managed manually by altering the orders Order Product records or creating a Stock Transfer.


Correcting Your Inventory Count

The following are the three ways to correct your inventory count at a Stock Location. When adjusting a Stock Level, you are adjusting the Count on Hand amount. The Available to Sell is then calculated as specified earlier in this article.

Change Quantity

Changing Quantity allows stock to be added/reduced depending on the amount provided in the field. For example, a Stock Level with a Count on Hand of 10, setting Change Quantity to 5 would update the Count on Hand to 15 whereas setting it to -5 would update the Count on Hand to 5.

Set Quantity

Setting quantity allows stock to be reset to the provided amount. For example, given a stock level with a Count on Hand of 10, setting Set Quantity to 3 would update the total Count on Hand to 3.

Stocktake

Stocktakes allow you to reset the Count on Hand and Available To Sell calculation to the most recent manual inventory count. All subsequent calculations of Count on Hand and Available to Sell are done starting from the most recent stock take.

To create a stocktake:

  1. Edit an existing Stock Level
  2. Update Last Inventory Count to an amount different from the Count On Hand
  3. Update Last Inventory Date to the desired date (usually the date today)
  4. Save


Viewing Stock Adjustments History

Any stock movement that changed the Count On Hand is reflected in the Stock Adjustments Related List. Adding a record here will update the Count on Hand but deleting one of these records will not recalculate the count. It is recommended that you don’t delete these records but you can add a negative amount if you need to undo a previous entry.

Stock adjustment history

 

 
Back to Documentation