How do I set the workflow execution order?

Hello!

I have the following workflow.

I want the API actions calling Affinda to run only if the value in the FIRST NAME input is different from what’s stored in the database. To achieve this, I placed the “Make changes to profile” action (where FIRST NAME is saved) at the very end of the workflow. However, for some reason, when I change the value in the input and click Save, it’s saved to the database before the Affinda action starts running. How can I enforce a strict action order so that “Make changes to profile” truly executes at the very end of the workflow?

What you’re describing only makes sense if you’re working with an asynchronous API. If an action is reliant on information from an API call in the same workflow, that action wouldn’t be executed before a response has been received from the API.

Noticed that you don’t have a conditional expression on the “Make changes to Profile” action or any other subsequent actions, which leads me to believe that you’re not receiving data from the API, is that correct? If so, that would indicate that the API is indeed set up as async, or at least that you’re not receiving a response from the API call that you can use to verify whether the data in Bubble matches the data in the API’s database (Affinda).

If you only want to run the API calls and the “Make changes to” action if the first name input and first name field in Profile don’t match, I would expect to see a conditional expression applied to each of those actions to the effect of “Only when Input firstname’s value is not This Profile’s firstname”.

Take a moment to read this: