KuikCodeDocs
Smart rules

Route one code to many destinations

Send a scan to a different page depending on time, date, day, country, language, operating system, distance or how often the code has been scanned.

Smart Rules is a destination type. Instead of one link, the code carries a list of rules that are checked top to bottom on every scan; the first rule whose conditions match decides where the visitor lands, and a fallback URL catches everything else. The printed code never changes while you edit the rules.

Smart Rules are included from the PRO plan.

Set it up

  1. In the KuikCode editor, choose Smart Rules as the destination.
  2. Fill in Fallback, Default URL. Visitors are sent here when no rule matches. A code cannot be saved without it.
  3. Click Add new rule. Give it a name (the pencil icon), add one or more conditions, and set Redirect to to the URL for that audience.
  4. Repeat for every audience. Drag order matters: the first matching rule wins.

Conditions

ConditionOperatorsValues
Timebefore, after, betweenA time of day, in the scanner's own time zone
Datebefore, after, onA calendar date
DayisAny set of weekdays
CountryisOne country
Device languageisThe language the phone is set to
Device OSisiOS, Android, Windows, macOS, Linux, Other
LocationisA point on the map plus a range in metres
Total user scansgreater than, less than, equal toHow many times this code has been scanned so far
Unique user scansgreater than, less than, equal toHow many different devices have scanned it

Conditions inside a rule are chained with And / Or, read left to right in the order you add them. A and B or C therefore means (A and B) or C.

Local time, not server time

Time, date and day conditions use the time zone of the place the scan happens, so "after 17:00" means the scanner's evening wherever they are.

How a scan is resolved

The scan handler receives the country, region, coordinates and time zone of the connection, the phone's language from the browser's language header, and the operating system from the user agent. Location conditions measure the straight-line distance from those coordinates to your point; if the network gives no coordinates, the condition is false. Scan counters are read live, so "Total user scans greater than 100" flips over exactly when the 101st scan arrives.

Rules whose URL is empty are skipped. Whatever decided the scan is stored with it: analytics show the rule name next to the destination that was served, and fallback when nothing matched.

Examples

  • Opening hours: rule "Open" with Time between 09:00 and 18:00 and Day is Mon to Sat pointing at the ordering page; fallback pointing at the opening hours page.
  • App download: rule "iPhone" with Device OS is iOS pointing at the App Store, rule "Android" pointing at Google Play, fallback to the website.
  • Launch day: rule "Before launch" with Date before 2026-10-01 pointing at the teaser, fallback to the product page.
  • In-store only: rule "At the shop" with Location is your address within 200 m pointing at the loyalty page, fallback to the store finder.
  • First 500: rule "Early birds" with Total user scans less than 500 pointing at the promotion, fallback to the regular offer.
  • Geolocation routes by country and US state only, with a simpler form. It is included with Smart Rules.
  • A plain Website destination is all you need when everyone should land in the same place.

On this page