question

spiceappmatt avatar image
spiceappmatt asked spiceappmatt commented

createdTime vs clientCreatedTime?

I am trying to filter out orders that came in before the current day, so I'm wondering what the difference is between the createdTime and clientCreatedTime properties of an order. I already filter by modifiedTime to get the most recently modified orders for display, and still end up with 30-day-old orders when some trivial update to the order happens.

I know when saving/completing one order, the next order is created. At least, the 'CREATE' webhook fires for the next order number in line to be used. Does one of these fields correspond to that creation time, while the other corresponds to when it is actually first interacted with by the merchant? I would like to make sure that I am not missing an order that was programmatically created by the system the night before, but is the first order in line for the day's business.

OrdersREST API
10 |2000

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

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered spiceappmatt commented

clientCreatedTime is the time the order was created on the client, createdTime is the time the order was created on the server. Generally, these two will be the same/very close, but Clover devices support offline orders. So, an order could be created on a Clover device that is offline and not actually sync to the server for hours/days. In this case the clientCreatedTime will be the time the order was created on the device and the createdTime will be the time the order synced to the server.

1 comment
10 |2000

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

spiceappmatt avatar image spiceappmatt commented ·
Thanks, sounds like client time is the one I want to watch. Also, just watched another order come in and compared those timestamps to the time of the 'create' webhook for the order number. The timestamps definitely do not correspond to the time the webhook comes through, they are generated on the merchant's first interaction with the order.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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