Count
The Count action counts the number of items in a list and provides that value, such as the number of line items in an order.
On this page
Fields
The Count action contains the following fields.
Field | Description |
---|---|
List | Required. The list of what is counted by the Count action. |
Returned data
The Count action itself doesn't take any direct action in your store. Instead, it calculates data from your store and makes this data available for use in subsequent steps in your workflow.
When you add a Count action to a workflow, steps that follow this action have a Count variable available in the variable picker. To use the data extracted by your query in following conditions or actions, select Count in the Returned data section of the configuration panel. For custom created variables, use the Count
object.
Triggers
The Count action can be used in any workflow.
Example
In this example workflow, the Count action counts the number of orders placed by a customer in the last day. If the amount of orders is equal to or greater than three, then an internal email is sent.
Templates
Cancel inactive returns
Automatically cancel a return that has not been refunded or restocked within a certain period of time. View template
Cancel orders for frequent returners
Cancels orders from customers who have returned items five or more times in the last six months. It fetches order data, counts returns, and cancels the current order, issuing a refund and restocking items. This template can be used to: reduce losses from habitual returners, streamline order management by preemptively handling potential returns, and maintain profitability by discouraging excessive returns. View template
Cancel orders if customer placed more than 5 orders today
Cancels orders if a customer places more than five orders within a single day. It checks the number of orders placed by a customer in the last 24 hours and cancels any orders exceeding this limit, tagging the customer for potential fraud. View template
Email weekly summary of active discounts that use a code
Emails a summary of active discounts that use a code. The workflow runs on a schedule every monday at 9am. The workflow can be customized to change the timing, how you receive the summary, the type of discounts you want to include, and mode. View template
Hold fulfillment orders for customers with chargebacks
When an order is ready to fulfill, the workflow retrieves any orders from the same customer within the past 60 days that have a chargeback. If any such orders exist, it holds fulfillment on each shipment and send an internal email to notify your operations. View template
Hold fulfillments if a customer placed multiple orders in 24 hours
Check to see if a customer has placed multiple orders within a 24 hour period. If true, hold the fulfillments and consolidate shipping. View template
Hold orders if customer placed more than 1 order in last 24 hours
When an order is created, check if customer placed any other orders in the last 24 hours. If so, place all orders on hold. View template
Send a notification when Order volume is less than 10 in last hour
Sends an order heartbeat notification. Every hour, get up to 10 orders that were created, and count them. If less than 10, send a notification via Email. Uses the Schedule time, Get order data, and Count steps. View template
Send daily email summary with out of stock products
Every day, gets all the products that have 0 inventory and sends an email summary. Uses Get product data, Scheduled time trigger. View template
Send daily notification with all open Draft Orders
Every day, get open draft orders, count them, and send a Slack message. Uses the Scheduled time trigger, Get draft orders, and Count actions. View template
Send email summary of all orders to Online Store in the last day
Every day, gets orders for the last day, and sends an email summary with those that were placed on the online store. View template
Send email summary with all unfulfilled orders older than 2 days
Get a daily summary of all of your unfulfilled orders that are older than 2 days, making use of schedules, get order data, count, and sum. View template
Send weekly email summary with list of low stock variants
This workflows runs on a schedule (like once per week). It gets a list of product variants that are low stock, counts the results, and sends an email summary with the variant titles and a link to the Admin page for the variant. View template
Tag and send a daily summary of late fulfillments
Every day, tag and send a daily email summary that counts the total number and dollar value of all orders that miss a 2 day shipping guarantee. View template
Tag products that are created with no image
When a product is added to the store, the workflow will check if the product has an image (after a delay to wait for any initial edits). If the product does not have an image, the template will tag the product. View template
Use tags to segment customers based on their orders for last 6 months
When a new order is created, get the customer's order total and order count for the last 6 months, and then add tags to the customer. Makes use of Get order data, Count, Sum. View template