Shopify Flow payment reminders

Topic summary

Goal: Automate payment reminder emails at multiple intervals and send them to custom B2B recipients stored in Company Location metafields, not just the main contact.

Issue: Using the “Payment schedule is due” trigger led to a failure in “Send order invoice” with error ‘order_id is required but empty.’ Screenshots of the workflow and error were provided.

Root cause: The trigger doesn’t expose an order directly. The action was pulling context from the metafield owner (a location), not an order—possibly a bug.

Fixes/Guidance:

  • Reference the order via paymentSchedule.paymentTerms.order.id (add as a variable).
  • You cannot force “Send order invoice” to use a different ID; it auto-assigns from context. Adjust preceding steps instead.
  • Remove the For Each loop. Fetch each recipient using “metafield (requires arguments)” for specific keys (e.g., email1, email2, email3).
  • Recipient Liquid path shared by OP appears correct (e.g., …purchasingEntity.PurchasingCompany.location.invoiceRecipient1.value).
  • Note: A condition checking if a metafield key exists doesn’t select that value for subsequent actions.

Status: User acknowledged the guidance; approach appears workable. No explicit final confirmation, discussion likely near resolution.

Summarized with AI on December 14. AI used: gpt-5.

You don’t have an “order” available from the trigger. The action is actually using the order attached to the metafield owner, which might be a bug, because I don’t think that owner is actually an order in this case but a location.

Probably the path to the order is payment schedule / paymentTerms / order / id (click “Add a variable” to insert it).

I think your logic has issues as well but hopefully that helps you test a bit.

1 Like