Shopify Flow: Send Order Invoice When Order Placed with Payment Method Cash on Delivery (COD)

I’m trying to create a flow that will send a customer an order invoice (with payment link) when an order is created that has the payment method of “Cash on Delivery (COD)” selected.

My flow for this is currently not working. I’m getting the error that the "Payment Gateway Names Item =

"

I’ve tried adding a 1 minute time delay after order is created. I’ve also tried using the Order Risk Analyzed option instead of Order Created. None of these changes have worked.

Shopify support helped me identify that my Cash on Delivery (COD) is a Manual Payment method, and therefore renders a “Payment Gateway Names Item = ” result. With this in mind, and knowing I have no other manual payment methods, just Shopify payments, I attempted creating a flow where the condition criteria was “when empty” or rather does not exist. However, it still didn’t work.

Any ideas?

I would try logging out that value and see what it’s set to.

SOLVED! Props to Shopify support who did an investigation on this one and discovered the problem! Here is their super helpful response:

Hello Jonathan,

This is from the Shopify Technical Support team, reaching out regarding the issue with the “Automatically Email Invoice for Cash on Delivery (COD) Orders Only” flow encountering an error about "Payment Gateway Names Item = ". We understand the importance of knowing the details surrounding this event. We are here to assist you with this matter.

We investigated the issue, and after reviewing the flow, we found possible reason for the error. We noticed that you are using the condition order / payment terms / order / payment gateway names which is looking for an optional gateway used for payment terms, as opposed to order / payment gateway names which is the gateway used during the order.

For this, we suggest trying adjusting the flow and use order / payment gateway names instead of order/ payment terms / order / payment gateway names to see if this helps!