Reset Refunded Ticket

Hi Team,

In Reference to:

Refund Item Button

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:-

  1. Name:- Undo Refund
  2. Buttom Header:- Reset Refund

Mapping:-

  1. Enabled States:- GStatus=Refund
  2. Visible States:- Submitted
  3. Visibility:- Order Line

Actions:-

  1. Action Name:- Reset Refund
  2. Action Type:- Update Order
  3. Parameters - Price Tag:- [:Price Tag]
  4. Calculate Price: True

Rules:-

  1. Rule Name:- Undo Refund
  2. Event Name:- Automation Command Executed
  3. Custom Constraint- Matches:-
    a. Automation Command Name | Equals | Undo Refund
    b. {ORDER STATE:GState} | Equals| Refund
  4. Actions Selected:
    a. Update Order Gift State - No Input Leave Status Field Empty.
    b. Reset Refund - Price Tag = {PRICE}


Output Demo:-

Reset - Refund

Blockquote