question

softpoint avatar image
softpoint asked softpoint commented

How to know when employee presses SYNC on orders

When the employee signs into the clover device, can you tell us what event or message we can get that will inform us when the employee presses the SYNC button on the ORDERS page?

OrdersEmployees
6 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.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Can you give some more background on what you are actually trying to accomplish? Pressing the button won't have any effect if the device is offline. Syncs happen automatically and don't require a button press. Also the Orders sync button is no different from many other Sync buttons that appear in other applications.

0 Likes 0 ·
softpoint avatar image softpoint commented ·

Hi so when i press sync, i want to be able to call an external api at the same time so it can update the orders im sending to the clover? is this possible?

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Hmm I'm still not clear on what you are trying to do. Maybe you can try explaining it in the form of a use-case that would describe what the expected behavior is. Here is an example: Every time a new Order is created a specific item chosen by the merchant in my app is added to the Order.

0 Likes 0 ·
softpoint avatar image softpoint commented ·

here is the scenario currently i create an order on extrernal platform. i then call MANUALLY an api in order for orders to show in clover device.

i wish to call this api in the clover device at the point of when i press the sync button. is this possible?

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

Still not 100% clear, please use more words to describe in as much detail the exact scenario. It sound like you have your own web server that makes an REST API call to the Clover web server to create a Clover Order, then you are wondering when/how to get that order to show up on a Clover device?

0 Likes 0 ·
Show more comments

1 Answer

anthonypinto avatar image
anthonypinto answered

Given what you have described, I suspect that the best solution is actually going to be working with WebHooks.

I say this because focusing on reacting to an individual device synching is going to be more complicated and unreliable than making sure your data is already up to date on the platform. As long as your Order modifications are in place before a merchant synchs (manually, or automatically - which happens regularly), your update will be included in the synch.

By using WebHooks, you can have your jobs take place in response to specific trigger events in the merchant's data (e.g. new payment, order modification, etc), in most use-cases this means you can keep your changes up to date in near real-time instead of worrying about reacting to UI input.

You can learn more about WebHooks here: https://docs.clover.com/build/web-app...

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