We are trying to figure out how the printer labels work - how can we assign items to appropriate printers based on the printer labels (assuming these labels are used by Clover PoS to direct orders to the right printer)
David,
Thanks for the response. We are looking to assign printers for online orders - as they are printing to all printers irrespective of the printer label.
Yes we are using this to Print job, by passing the order and all active printer object with it
PrintJob pj = new StaticOrderPrintJob.Builder().order(orderObject).build();
pj.print(context, account, printerObject);
and this to print job receipt
PrintJob pj = new StaticPaymentPrintJob.Builder().order(orderObject).build();
pj.print(context, account, printerObject);
StaticOrderPrintJob is just a dumb print job, it prints what you tell it, doesn't honor labels (or tags), etc. If you want to honor tags you would need to obtain the tags and adjust the line items accordingly, a bit more information on how to obtain the tags - https://community.clover.com/questions/21552/is-there-any-update-on-getting-labels-connected-to.html..
If your app just prints then you should look at our newer REST API for printing which should honor tags - https://docs.clover.com/reference/ordercreateprintevent.. This API may allow you to remove your native app altogether (assuming your app's only role is printing).
Hie @David Marginian We have a android native clover application for our system, we are using these StaticOrderPrintJob and StaticPaymentPrintJob request to print the orders, it is successfully printing the order details, but at merchant stores they are using the different printers for differently labelled items , so is there any way to print the orders specific to printers based on the printer labels.
Because if they are ordering and printing through the clover order app then the items are printed specific to printers based on the printer labels, but in our receipts all items are printed on all connected printers
Just to confirm with a native app, we cannot execute the specific items to print to specific printers?
That is not what I said. It can be done but you are going to have to write some code and test that code.
I am still not 100% clear on what you want to do, honor tags/labels or print to a specified printer? The PrintJob interface has a print method that takes a printer (I am sorry, I assumed you were aware of this API since you are using StaticOrderPrintJob):
/** * Send this PrintJob to the specified printer. */ public void print(Context context, Account account, Printer printer) {
So, you either need to allow your merchants to choose a printer where all online orders will print (via configuration) and then obtain and pass that printer in your app, or if you need to honor tags you need to retrieve the tag to printer map and do something similar (print only certain items to certain printers based on the tag/printer mapping).
@David, here is the problem statement:
we have items labled say wine, and meat and we have 2 order printers. so if item has lable wine then it is printed on the printer in the bar and if its meat then it is printed in the kitchen printer.
When we are creating order on the pos , and printing then it is printing correctly to respective printers but when we are creating online order from api and printing it then it is printing The Whole order on both the printers.
We want online orders to print on respective printers based on item label
Understood. I have previously provided you with all of the information you need to solve this problem. You need to use the APIs mentioned here - https://community.clover.com/questions/21552/is-there-any-update-on-getting-labels-connected-to.html.. First you will iterate the line items and obtain the tags per item (InventoryConnector#getTagsForItem). Then you would need to obtain the printers (PrinterConnector#getPrinters) and tags for each printer (InventoryConnector#getTagsForPrinter). Then you will make multiple calls to PrintJob passing the relevant lineitems and printer in each call.
@david thanks for the reply. I see what you mean , but i m curious to know why would print order behave differently for in store orders vs online orders? Isn’t there any flag in print job that would respect item tags
An in store order goes through our code and doesn't use StaticOrderPrintJob (which as I said is just a dumb print job). In this case an "online order" is being handled by your App and you are using StaticOrderPrintJob. There are some other APIs you can experiment with like OrderConnector.fire that may meet your needs but I don't have experience with them and you would have to experiment.
so if i understand it correctly -
REST Printer call prints the order to the default printer - we tested this using the above references you gave us. (Would it be possible to use REST calls to print based on label assignments?)
To print based on labels, use native app. The process is stated below
1) Identify which labels these items belong to
2) Call print function for those labels
3) In case of any items which do not have labels - print them to default printer
Please confirm
Not sure if this has been resolved but we have an app in the market called Smart Print which handles label printing amongst other features. Will be happy to lend assistance if needed. :)
To assign items to appropriate printers in Clover PoS website, set up printer labels under "Printer Groups" in the settings. Assign each item category to a specific printer group.
8 People are following this question.