How to reset data input from database once test case is completed so the same input can be used again?

I have a desktop app that I am automating with Katalon Studio using the recorder. Upon successful submission of the module the scenario returns a successful msg if it meets the happy path. Otherwise, error msg is displayed to the user. Once test case gets processed completely, it updates the record in the database for the data input that was entered.

I would like to know is it possible at the end of the script that I can somehow reset the data in the database for the input that was being used in the test case so that I can run the test case with the same input over and over again?

Right now, I have to manually go into the database and reset the record for the input so that test can show the happy path with the same input.

I am trying to figure out if there’s a better way to handle this scenario with Katalon.

How about “deleting” the record when you “start” your test case, regardless if your previous test got happy path or not–you should just get a message either “0 items deleted” or “1 items deleted”. Either way, it will not be there when it comes time to “save” your record.