New topic Closed topic
avatar image
1
Remove objects of unfinished transaction
By Created , last editted

Hi,

I am creating a "place order” flow in the front-end. The user needs to fill in a form with some details and ideally I would create the Order and related Orderlines after form submit when all the details are present.

However in this case the user needs the provide some details for each specific orderline. Before submitting the form for order placement these details are checked using a webservice and after that user is redirected to that same page, but now it shows the result per orderline received from the webservice calls. After that the user is able to submit the form for order placement.

To be able to do this I created the order and orderline objects beforehand. The user can enter the information for each orderline. After submit the webservice iterates over each orderline and updates the status of the specific orderline. When a user specifically cancels the order, the objects for order and orderlines are deleted. So far so good.

But wat would be the best practice when a user just goes to another page or closes the browser? In that case no delete event is triggered and the unfinished order and orderlins still exist. How do I ensure that no unfinished orders exists in the back office? 

My best guess now is to schedule an action that deletes all unfinished orders older than one day. 

Question: is there a better way to do this?


Thanks!




Hi,

I am creating a "place order” flow in the front-end. The user needs to fill in a form with some details and ideally I would create the Order and related Orderlines after form submit when all the details are present.

However in this case the user needs the provide some details for each specific orderline. Before submitting the form for order placement these details are checked using a webservice and after that user is redirected to that same page, but now it shows the result per orderline received from the webservice calls. After that the user is able to submit the form for order placement.

To be able to do this I created the order and orderline objects beforehand. The user can enter the information for each orderline. After submit the webservice iterates over each orderline and updates the status of the specific orderline. When a user specifically cancels the order, the objects for order and orderlines are deleted. So far so good.

But wat would be the best practice when a user just goes to another page or closes the browser? In that case no delete event is triggered and the unfinished order and orderlins still exist. How do I ensure that no unfinished orders exists in the back office? 

My best guess now is to schedule an action that deletes all unfinished orders older than one day. 

Question: is there a better way to do this?


Thanks!



Answers
Sort by:

This topic is closed.