Tech Articles‎ > ‎Point of Sale‎ > ‎

Creating Discount Buttons (Manual Discounts)

Summary

There are two types of discount buttons (manual discounts):
  1. Custom discount buttons
  2. Inline discount buttons

Custom Discount Buttons

  • Custom discount buttons are used for more complex discounts defined in the back office (see Discount Engine Types and Options)
  • To create a button that applies a custom discount, change button's Command to Discounting: Perform Custom Discount.
  • In the text area below Command, you will need to specify parameters.
The parameters are a comma-separated list of name:value pairs enclosed in curly brackets. For example:
{
Range: 'All',
CustomDiscountCode: '10% Off Seniors'
}
In the example above, the entire parameter block starts with an opening curly bracket ({) and ends with a closing curly bracket (}). There are two name:value pairs named Range and CustomDiscountCode which are separated by a comma. The names are joined to their corresponding values with a colon (Range'All'). The values are enclosed in single-quotes.
Listed below are the possible name:value pairs with the default value listed in bold type.
    • Range: Each (applies to all current line items), All (applies to all current and future line items), CurrentLineItem (only applies to current line item)
    • CustomDiscountId: The internal id of the Custom Discount to apply. The screenshot below shows how to find the internal id when you have the Custom Discount open for editing. This id will never change even if the Custom Discount's code changes.

    • CustomDiscountCode: The code is simply the name of the Custom Discount. This name can be changed which will break the button, so consider using the CustomDiscountId parameter detailed above.
    • PromptOnMissingDiscount: true or false. If this is true and the CustomDiscountId and CustomDiscountCode parameters are missing or invalid, the user will be prompted to select the discount to be used.
    • ApplySeparatelytrue or false. If this is true, adding the discount will remove other manual discounts.
    • ReferenceName: If a reference name is defined, all other manual discounts with the same reference name in the current Range will be removed.
    • Comment: Adds the defined comment to the discount.

Inline Discount Buttons

  • Inline discount buttons are generally used for quick and simple discounts. Although they have the potential to be used for more complex discounts, it is easier to use custom discounts and custom discount buttons for complex discounts, as shown above.
  • To create a button that applies a custom discount, change button's Command to Common: Perform Discount.
  • In the text area below Command, you will need to specify parameters.
  • The parameters are a comma-separated list of name:value pairs enclosed in curly brackets. For example:
    {
    CommandType: 'PercentOffSingle',
    Amount: '10'
    }
    In the example above, the entire parameter block starts with an opening curly bracket ({) and ends with a closing curly bracket (}). There are two name:value pairs named CommandType and Amount which are separated by a comma. The names are joined to their corresponding values with a colon (Amount'10'). The values are enclosed in single-quotes.
    Listed below are the possible name:value pairs with the default value listed in bold type.
    • CommandType:
      Commands ending in Single affect the current line item, commands ending in Each affect all current line items, and commands ending in All affect all current and future line items.
      • PercentOffSingle
      • PercentOffEach
      • PercentOffAll
      • DollarOffSingle
      • DollarOffAll
      • FixedTotal
      • RemoveDiscountSingle
      • RemoveDiscountEach
      • RemoveDiscountAll
    • Amount: The amount or percentage or fixed total of the discount, depending on the CommandType. If the Amount is not set, the user will be prompted for the amount.
    • AllowDiscountInRelatedItems: (Works only with DollarOffSingle and PercentOffSingle) true, false, or null; should the discount also be applied to related items? Always, never, depending on the related item setting.
    • Comment: Discount comment. If the comment is [UserInput] then the POS will prompt for a comment.
    • PriceSource: CurrentPrice, RegularPrice, SalePrice, PriceA, etc. Which price to use as the starting point before the discount.
    • DoubleDipping: Are other discounts allowed with this discount?
      • Forbid: Never allow other discounts
      • False: Allow other discounts only if their double-dipping is set to strong.
      • Regular: Allow other discounts if they are set to Regular.
      • Strong: Allow other discounts unless they are set to Forbid.
    • ReferenceName:  If a reference name is defined, all other manual discounts with the same reference name in the current Range (Single, Each, All) will be removed.
    • IgnoreNonDiscountableFlag: true or false, apply the discount to products defined as "POS non-discountable" in their product page?
Comments