Hi everyone. I’m new to using backend workflows, and have heard that it’s best practice to use them for most cases that don’t require immediate user interaction.
I’m creating a marketplace platform. On the cart page the user presses checkout, which will begin a frontend workflow which will schedule the creation of an “Order Transaction” data type in the backend. This data type is meant to show information about the transaction for future error handling/debugging. The next action is to collect the payment from Stripe. This is all fine and works as intended, but following this is where I run into difficulties. I’d like to update the “Order Transaction” data type depending on whether the charge was successful. This would be easy if the data type were created in the front end as I could just use “make changes to…”; though, this isn’t accessible because it was created in the backend. Here is a photo of my current workflow (step 4 is where I’m facing difficulties).
I’ve moved the “charge the current user” action to the backend so that I wouldn’t need this back and forth but it doesn’t activate. I suppose it is necessary to have it client-side.
So to sum up my question, how do you dynamically change data types from the frontend to the backend? And if it requires pulling information to and from the backend over and over, would it not just be simpler to just have the frontend handle all of this creating and updating? It would be the frontend scheduling the workflows anyway.
Thank you!
system
Closed
2
This topic was automatically closed after 70 days. New replies are no longer allowed.