Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi! I have created a flow that emails me when there is a failed payment attempt on an order... it works fine, but what I'm looking for is multiple declines on the same order.
For example, a person may innocently input the wrong zip code or CVV and get a decline error once or even twice, but then enter the info correctly and successfully place their order. I'm not really worried about those scenarios. I want to be notified if there are more than THREE payment attempts ("declined" error code or "failed" transaction status).
As mentioned, I have a flow in place to let me know of one failed payment attempt. Does anyone know if Shopify Flow is able to "count" the number of payment attempts on a given order and only trigger the action if the condition has happened a certain number of times?
Thanks for any ideas!
What trigger are you using currently for the single failed payment flow?
Hi Kalen! I have tried it two ways:
Both of these successfully trigger an internal email, but I'm not sure how to tell Flow to only trigger if it happens three times on the same order.
I'm not too familiar with how the transaction events come through. Are you seeing the workflow trigger 3 times using Order transaction created?
If so, you could store them in a metafield or tag each time they happen. And then check the metafield before sending that internal email.
You might also be able to use something like:
Yes, I do get multiple email notifications for repeat events on the same order for the card decline, but the transaction status failure flow only triggers once.
I'll try the flow you suggested, but not sure on some of the steps. Here's what I have:
Is this right? Seems a little convoluted?
Yeah, I think if the trigger works then it will be the easiest for you.
If you go with "Get data" then I would use Run code instead of the condition and count above. It gives you a lot more flexibility and you won't have to write logic twice. Usually, I prefer to return the full string for the email body plus a boolean to use in a condition (something like "hasThirdDecline")
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024