A sales order detail type promotion allows you to offer a discount on purchases during checkout (e.g. buy 2 for the price of 1, or get additional 10% discount if a coupon is presented). Customers will see the discount applied during checkout.
The promotion rule can also use XSL transform. The expected output should return the discount amount (a negative value) to apply, otherwise zero if no discount is to be given. The Storefront comes with several pre-defined rules that you can simply modify the values without needing to know XSL. To learn more about XSL, please see the XSL Transform section.