Order Discount API reference
The Order Discount API enables you to create a new type of discount that is applied to all merchandise in the cart. The API includes two key objects:
FunctionResultAnchor link to section titled "FunctionResult"
The following function result includes one discount of 10% off the order subtotal amount: