Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Workflow for payment reminders without due dates

Workflow for payment reminders without due dates

Lukas2019
Shopify Partner
9 0 0

Hello everyone,

I would like to implement a workflow and am encountering problems.

The aim of the workflow is to automate the payment reminder process. I have already found a flow in the flow library that implements something like this. Unfortunately, the problem here is that I still have to manually add a due date to the order:

Bildschirmfoto 2024-02-22 um 09.12.49.png



I have therefore tried two approaches without success:

1. i have tried using the trigger "order created" to execute an action that sets a due date. Unfortunately, I have not found an action that does this.

2. i tried to execute the action "send Payment reminder" with the trigger "order created" and a waiting time and encountered this problem:

Bildschirmfoto 2024-02-22 um 09.08.32.png


Is there a way for one of my solutions? Of course I would also accept another way.

Thank you

Replies 7 (7)

PaulMartin
Shopify Partner
612 59 144

There's this one, although I have no idea if it will work. It's not in Shopify Workflow, it's adding an input in your cart page. Give it a read:
Set custom issue, delivery and due dates - Sufio for Shopify

Something like this in order to add a default due date:

<input type="hidden" name="attributes[Invoice Due Date]" id="invoice-due-date" value="2020-11-13" />

Definitely read the article I attached above.


contact@paulmartinlopez.com
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ

DaveMcV
Shopify Staff
104 31 29

Hi Lukas2019,

 

You may be able to handle this use case using the `order.paymentTerms.paymentSchedules` list (show below) and iterating through the payment schedules to test if it should have a reminder send and then send the reminder.

 

DaveMcV_1-1708624547808.png

 

Hope that helps!

DaveMcV | Flow Development Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Lukas2019
Shopify Partner
9 0 0

Hello Dave,

thanks for the answer.

Bildschirmfoto 2024-02-23 um 12.47.15.png

Please enlighten me so that I understand this correctly.
The workflow is started by a new order. Then I wait 7 days. The payment schedules are read out by the for_each.

In the next step I check if it is a specific payment method, if the order is fully paid and if there is an overdue.


If I understand it correctly, all orders would run through this workflow up to this query and my query would then only give a payment reminder to the orders that I have filtered through the query.

Is that correct?

Thank you

Lukas2019
Shopify Partner
9 0 0

Unfortunately, this does not work either, because every order fails at the second step: `order.paymentTerms.paymentSchedules`.

No items are found. What am I doing wrong here?

paul_n
Shopify Staff
1431 157 332

Payment terms is used to make payment schedules, which is a feature of the B2B product. Do you use that?  Or do you use some other system?

 

Reading through the above thread, it seems like your are trying to reproduce the B2B payment terms feature through Flow. In order for "Send Payment Reminder" to work, it needs a Payment Schedule. So you need to first create that payment schedule for an order. 

 

I believe the way to create a schedule is to call this the create API for https://shopify.dev/docs/api/admin-graphql/2023-07/objects/PaymentTerms. You would need to use Send HTTP Request to call this particular API. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Grafik_Formend
Shopify Partner
1 0 0

Hi Lukas, We currently have the same problem. Have you found a solution yet? 

Lukas2019
Shopify Partner
9 0 0

Unfortunately, I failed with the HTTP request and we have now set up an internal process for someone to manually enter the payment terms