Hi Team,
In Reference to:
Wanted to add an option to reset the refund process if made by mistake.
Since the refund button isn’t toggleable, a reset is needed.
I maybe totally wrong with a better way to do this, but this works for my use case.
LOGIC:
Refund button (in my case) does the following.
- Tag Order Item as “Refund” to GState (Gift State)
- Removed Inventory update -Logic makes no sense for a resturant to return food to stock to my use case-
- Set Item price to 0.00
Reset button logic:
- Remove Tag “Refund” from GState.
- Set Item Price to default menu item price.
- Inventory increase can be easily implemented
Steps to setup Reset Button:-
Automation Command:-
- Name:- Undo Refund
- Buttom Header:- Reset Refund
Mapping:-
- Enabled States:- GStatus=Refund
- Visible States:- Submitted
- Visibility:- Order Line
Actions:-
- Action Name:- Reset Refund
- Action Type:- Update Order
- Parameters - Price Tag:- [:Price Tag]
- Calculate Price: True
Rules:-
- Rule Name:- Undo Refund
- Event Name:- Automation Command Executed
- Custom Constraint- Matches:-
a. Automation Command Name | Equals | Undo Refund
b. {ORDER STATE:GState} | Equals| Refund - Actions Selected:
a. Update Order Gift State - No Input Leave Status Field Empty.
b. Reset Refund - Price Tag = {PRICE}
Output Demo:-
Blockquote