Stock Display
Stock levels are retrieved automatically from your eCommerce platform (or integration if you're using the SparkLayer API) and you can choose to display these to your customers as well as customise the status messages.

To enable this feature, you can apply a special setting to your website as shown below.
Updating the display You can update the default display by adding code to your Core Script. Learn more about how to update display settings on SparkLayer
You can adjust the rules of the status messages shown to customers by changing the variables in the configuration code above.
Status | Details | Behaviour |
max | The maximum stock level you want to show to customers. | Stock displays as "XX+ available" |
last | Let your customers know that the stock level is down to its last items | Message shows as red"Last stock" |
low | Let your customers know that stock level is low | Message shows as orange"Low stock" |
If you're wanting to set a maximum stock level that your customers see, you can configure this via the SparkLayer Dashboard.

For example, if you set the limit to 100, it will display as 100+ to the customer if the stock level exceeds this.


You can also display live stock levels in the Product Card Interface. To enable this please read our guide.
SparkLayer has full support for different stock status messages and it's possible to set up products as pre-order and back-order. This will allow products to be added to an order and concurrently show the pre-order / back-order messaging to the customer.


To enable this within Shopify
- Set the product as 'Continue selling when out of stock'
- Set a stock level of zero (or less)
By default, the pre-order messaging is hidden to the customer. To enable this, add the below CSS to your CSS overwrites.
Updating language and text You can update the default text by adding code to your Core Script. Learn more about how to update text on SparkLayer.
It's also possible to configure pre-ordering at a variant level, allowing you to set an exact amount of stock you want to allow customers to be able to pre-order.
To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as min_stock_level |
Value | This must be set as a negative integer, e.g. -6, -12, -20, etc |
"Custom dates" allow you to set an exact date when the product is expected to be available. It’s a great way to give the end customer better visibility of when to expect receipt of the products on order, and helps deliver an overall better customer experience.

Use-cases could include:
- Setting a "due in" date of when you're expecting the product to be in stock
- Setting an "estimated shipping" date of when you're expecting the product to ship
To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an date |
Namespace | This must be set as sparklayer |
Key | This must be set as restock_date |
Value | This must be set in the appropriate date format, e.g. 17/11/2022 (for the UK) |
Updating language and text You can update the default text by adding code to your Core Script. Learn more about how to update text on SparkLayer.
If you're installing SparkLayer on a single website and you are looking to run both DTC and B2B at the same time, it will be necessary to use the same stock pool behind the scenes. From an inventory point of view, this essentially means that both DTC and B2B customers will be ordering from the same stock source which can pose challenges.
For example, your B2B customers could place large orders which inhibit DTC customers from being able to order. SparkLayer has a way to solve this using a special setting called "Reserve stock quantity". It works as follows:
- A product is set up within your store with a Reserve Stock Quantity, e.g. 50
- Both DTC and B2B customers can order this product via your store
- When the total stock level reaches 50, B2B customers will be prevented from adding the item to their order
- DTC customers can continue to order the item, thus reserving stock for them
To enable this, SparkLayer uses special settings (sometimes referred to as metafields or attributes) that allow additional data to be stored against products.
Setting up metafields on Shopify To learn more about how to configure metafields on Shopify for SparkLayer, please refer to our guide here
Item | Details |
Custom data type | Variants |
Metafield type | This must be set as an integer |
Namespace | This must be set as sparklayer |
Key | This must be set as reserve_stock_quantity |
Value | This must be set as an integer, e.g. 50 |
Within the Frontend Interfaces, SparkLayer will display the "stock status" of a product (and its variants), allowing customers to easily see the inventory availability. Providing you have the "Show stock levels (inventory)" configuration enabled, you can then adjust the messaging that is shown by overwriting the default language settings.
Updating language and text You can update the default text by adding code to your Core Script. Learn more about how to update text on SparkLayer.