Flow Automation: Updating Inventory via Action
You can use the Update inventory action in Flow Automation to automatically modify the stock settings and identifier information for specific product variants when predefined conditions are met. This is essential for centralizing the management of inventory tracking policies or bulk-updating cost prices based on specific triggers.
This guide explains the field descriptions for this action, the supported trigger, and how to test it end to end.
Field Descriptions
The Update inventory action allows you to define the following parameters for the target variant:
| Field | Description |
| Cost price | The SKU cost price you wish to update. You can click Add variables to select the cost price parameter. |
| SKU | The SKU code you wish to update. You can click Add variables to select the SKU code parameter. |
| Track inventory |
|
Supported Trigger
The Update inventory action is supported by the following trigger:
- [Product] Create inventory item
Testing the Workflow
To test whether the workflow successfully updates the inventory settings when a new item is created, follow these steps:
- In Flow Automation, set up a workflow using the Create inventory item trigger and the Update inventory action (e.g., set Track inventory to "Yes").
-
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 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 Update inventory action to automate stock settings and SKU identifiers.
Scenario: Automatically initialize inventory policy and SKU information when a new inventory item is created.
- Trigger: Create inventory item
-
Action: Update inventory
- Cost price & SKU: Map to [Cost price] (${trigger.variant.cost_price}).
-
SKU: Map to [SKU] (${trigger.variant.sku}).
Note: When configuring Cost price or SKU, you can click Add variables and select the corresponding parameters from the trigger to ensure data is synchronized accurately. - Inventory Tracking: Set Track inventory to Yes.
- Outcome: Every time a new product variant is added, the system automatically enables inventory tracking and synchronizes the cost price and SKU code. This ensures all new items are consistently configured for tracking and sales without manual intervention.