Detecting defecting customers is a valuable step in optimizing a Shopify store's revenue.
If you can find and predict when a customer decides to buy from your competitor, you can try to preempt that and bring them back to your store.
Even capturing a small percentage of those customers can be profitable.
The difficultly is in detecting this behavior because for the most part, you're trying to detect the lack of behavior. A customer not buying again, a customer not clicking your emails, a customer not engaging with your social media, etc.
Detecting when behavior happens is much easier comparability.
One way to detect this lack of behavior is to use your Customer Purchase Latency as a trigger.
If your store has a latency of 90 days between the first and second orders, then an average customer should have ordered by the 90th day. If they haven't, they are defecting or already defected.
That's the perfect time to be targeting them with your marketing to try to bring them back to your store. This is commonly labeled a Win-Back campaign.
Though since we're talking about the average customer here, it's safer to start your marketing campaigns a bit earlier and run them a bit longer. Say add an extra 10-20% to the date so you start marketing from the 81st day to the 99th day.
In Repeat Customer Insights there are automatic segments that attempt to find defecting customer segments. It compares their behavior against the rest of your customer base to detect defection behavior.
You can combine those segments with the Customer Purchase Latency to fine-tune which customers to target and at what times.