How can I apply automatic discounts only through a custom button?

Hi guys,

I am creating an app consisting principally of a custom button for buying a product with a discount. I am exploring the Automatic Discounts functionality but I want to create an alternative flow for applying the discount only when users click my button and not when they use the typical “Add to cart” or “Buy it now” buttons. How can I handle this scenario?

Thanks!

Fabian