Flow Automation: Triggering Workflows When an Inventory Item is Created
You can use the Create inventory item trigger in Flow Automation to initiate workflows whenever a new inventory record is created for a product variant. This is particularly useful for automatically assigning default tags, initializing metadata, or tracking new SKU additions across your store.
This guide explains the actions supported by this trigger, how to test it end to end, and provides a practical example for automating inventory tracking.
Supported Actions
The following actions are primarily used in workflows initiated by the Create inventory item trigger:
- [General] Update counter
- [General] For each loop
- [General] Query metafields
- [Product] Update SKU information
- [Product] Delete SKU
- [Product] Update inventory
| Note: If you need to trigger a workflow based on changes to inventory quantities (e.g., stock increases or decreases) rather than the creation of a new SKU, please refer to "Flow Automation: Triggering Workflows When Product Inventory Changes." |
Testing the Workflow
To test whether the workflow is successfully initiated when a new inventory item is created, follow these steps:
- In Flow Automation, set up a workflow using the Create inventory item trigger.
-
From your SHOPLINE admin panel, go to Products, click a specific product, then scroll down to the Variants section and click Add variant.
Note: For more detailed instructions on creating and configuring variants, please refer to the "Adding and Managing Product Variants" guide. -
After saving the changes, go to Flow Automation to check the execution results.
Note: For more information on how to monitor the execution of your workflows, please refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide.
Example Use Case
Here is a practical example of using the Create inventory item trigger to automate SKU tracking.
Scenario: Update a custom counter whenever a new inventory item is created to track SKU growth.
- Trigger: Create inventory item
-
Action: Update counter
-
Calculation Settings:
- Add: Increases the current counter value by a specified number (e.g., add 1 to track each new SKU).
- Set: Overwrites the counter with a specific value.
- Sub: Decreases the counter value by a specified number.
Note: You can click Add variables when naming your counter to insert the SKU title (e.g., Growth_[SKU_Title]). This allows you to categorize and track growth for different product series or individual items dynamically. -
Calculation Settings:
- Outcome: Every time a new variant is added to your store, the system automatically updates the counter. This allows the operations team to monitor product expansion and maintain accurate records of new SKU arrivals without manual counting.