Customize the sold out inventory level

By default Back in Stock treats variants with inventory of zero (or less) as sold out. Variants with inventory of one (or higher) and treated as ‘in stock’ and won’t be displayed in the signup form.

You can override this quantity in your product page template by including _BISConfig object and setting the instock_qty_level property. The default instock_qty_level is 1.

For example, if you prevent customers from purchasing when inventory drops below 5 you can tell Back in Stock to use this custom level:

<script>
_BISConfig = { instock_qty_level: 5 }
</script>

Show for preorder must be enabled when using this custom setting as the Shopify product API will still track these variants as ‘available’ to purchase.

Troubleshooting

If you have set the custom instock_qty_level but aren’t seeing variants in the signup form you expect check the web browser console for messages.

Ensure the storefront widget is including your custom setting.

When the Back in Stock widget loads on the page and detects your custom _BISConfig setting you should see message in the console:

If this message does not appear:

  • Hit View source in the browser and check _BISConfig object is included in the page

Ensure Show for preorder items is enabled

Show for preorder items must be enabled in your Back in Stock account settings. See Displaying Back in Stock for products available to pre-order for instructions on enabling this setting.

Make sure inventory_quantity is available to the storefront widget

If the storefront API is not providing the variant inventory quantity the Back in Stock storefront widget will display a warning in the console:

Warning: instock_qty_level is set but inventory_quantity not available.

Check your theme.liquid still includes the Back in Stock helper snippet. You should see this include at the bottom of the template:

{% include 'back-in-stock-helper' %}

If you have switched themes you may need to copy it across from an older copy of your theme. If you no longer have a copy of the snippet please contact support and we can set you up again.

Still need help? Contact Us Contact Us