Can one backend workflow update two types of things?

I have a backend workflow that updates fee information when the subscription elapses. E.g payment A should be made monthly. At the end of the month, I have a backend workflow that changes the due date to the following month and that is working perfectly. The data type is fee and this workflow changes the data field ‘expiry date’.

But, I also need to update the status of clients (data type is client) who have paid from ‘paid’ to ‘unpaid’ when the month is over and a new month starts. It looks like it is not possible to use one API endpoint to change two types of things (in this case, fee and client) because I tried it and it did not work.

Does anyone have an idea about how to solve this kind of problem?

Thanks so much.

Yes. Just setup the parameters for the data types you want to update.

@BeeBayLearnDev111 What exactly did you try that did not work? @boston85719 advice is right on the money :smiley:

Thanks so much.

Initially, I did not create a parameter for the client but did that but for some reason, it changed the fees but not the client.

Here are screenshots, just in case you can spot what I am missing…

Steps 1 and 2 are working as shown in the first two screenshots above, but step 3 which asks for a change to the list of clients is not. I can’t seem to figure out why.

@BeeBayLearnDev111

Two comments:

  1. Action 3 is running on a list from step 1 while using fields from step 1. Circular logic does not work.
  2. On step 4 a perpetual loop is being created. Every time you run this flow it never stops.

Solution

  1. Avoid circular logic or structure the run of your list in a way that uses data where data is coming from some where.
  2. You need to create a start/end of the loop logic. Explore how recursive logic works.

Thanks so much for this.

I was actually trying to change the status of the clients who have to pay the fee referred to in steps 1 and 2 to owing, but based on this tip, I have changed it from Result of Step 1’s payers to just doing a search for clients whose fees include the one in step 1.

To refer to the billtopay auto and billtopay manual fields that refer to step 1, I am still trying to figure out how to rework them to avoid circular logic because that is the only way I can think of for now to get the bills removed from the clients paid bills.

Avoid the infinite loop. Bad for your app bad for the platform.

Ok. Will do that right away.

1 Like

It worked, cmarchan! Thank you so much.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.