I have a scenrio which is triggered by a Woocommerce WatchOrders module. It does multiple things - updates a Google sheet when an order is received, sends an email to the buyer and then creates a Zoho Invoice.
I want to ensure that the invoice is created only if the transaction is really made.
The problem here is orders with the status “Pending Payments”. If the customer has cancelled the transaction, these might be converted to Failed. In which case, the invoice should not be created.
Or they might convert to “Processing” if there was a delay at the payment gateway’s end, but the transaction has in fact, gone through. In this case, the invoice is created.
One way could be to add a delay before the invoice creation stage. Then, check if the transaction ID exists. If it does, create the invoice.
The problem is, it could take up to an hour for the correct transaction status to be updated, but my scenario is set to a 10 min frequency.
Any ideas how I could go about this?
This is the screenshot of my scenario.