Add Wi-fi Password to Printed ticket based on certain condition


I run a cafe and provide free internet wi-fi access to my customers. However - I would want to do that only if they bill above a certain value say 100 rupees (Indian currency).

Is there a way with which I can:
a) Print the wi-fi router password on the customers bill/ticket copy
b) And - also can i limit this printing only to conditions when the customers bill value is above Rupees 100…

Kindly help me with this.

Thanks, Ashwin

Yes you can do both. You would clone your ticket printer template and add the tag that holds the password wherever you want it to appear on the ticket. Create a new print job that calls that new template.

Clone your rule that controls the print bill add a constraint so that it only fires if {BALANCE} Greater 100

In your original print bill rule add constraint {BALANCE} Less 100

1 Like

Thanks Kendash - but would require a little more detailed help in terms of -

a) What exact tag do i add - to include the wi-fi password - say my password is ‘Milano’
b) How do i clone the ticket printer template and clone the Rule
c) Where in the template do i add the constraint for: {Balance}. Can it be put anywhere in the template?

Request your help since im pretty new to this.

Thanks and Regards, Ashwin

A. OK I assumed you already had it setup to store the Wi-Fi password.
B. Right click the template and choose clone same as for rule.
C. Below are some tutorials for you to read to get you started. (The constraint I referred to is Custom Constraint within the Rule)

1 Like

Yes, you can.

First, you may want to take a look at the following…

Based on that Tutorial, in your Ticket Template, you would place this Tag: {SETTING:WiFiPW}.

If that’s a little bit more complex than you need, you can still just Store the Password in SambaPOS without actually changing the Router Password. You could also hard-code the Password in one of the Templates, instead of using Program Setting {SETTING:WiFiPW}.

Printing based on a Constraint would require further Rules. You could go about it this way:

  • Clone your Ticket Template: name them appropriately, i.e. Print Bill with WiFi and Print Bill without WiFi. In 1 put in the Tag {SETTING:WiFiPW}, and in the other, remove the Tag {SETTING:WiFiPW}.
  • Clone your Print Bill Print Job: name them appropriately, i.e. Print Bill with WiFi and Print Bill without WiFi. Edit the Print Jobs to use the appropriate Template.
  • Clone your Execute Print Bill Action: name them appropriately, i.e. Execute Print Bill with WiFi and Execute Print Bill without WiFi. Adjust the Print Jobs in the Actions to use the correct Print Job.
  • Clone the Rule which contains the Print Bill Action: name them appropriately, i.e. Print Bill with WiFi and Print Bill without WiFi. Assign the proper Print Job Action to each of the Rules.
  • Add a Constraint to each of the Rules which are opposite from one another: in 1 Rule add Constraint for [=TN('{TICKET TOTAL}')] Greater 99 and in the other add Constraint for [=TN('{TICKET TOTAL}')] Less 100.

Maybe I’ll append the above setup with screenshots to the WiFi Tutorial later today…


Just 1 Question, @emre, @Jesse: by default, which Event fires the Print Bill Action?

I removed it in my setup a long time ago since I only Print manually via Automation Command, and I don’t remember where it was originally.

It is an automation command by default.

Which one? Close Ticket?

Its not set to perform automatically its just a button.

Hmm… maybe it was changed for initial install at some time, but I seem to remember being annoyed that it would print a Bill automatically at some point… maybe Payment Processed?

Where does Ticket State change to Bill Requested?

Nope I develop on stock database and this is the only rule that contains Print Bill.


Ok thanks for that, I’ll base the Tutorial on that.


I moved a post to a new topic: Automating Database Switches - Development vs Production

@smartfella, here you go - I appended the Printing setup as the 2nd post on the WiFi Router Tutorial. Click the Right-Arrow on the quote below to take you there…


Thanks a ton friends. Will try it out and revert back. :smile: