question

joe-pop avatar image
joe-pop asked prakash commented

Does printTime in the print_event API work?

Setting the printTime param in the print_event call to a future time doesn't appear to be working. The orders are printing immediately. Is this param functioning?

USE CASE: For future orders we want to print the orders to the kitchen at [promise time - prep time].

Separately, is there a way to specify the promise time for an order? Or are all orders ASAP/immediate?

OrdersPrint
10 |2000

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

kpavuluri avatar image
kpavuluri answered David Marginian Deactivated edited

Hi @joe-pop,

Print Event print time will be calculated based on the associated order fulfillment time and cannot be set on the print request.

Correction - the APIs mentioned below are internal only right now.

If the order is ASAP order, it will be printing immediately as the printTime param will be updated by current time stamp.

If the order is scheduled order, printTime will be calculated by Clover endpoint according to the fulfillment time specified by the customer while placing the order. In this case promise time - prep time and any additional merchant print settings will be taken into consideration and accordingly printTime will be set to fire the order to kitchen at respective time.

So setting the printTime in the print_event call may not be helpful rather set the order with expected time of fulfillment and associate the order with print_event call will yield the result.

10 |2000

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

joe-pop avatar image
joe-pop answered

Thank you for the reply. Where do we specify the order fulfillment time? We are using the "Create custom orders" call.

10 |2000

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

kpavuluri avatar image
kpavuluri answered David Marginian Deactivated edited

Hi @Joe-pop, If you are using "Create custom orders" call you may not avail this feature of scheduled orders.

This scheduled order creation endpoints are internal only as of today and not available to 3rd parties.

Let me check with the core team and get back to you if any options available to create scheduled print events.

10 |2000

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

joe-pop avatar image
joe-pop answered

Thanks @kpavuluri. Scheduled/future orders is a very fundamental part of a restaurant online ordering system. It is surprising the functionality does not exist for all integrators. We want to avoid having to build workarounds or excluding future orders all-together.

10 |2000

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

prakash avatar image
prakash answered

@joe as of now the logic of when to print is on 3rd party app to decide when to call the print API, which some of the apps do and prefer to do that way.


But the idea of apps sending the time and clover printing it as per the input seems like a nice addition and improvement to the API that we would consider adding to the backlog for next year.

10 |2000

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

joe-pop avatar image
joe-pop answered prakash commented

Hi @prakash, If we hold the print_event API call until the order should release to the kitchen, and say that API call failed, then the restaurant would have no indication of the order and the customer would go to the restaurant expecting to pick up their order. This will create a negative user experience.


In the print_event API the "printTime" param is defined as, "Timestamp when the print event needs to fire to printer." So if we cannot set the printTime, then this param doesn't work?

2 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.

prakash avatar image prakash commented ·
@joe, api call failure anytime in the flow is going to cause problems future or asap.


1. If the merchant has not configured a printer or does not have a device at all. i.e the merchant has returned the device or deprovisioned or a new merchant that has not yet provisioned.. which can be a tiny set. To overcome this, it is better to do a test print at the time of the integration before the service goes online to customers.

2. Printing did not happen due to printer is out of paper, or printer door is open etc, those are outside of the control of this API.

Another possible cause is that the merchant deleted the order before it was attempted to print, which is a good failure. I can't think of any other case.

1 Like 1 ·
David Marginian avatar image David Marginian ♦♦ commented ·

Correct, the printTime does not work as advertised.

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