question

jraymer917 avatar image
jraymer917 asked ·

Is there an event when a discount is applied to an item/order?

We are writing an Clover App that will require the user to choose from the discounts in the native Clover discounts app OR a list of discounts that are NOT stored in the Clover system (long story). Is there a broadcast sent when they user clicks the discount link for an item OR the Add Order Discount link from the Register app? I want to capture when they click one of the links and ask if they want to add a Clover Discount or the outside discount.
DiscountsBroadcasts
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Raymond Lee avatar image
Raymond Lee answered ·
Unfortunately there is no event broadcasted when a discount is applied to a line item or an order, nor is there one when a merchant clicks on the "Add discount" button or the "Add order discount" button.

Regardless, if there was a broadcast event, receiving it just to display a pop up that covers up the existing pop up (the one that asks which Clover discount to apply) would be confusing to merchants, especially since they have to now either select an option or select cancel on both pop ups.

I assume merchants will already know whether they want to add a Clover discount or the outside discount. In that case I recommend leaving the "Add discount" and "Add order discount" buttons for when the merchant wants to add a Clover discount. For your outside discount, you can add a modify order button for your app, which will show up in the same section as merchant facing custom tenders. This button will launch an activity from your app of your choosing (using an intent filter), in this activity you can then ask the merchant to add an outside discount to the order. You can also label the button however you like using the android:label field, for example:
android:label="Add outside discount"

So the end flow for adding an outside discount is to complete building the order -> click pay -> click "Add outside discount" -> in your app, choose an outside discount -> outside discount added to order -> return back to the payment screen with the modified order.

Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community