How about keeping your own DB of order ID, item ID, and times?
createdTime: The time that the object is created on Clovers database. clientCreatedTime: The time that the object is created on a Clover device, via Web, or via API call. This can differ from the createdTime if the object was created on an offline Clover device, and the Clover device is syncd at a later time to update the Clover database when the device is back online. In such a case the clientCreatedTime will be earlier than the createdTime. modifiedTime: The last time the object was modified.
We have tried to simulate this scenario and now have additional questions. We took our clover device offline by unplugging the network cable. We then entered a one item sale, saved it, reopened, added another item, saved again and then reopened a third time to add another item before closing out the ticket. Total of 3 items. After plugging the network cable back in and allowing it to sync we noticed the following, which was not what we expected.......
clientCreatedTime = orderCreatedTime and is the same on all 3 instances of the ticket. (1550182590398)
itemCreatedTime for item 1 is less than clientCreatedTime (1550182590377)
There is no modifiedTime found at any point.
Our App logs the data we get. Attached is a copy of the log.
We are not using the REST api. Our app runs on the Clover station and uses intents (ORDER_SAVED and PAYMENT_PROCESSED). We are getting the order immediately when it is entered at the POS. Is there a method we can use to insure the order has been synced without using REST ?
In that case, if you are pulling the Order data from Android SDK, it will reflect the local Order information to the Clover device, not the Clover database. So if you are pulling the Order data before it has been sync'd it will show the null modifiedTime.
There is currently no method you can use the insure the order data on the Clover device is the most up to date / synced with the database without using REST API, especially since you could be pulling the order data while the Clover device is offline.
If needed, here are the times in which order data is sync'd to the Clover device:
1. When the merchant opens up the order from the Orders app.
2. When the merchants hits the sync button at the top right corner of the Clover apps.
3. The Clover device receives the order update notification, and syncs the order.
4. The Clover device automatically sync's on its own once in a while as well.
2 People are following this question.