Setting an ETA for Take Out orders

This tutorial goes along with my Order Queue Tutorial found here:

https://forum.sambapos.com/t/simple-custom-order-queue-entity-screen-ticket-lister

What this does is gives you a prompt to enter number of minutes it will take to cook the order so the TakeOut customer can get an accurate wait time. It prints the ETA date on ticket and on the order queue screen.

Step 1:

Insert this expression in the printer template portion of the ticket lister where it says ETA.

{CALL:Time.eta('{SETTING:{TICKET NO}}','{DATE:hh:mm}')}

Step 2:

Create an Execute Automation Command action as follows:

Create an Update Program Setting action as follows:

Step 3:

Place your ETA Ask action in a Ticket Created rule no constraints required.

Step 4:

Create an Automation Command Executed rule as follows:


NOTE: I have a constraint that prevents it from firing if a table is assigned but you can customize that how you like.

Expression for the Set ETA For Order action:

[=FD(ADS('{TICKET TIME}',TN('[?Cook Time(min);;;NOC]')*60),'hh:mm')]

Step 5:

Add the following script to the Time Limit script I showed in the Order Queue tutorial:

function eta(e,t){
	
  var time = t;
  var eta = e;
	
  if (time>eta){
	
  return tag.Color('red',eta);
	
}
	
  return eta;
	
}

3 Likes

You can customize this flow however you like and I encourage you to play with it. The way I set it up was to only prompt for Take Out orders and not to prompt if it is a Table Order.

You could even create automation to delete the program setting once ticket is paid… I have not done this yet but plan to.

On the list to do next is some scripting to make the ETA time turn red if it is past due.

Tutorial Updated so ETA time turns red if it is passed due.