Online ordering -> receipts/order printing

Dear,
We are building an API link for our mutual client so that products can be sold online via the website.
We have a test environment, and some regular contact with account managers of Lightspeed. However, they could not answer the questions we still have. That's why we need your help.
Here is also some background / context.
Our client has 17 locations where your POS systems are already in use. At any given location there is often a cash register system in the store, one in the restaurant, one in the snack bar, etc.
We use Lightspeed Restaurant. So this API is relevant: https://developers.lightspeedhq.com/resto-api/introduction/gettingstarted/
So; for each location there will be an online endpoint that we communicate with (with the respective oauth client identifier). However, what is still unclear to us is how we indicate for which POS system (& receipt printer so it seems to me?) the order is.
This should of course end up in the right place so that the kitchen can start preparing (in this case) the sandwiches.
Looking at the ordering API we can't see anything that would take care of this? Are we misinterpreting the functionality? Could you help us out a little here?
Then a second question that we have asked the account manager(s) several times but have not received a clear answer to.
May we assume that:
- Each location has its own online database (we known this for a fact)
- All these locations have the same endpoint, but identification is handled through the clientid/consumer key. IE. the correct id will ensure the orders are routed to the right POSes (as mentioned in the documentation).
Many thanks in advance.
Kind regards,
SDB
Answers
Hi @sdbkwilia,
Thank you for contacting us.
I hope this helps.
Hi @LucienVersendaal ,
Thank you for your reply.
Could you please help us out with the following (copy/paste from the original question):
"So; for each location there will be an online endpoint that we communicate with (with the respective oauth client identifier). However, what is still unclear to us is how we indicate for which POS system (& receipt printer so it seems to me?) the order is.
This should of course end up in the right place so that the kitchen can start preparing (in this case) the sandwiches.
Looking at the ordering API we can't see anything that would take care of this? Are we misinterpreting the functionality? Could you help us out a little here?"
Essentially we want to know: how do we go from a given online order to 'this will be rolling out of a printer in the kitchen as an order for sandwhiches' for instance.
Thanks in advance.
Hi @sdbkwilia,
This is done by our FSS team, this is something that needs to be setup in the account. In a nutshell, they(FSS team) are creating printer templates, this templates are connected to the correct printers. After that the products or categories are connected to the correct printer template. So when creating an online order with different products e.g. coke and a burger. The coke is going to the bar printer and the burger is going to the kitchen.
I hope this helps.
Hi @LucienVersendaal ,
Thanks for your answer. This was the 'missing link' for us and has cleared up some confusion here.
It does however have some (possible) implications for our setup however.
To ensure the offered products and pricing is in line across all locations we intend to have a central Lightspeed environment where all products are set up. From there they will be copied to the specific locations.
Question 1) How will this work with printer templates. Can they be setup centrally and copied to different environments, or will they need to be created 'locally' on each location. I am guessing the latter, because as I understand it, a 'printer template' will also refer to a specific printer and as such probably can't be created centrally?
Question 2) How does this work (in general) w.r.t. products and categories. Let's say we have a coca cola for sale in both the cafetaria and the restaurant. Same product, same price. How will a printer template know where to send (that part of) the order?
Thanks again.
Hi @sdbkwilia,
Okay perfect.
Question 1) All printer templates are setup 'locally' per location, there is NO centralization for templates. Good to know is that our FSS team already set everything up(printing templates) in the account.
Question 2) The template is attached to a floor(e.g. snackbar) so when sending the cola from that floor(based on floorID), the attached printer template will print the cola to the snackbar printer.
I hope this helps.
Hi @LucienVersendaal ,
1) Ok that's good to hear. Although I'm not sure the printer templates are fully set up. As far as I know the definitive configuration (what to offer, on which location it gets offered, etc.) isn't known yet. And so the printer templates cannot be finished yet. Alas, we'll check.
2) This leaves some questions still. I understand the set up of a template and its connection to a floor. However.. when we send an (online) order, you don't provide a floor.
This is the API call we're looking at:
I suppose this could work via the tableID? So what would be the recommended set up for an online ordering system in this case? Do we 'hardcode' the tableID which is tied to a floorID and exert control over 'where the order goes' that way?
Thanks again.
Hi @sdbkwilia,
/core/floors
endpoint then you'll need to grab the unique ID of the table and use that ID in your payload when sending the online order.type
will berestaurant
and thetableId
is the unique ID that you found in the endpoint above.Hi @LucienVersendaal ,
Kind regards.
Hi @sdbkwilia,
Hi @LucienVersendaal ,
W.r.t. reusing the tableid/floorid: Ok that's good to hear, thanks.
We are currently going through setting up an order, and are running into the following.
When trying to create an order we provide an id for a table. In this case we're using a newly set up table of type 'Takeaway'. However when trying to create an order for this table, we are met with the following error:
{"description":"Illegal argument: Cannot create a Takeaway order on a takeaway table"}
Could you let us know what we're doing wrong here?
Thanks again.
@sdbkwilia,
Can you provide me your payload?
Hi @LucienVersendaal ,
Yes I can. Please find attached.
Text file contains:
@sdbkwilia,
Sorry I forgot to ask which account you're testing in? Do you have a companyID?
I see what is going wrond please check:
"type":"Takeaway"
Takeaway must be all small caps. This is also documented.
@LucienVersendaal ,
Where might I find the companyID?
@sdbkwilia,
You can find the companyID using the company endpoint.
But check my last post.
Hi @LucienVersendaal ,
Ok great - that helped (lowercase).
On to the next error.
{"description":"Illegal argument: Order payment paymentTypeId '4' does not exist"}
According to the documentation that default list is supported (incl. ID 4) but I understand the actual configuration may differ. So I looked at the set up and see a bunch of payment methods, but the web interface does not show ID's.
And the API doesn't list the paymenttypes as an endpoint you can get information from, only create a new one.
So.. the question becomes:
In our case I would like to add a payment type 'Online Payment' and add a PaymentType-Type 'Ingenico' (rather than Adyen, as we're not using Adyen).
Thanks a lot.
Hi @sdbkwilia,
Please do a little digging in our documentation, all this information you're looking for is in there.
About the error message is saying, the paymentTypeId doesn't exists, so you'll have to create one or use one of the available https://developers.lightspeedhq.com/resto-api/endpoints/onlineordering/#get-available-payment-types
You can create one here: https://developers.lightspeedhq.com/resto-api/endpoints/corepaymenttype/
I hope this helps.
Hi @LucienVersendaal ,
Thanks. I'll ignore the snarky comment.
So: I want to create a payment type, e.g. 'Online payment' using the core/paymenttype endpoint. I have to provide a 'type' there. For this I would like to use our own type, e.g. 'Ingenico'. So this would be a PaymentType-Type.
I can see the type-types in the web interface:
But I can't find their ID's, let alone info on how to create our own. I'm sure it's in the documentation but after a little digging, I can't find it.
Thanks again.
Hi @LucienVersendaal ,
Having retrieved the PaymentTypes I've now used some values from that list to enter a order in the system. This worked at last.
Some observations so far:
Thanks once more.
@sdbkwilia,
After you've created the paymentType you can choose external from the list.
This is how this payment looks in paymentType endpoint
Hi @LucienVersendaal ,
Could you take a look at this comment:
I think you might have missed it, as you answered another comment, but not that one yet.
Thanks.
@sdbkwilia
Sorry I must have missed that one.
/rest/financial/receipt?receiptId=82417066
/rest/onlineordering/customer/{{customerId}}/order/{{order_id}}
receiptId
in the response above(2) go in the dashboard to Reports -> Receipts and search for the receipt.Hi @LucienVersendaal ,
Thanks for answering. I'm not sure I understand the workings just yet.
I can't find this order in the Dashboard however. Also, it doesn't show up as a receipt. It's not listed in the customer I've created it for, e.g. here:
Also, it's not there when I go to Reports -> Receipts -> Create an export.
Couple of questions:
Thank you once again. I have a few more questions, I will post them in a separate post.
Hi @LucienVersendaal ,
As mentioned in my previous post, I also had another question. This is separate from the previous order questions.
There are two custom bits of text we would like to display on the receipt that gets printed (and probably attached to the bag that customers come and takeaway).
On the receipt definition, is there some way to include custom text? Perhaps we could include the contents of the 'Notes' or 'Description' fields somewhere? That way, when creating the order, we can simply provide this information in either of those fields, and it should be there when it's printed.
Looking forward to your thoughts on this. Thanks!
@sdbkwilia,
Answering on the first of two posts.
You can't find it in the resto manager because it's not finished, it is WAITING_FOR_PAYMENT
Only completed orders are visible.
Couple of questions:
@sdbkwilia ,
I've created a small example of how it looks like using "note". Unfortunately we can't change or remove:
API:
Kitchen:
Receipt:
I hope this helps.
Hi @LucienVersendaal ,
With regards to your first answer (https://community.lightspeedhq.com/en/discussion/comment/17359/#Comment_17359) - great, that answers my questions there. I'll create an order and submit an update that changes it to paid to check out the receipts.
With regards to the second answer (https://community.lightspeedhq.com/en/discussion/comment/17360/#Comment_17360) - Oh that looks good!
Looking at the orders JSON I would guess the '18:00' is the time component from the 'deliverydate' that is present on the order. Is that correct?
So presumably if I create that with e.g. 18:15 it will display 'OPHAALTIJD 18.15' ?
If so, that's great. Then we can probably just use the 'creationdate' for that part of the receipt. And then we'll only have to use 'note' for our custom order id for instance.
Could you confirm if this works as I presume?
Thanks once more, and have a good weekend.
@sdbkwilia
Looking at the orders JSON I would guess the '18:00' is the time component from the 'deliverydate' that is present on the order. Is that correct? Yes that is correct.
So presumably if I create that with e.g. 18:15 it will display 'OPHAALTIJD 18.15' ? Correct
It is easy to play around with it if you have an iPad, so you can see how these receipts look like. For that I recommend calling our support to help you with that.
Marked in red square is the creation date, you can't move this unfortunately.
I hope this helps.
Hi @LucienVersendaal ,
We are currently trying to figure out how the multiple environments will work.
For testing we have a set of credentials
It feels like we are missing something.. either different URLs for all locations, or different consumerkey/secret credential sets for all locations.
If not.. how does this work? Right now I don't think we're 'identifying' the location we want to communicate with via API in any way.
I would assume we would need a separate set of (OAuth) credentials for all of these?
Could you help us out a little here?
Thanks again in advance.
Kind regards