Flow Automation: Understanding and Managing Counters
Flow Counter is a specialized tool within Flow Automation designed for statistical tracking and data accumulation. It allows you to record and tally specific business events—such as units sold, action frequency, or custom performance metrics—as they happen. This data serves as an internal "database" for both automated reporting and advanced conditional logic.
This article explains what a counter is, how to set one up, how to use it as a workflow condition, and how to view, export, or delete your counters.
What Is a Counter?
A counter is a tool used by Flow Automation for statistical tracking and data accumulation. It acts like an internal "tally" that records numbers based on triggers you define, serving two primary roles:
- As a Data Source: It provides the raw numbers needed to generate automated reports, such as a "Weekly Sales Volume Report".
- As a Condition: It allows your workflow to make automated decisions based on total accumulated values (e.g., "If total sales for Product A exceed 100, automatically add a [Best Seller] tag).
Scenarios Where You Can Use a Counter
A counter can be used in a wide range of scenarios, depending on how your store operates. A few common examples:
- Counting product sales to identify best-sellers
- Counting order volume by country
- Counting the number of email subscribers
- Counting customers who have spent more than a set amount (for example, $1,000)
| Note: For the full list of ready-to-use counter templates, see the "Available Templates" section in "Flow Automation: Updating Counters via Action." |
Setting Up a Counter: The Data Collection Process
A counter must be initiated through a Flow workflow. This is the accumulation phase where your statistical data is gathered. We will use the workflow "Count the number of new email subscription customers every month" as a practical example:
- From your SHOPLINE admin panel, go to Apps > Flow Automation.
- In the My flow section, click Create customize flow.
- Choose Customer subscription and click Confirm.
- Click the + icon next to the Start when module and select Add condition. Then, choose the Update counter from the action list and click Confirm.
- Add conditions to filter specific behaviors:
- Select Subscription behavior and set it to at least one of Email subscriptions.
- Add a time constraint: Set Mailbox subscription time to Greater than 2025-06-01 00:00:00 AND Less than 2026-06-30 23:59:59.
- Select Subscription behavior and set it to at least one of Email subscriptions.
- Click the + icon next to the Check if module and select Add action, and choose Update Counter from the action list and click Confirm.
-
Enter a name that uniquely identifies the data being counted (e.g., New email subscriptions tracker). This helps you easily identify the data source later in your reports.
Note: To track specific categories automatically, click Add variable to include dynamic variables in the name. - Set the value to be added to the counter each time the trigger occurs. In this example, choose Add 1 to count each new subscriber.
- Click Start Workflow to enable the data collection process.
Using Counters as Workflow Conditions
You can use the real-time results of any counter to create branching logic in your workflows. For example, you can track customer growth and send a notification only after a specific threshold is met:
- Add a Condition module, select Special condition, and choose Use the counter value as a condition.
- Enter the Counter Name exactly as it was defined (e.g., New member milestone tracker).
- Set the operator to Greater than or equal to and input the value 100.
- Connect this condition to a Send email notification action.
| Note: The "Tag Customers When They Become Members" scenario mentioned above is used as a practical example. You can apply special conditions to any other automated flows based on your specific business requirements and logic needs. For more details, please refer to "Flow Automation: Updating Counters via Action." |
Viewing and Exporting Counter Results
You can monitor your accumulated data at any time:
- At the bottom of the Flow Automation page, find Counter and click Manage.
- On the Manage Counters page, you can view the current value and the last update time for every counter.
- To use this data offline, select the desired counters and click Export to download an Excel file.
-
To permanently remove a counter you no longer need, select it and click Delete.
Important: Deleting a counter permanently removes its accumulated value. If a workflow later updates a counter with the same name, it starts over from 0.
| Note: Once your counter has successfully collected the required data, you can automate a recurring report to be delivered directly to your email. Learn how to set up the report schedule in "Flow Automation: Scheduling and Automating Sales or Order Data Reports." |