When creating a segment in Shopify using the total number of orders placed (orders_placed(count: *)) as a condition, canceled orders will not be excluded. Here is an example of a Flow configuration that assigns the correct total number of orders, excluding canceled orders, as a customer tag.
Example of setting to assign the correct total number of orders minus the cancelled orders as a customer tag

[Setup Method 1] Create a Flow that assigns the total number of orders as a customer tag when creating an order.

[Setup Method 2] Create a Flow that assigns a cancellation log and total order count as a customer tag when an order is canceled.

![[Dawn] Example of setting to tag a customer with the correct total number of orders minus the number of canceled orders in Shopify](http://store-dojo.com/cdn/shop/files/2024-09-29.png?v=1764455636&width=1445)