Product variant inventory quantity changed
The Product variant inventory quantity changed trigger starts a workflow when inventory is changed for a specific product variant. The source of the inventory change can be an order, a manual change to inventory, or an app that changes inventory quantities.
On this page
Data provided
The following data is provided to workflows that start with the Product variant inventory quantity changed trigger.
Data | Description |
---|---|
product | The product which had its inventory quantity changed. |
productVariant | The product variant which had its inventory quantity changed. |
inventoryQuantityPrior | The previous inventory quantity for the product variant. |
Testing the Product variant inventory quantity changed trigger
To test a workflow that starts with this trigger, change a product's inventory.
Considerations
- The Product variant inventory quantity changed trigger will start a workflow, even if the product has Track quantity unchecked.
- This trigger allows the use of actions that affect products and variants. For workflows that affect inventory items, use the Inventory item created trigger instead.
- Draft orders don't affect available inventory until the draft orders are converted to orders.
- To check the inventory quantity at a single location, you can find the quantity information using the
productVariant / inventoryItem / inventoryLevels / available
variable. The location name or ID can be checked using theproductVariant / inventoryItem / inventoryLevels / location / name
orproductVariant / inventoryItem / inventoryLevels / location / id
variables.
Actions
Any action that requires a variant or a product can be used with the Product variant inventory quantity changed trigger. These include:
- Add product tags
- Add product to collections
- Create redirect URL
- Delete redirect URLs
- Publish product
- Remove product from collections
- Remove product metafield
- Remove product tags
- Unpublish product
API details
The Product variant inventory quantity changed trigger allows actions to be taken with the Product Graphql API object.
Templates
Change product template when variants are out of stock or back in stock
Update a product template based on the inventory for the product's variants. The workflow allows you to switch between templates for in stock (the store's default template), out of stock, and when one or more variants are out of stock. View template
Check if a single variant or all product variants are out of stock at all locations
Hide products from the online store when either a single variant or all variants are out of stock across all locations. This ensures customers see only available items, enhancing their shopping experience. View template
Create Trello card when product inventory is low
Add a card to a Trello board when a variants inventory drops below a specific threshold. View template
Create task in Asana when product inventory is low
Add a task to an Asana project when a variants inventory drops below a specific threshold. View template
Get notified by email when product variant inventory is low
In this low stock notification, you can get notified by email when any of your variant's inventory becomes low. View template
Get notified when inventory is low and hide products when out of stock
Notify team members via email and Slack when product inventory drops below specific thresholds and automatically hide products from the online store when completely out of stock. View template
Initiate reorder with vendor when inventory gets low
When a product has low inventory, send an email to your vendor initiating a reorder. View template
Merchandise low stock products by adding to a collection
Add low stock products to a sale collection and unpublish out of stock products from the online store. This template can be used to: increase sales by promoting low stock items, improve customer experience by removing out of stock items from the online store, and streamline inventory management by keeping track of low stock products. View template
Promote or demote a product variant in search results based on inventory
Promote or demote a product variant in Klevu Search based on a product's inventory level. View template
Publish and unpublish products based on inventory level
Hide out of stock products from your online store and republish when they have at least one variant with inventory. View template
Send Slack message when variant inventory is out of stock at a certain location
When inventory quantity changes, check the inventory for the variant at a specified location. If the quantity is less or equal to 0, send a Slack notification. View template
Send notifications for out of stock variants at a single location
Using a single location to fulfill online orders? Get notifications for out of stock variants. View template
Tag out of stock products for a single location only
Using a single location to fulfill online orders? When all of a product's variants are out of stock at a location, this workflow adds a product tag, which can be used to control what shows in the storefront. View template