question

tharin avatar image
tharin asked Jeffrey Blattman answered

There is a way to get orders "Saved" flag from API called?

How to find out orders that merchants already hit "Save" button on Clover devices from API called. I read Clover Doc but I didn't find it.

10 |2000

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

Miguel avatar image
Miguel Deactivated answered tharin commented

You can listen for the com.clover.intent.action.ORDER_SAVED broadcast, which is fired when the merchant hits the save button.

You can read more about our broadcasts here: https://docs.clover.com/build/intents...

11 comments
10 |2000

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

tharin avatar image tharin commented ·

Thanks for your answer. Sorry for my explanation not clear. We built web application and uses GET /v3/merchants/{mId}/orders endpoint to fetch orders. So we want to know where the "saved" flag from api called.

0 Likes 0 ·
Miguel avatar image Miguel commented ·

You can use webhooks to listen for changes to orders, but there's not a way be notified when a merchants specifically hits the "save" button on an order - outside of the Android SDK which I referenced.

If an order is saved but not paid, its properties should show up as "state":"open" However, having simply this property does not necessarily mean the "save" button was used to create it.

0 Likes 0 ·
tharin avatar image tharin commented ·

Is it possible to add orders "saved" flag to Clover REST api? Or add message to webhook what happen to orders e.g. "saved" We built a good app and got very good feedbacks from our merchants. If we can get "saved" flag or something that can tell us when merchants has hit on save button to web application. This will satisfy merchants so much and generate more revenue to both Clover and us.

0 Likes 0 ·
Miguel avatar image Miguel commented ·

I'm not 100% clear on your use case so I can't really suggest alternatives to listening for saved orders. As I mentioned, a saved order indicates an order with state set as "open." If you need to know specifically if the merchant hits the button on the device, you can build an android app that only listens to that broadcasts and then notifies your web app.

0 Likes 0 ·
corey avatar image corey commented ·

Hi Miguel, Tharin needs an event flag for the web api. From what I've read he need he has a web app and he needs to know when end users save an order on the Clover Station. This can be done in android but cannot be done in the web app. To get around this Tharin would need a saved flag.

For Example:

{ “saved” : true, "id": "7W2BBB0AH5C6P", "lineItems": { … } },

0 Likes 0 ·
Miguel avatar image Miguel commented ·

Tharin, do you care / want to be notified for these cases:

  • When a merchant creates an order, exits registers before paying, thereby saving that order without explicitly hitting the "save" button?
  • Saved order is created through the REST API?
  • Saved order is created by another Android app?

The Android broadcast does not fire in these cases.

0 Likes 0 ·
tharin avatar image tharin commented ·

When a merchant creates an order, exits registers before paying, thereby saving that order without explicitly hitting the "save" button? No.

Saved order is created through the REST API? Yes.

Saved order is created by another Android app? Yes.

0 Likes 0 ·
tharin avatar image tharin commented ·

Use case: My App displays orders on a seperate screen. Currently the app is able to show orders that are open or paid. The merchant would like to only show orders when he hit the save button in the register app. For me to create a setting to toggle this option on and off I will need a way to determine which orders have been saved. In essence I would be using the save button to fire the order to the screen.

0 Likes 0 ·
Miguel avatar image Miguel commented ·

Ok, I noted your feature request.

To find saved orders created with our REST API, you can listen to webhooks for orders and identify these orders by verifying having "state":"open" and device id property is null. The only way to currently listen the ORDER_SAVED broadcast is to have an Android app that listens to it and notifies your web app. Also, there's currently not a way to distinguish between #1 and #3, both will show up as "state" : "open" along with the corresponding device ID.

0 Likes 0 ·
tharin avatar image tharin commented ·

Thanks. How long do you think it will take to get this implemented?

0 Likes 0 ·
Miguel avatar image Miguel commented ·

To be clear, there's no commitment to implement such a feature, so I cannot give you an ETA. We use feedback, severity, frequency of requests, among other considerations to drive prioritization for feature requests. However, I have noted your request.

0 Likes 0 ·
Corey avatar image
Corey answered
@Miguel @Miguel Any word on this?
10 |2000

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

Corey avatar image
Corey answered
10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered
Orders are always saved immediately after any mutation occurs. All the "save" button in the app does is open a new order in the Register app. Please read https://community.clover.com/page/asking-questions and specifically see bullet (4). Without knowing what you are trying to do with the "saved" information it's hard to comment on a better solution.
10 |2000

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