This method allows for a Discount Percent to be applied to Any Item, based on user input of a Percentage. It uses [?Request Input]
notation to prompt the user to enter a percentage amount, then applies the Discount using a Tag Order
Action.
Operational Flow:
Order Tag - Custom Discount Percent:
Automation Command - Discount Item Custom Percent:
Actions - Tag Order & UnTag Order:
Action - Execute Automation Command:
All Rules Require Default Mapping
All Rules Require Default Mapping
All Rules Require Default Mapping
Rule1 - Discount Update:
Actions:
ExecAutomationCmd (1)
CMDname: Discount Item Custom Percent NOT Zero
CMDvalue: [?Enter Discount Percentage (0=remove)]
ExecAutomationCmd (2)
CMDname: Discount Item Custom Percent Zero
CMDvalue: [?Enter Discount Percentage (0=remove)]
The notation [?prompt for input]
requires the leading Question Mark!
The text in CMDname
is important, because we need to match it exactly in the next 2 Rules, in their respective Constraint lists.
Also, the text in CMDvalue
should be the same for both Actions - this will prevent being prompted twice.
Rule2 - Discount Item NOT zero: (apply Order Tag Discount)
TagNote: [=F([:CommandValue])]%
TagPrice: [=-1*(Order.Model.GetVisiblePrice()*[:CommandValue]/100)]
Rule3 - Discount Item zero: (remove Order Tag Discount)