All Collections
QR Codes
QR Codes
Types of QR Codes
Create condition-based QR Codes using Smart Rules
Create condition-based QR Codes using Smart Rules

Send your code scanners to different link destinations based on rules, such as time, date, location, device OS and more.

Shweta Rao avatar
Written by Shweta Rao
Updated over a week ago

Smart Rules QR Codes are condition-controlled QR Codes that can trigger different actions based on specific conditions when scanned.

For example, a Smart Rule QR Code with a time-based condition (called a Rule on the dashboard) can automatically change what it shows to a scanner, depending on the time of day. So, a restaurant could use a Smart Rule QR Code to direct its customers to its breakfast menu in the morning, lunch menu in the afternoon, and dinner menu in the evening. After closing hours, the Smart Rule QR Code could display a message saying the restaurant is closed. This way, the restaurant’s customers can always see the most relevant information, no matter when they scan the same QR Code.

Prerequisites

  • Uniqode Starter plan or above*.

*Smart Rules is a beta version release.

Begin creating a Smart Rule QR Code

  1. Sign in to your Uniqode account.

  2. Click + CREATE on the right of the Overview page.

  3. Or,

    1. Click QR Codes in the left menu.

    2. Select QR Codes from the dropdown menu.

    3. Click + CREATE QR CODE on the right corner.

  4. Select Smart Rules as the QR Code type.

Here are the basic steps to set up a Smart Rule QR Code :

  1. Identify the conditions to trigger your Smart Rule. This could be anything from the time of day to the person's device.

  2. Set up a series of rules that specify the action when each condition is met. For example, you can have one rule that redirects people to your website during the day and another rule to redirect them to your social media pages at night.

  3. If you set up multiple smart rules, the listed rule will be triggered first. Use the order of the rules to determine which rule is triggered when multiple conditions are met. For example, if you have a rule that redirects people to your website and another rule that redirects people to your social media pages, the rule for the website will be triggered first if the person scans your QR Code during the day.

  4. If you want the rule for your social media pages to be triggered first, move it to the top of the list.

  5. Test your smart rules carefully to ensure that they are working as expected. You can scan your QR Code at different devices and times.

Note: Always set a fallback URL under If above conditions are not met, redirect users to. This will be your backup URL that will execute when the URLs set in the rules don’t work for any reason. This is a great way to ensure your users always have a positive experience, even if something goes wrong.

Create a time-based Smart Rule QR Code

Let’s say you are a restaurant owner and you want to create a QR Code that helps your customers order online during specific hours. You can use a time-based Smart Rule QR Code to do this.

  1. Click + Add new rule.

  2. Select Time.

  3. Click the edit icon next to New rule and name it “Online order hours”.

  4. SetIf condition to is between and enter your business’s start and end times.

  5. Click on + Add time and set timezone to US/Pacific and enter the Start time and End time as 6:00 and 18:00, respectively. Click Save.

  6. Enter the link of the webpage where your users can order online under Redirect users to.

  7. Enter a fallback URL under If above conditions are not met, redirect users to. This could be a link to your restaurant's website or a landing page with a message that says the QR Code is unavailable.

  8. Click Next

  9. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  10. Click Next.

  11. Click Finish.

Customers who scan the QR Code between 6 AM to 6 PM can book online orders with your business. Those who scan the code outside the specified time frame will be redirected to your business’s website.

Create a date-based Smart Rule QR Code

Let’s say you are running a marketing campaign with a coupon code valid only on Black Friday. You want to create a QR Code that will redirect users to a landing page where they can claim the coupon, so you will need a date rule. Other days, the scanners will be redirected to your online marketplace as usual.

  1. Click + Add new rule.

  2. Select Date.

  3. Click the edit icon next to New rule and name it Black Friday coupon code.

  4. In the If condition, set up the rule for the date the QR Code can be accessed.

  5. Specify when the QR Code can be scanned under If. In this case, select is and click + Add date.

  6. Set the timezone as US/Pacific date to October 28th, 2023.

  7. Enter the link (for eg, www.your-business.com/blackfridaysale) to the landing page where users can claim the coupon when they scan the QR Code under Redirect users to.

  8. Enter the link to your marketplace (for eg: or eg: www.your-business.com/marketplace) under If above conditions are not met, redirect users to.

  9. Click Next

  10. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  11. Click Next.

  12. Click Finish.

Your Black Friday coupon will now be accessible only on Black Friday. When users scan the QR Code any other day, they will be redirected to your online marketplace.

Create a day-based Smart Rule QR Code

Let’s say you are an HR manager who wants to post a program of daily activities in PDF form. You want a QR Code that employees can scan to access the activities lined up for a specific day without manually updating the QR Code every day.

  1. Click + Add new rule.

  2. Select Day.

  3. Click the edit icon next to New rule and name it “Monday”.

  4. Set the If condition to Day is, set the time zone to US/Pacific and select Mon.

  5. In the Redirect users to the field, enter the link of the PDF file containing the list of Monday’s activities.

  6. Click + Add new rule.

  7. Select Day.

  8. Click the edit icon next to New rule and name it “Wednesday”.

  9. Set the Else if condition to is, set the time zone to US/Pacific, and select Wed.

  10. Enter the PDF file link containing the list of Wednesday’s activities under Redirect users to.

  11. Enter the link to your website or a landing page with activities for all days under If above conditions are not met, redirect users to.

  12. Click Next

  13. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  14. Click Next.

  15. Click Finish.

Employees who scan the QR Code on Monday or Wednesday will see activities lined up for the specific day. Employees who scan the QR Code on any other day of the week can see a complete list of all activities.

Create a country-based Smart Rule QR Code

Let’s say you’re a pharmaceutical company launching a new drug. You want to create a country-based smart rule QR Code that can show different information to users based on the countries they are scanning from.

  1. Click + Add new rule.

  2. Select Country.

  3. Name the condition as “US form”

  4. Set If condition to is and the country to United States.

  5. Enter the link to a landing page announcing the drug’s release and a list of distributors under Redirect users to.

  6. Click + Add new rule.

  7. Select Country.

  8. Name the condition as “Brazil form”

  9. Set Else if condition to is and the country to Brazil.

  10. Enter the link to a Form to sign up for trial below Redirect users to.

  11. Enter the link to the company’s website under If above conditions are not met, redirect users to.

  12. Click Next

  13. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  14. Click Next.

  15. Click Finish.

This QR Code will redirect scanners in America to a landing page with information on the drug’s distributors, scanners from Brazil to sign up for trial, and scanners from the rest of the world to the company’s website.

Create a Smart Rule QR Code with unique user scans

Let’s say you are a retail store running a promotion where the first 25 customers to scan a QR Code will receive a 20% discount coupon on Christmas, and the next 175 customers will receive a 10% discount. You can create a Smart Rule QR Code to automate the coupon distribution process.

Note: Total user scan counts include repetitive scans.

  1. Click + Add new rule.

  2. Select Unique user scans.

  3. Name your rule “Christmas 20% discount coupon” by clicking the edit icon.

  4. Set the If condition to is between and enter 0 as minimum value and 25 as maximum value.

  5. Enter the landing page link with the discount coupon under Redirect users to.

  6. Click + Add new rule.

  7. Select Unique user scans.

  8. Name your rule “Christmas 10% discount coupon” by clicking the edit icon.

  9. Set the If condition to is between and enter 26 as minimum value and 175 as maximum value.

  10. Enter the landing page link with the discount coupon under Redirect users to.

  11. Click + Add new rule.

  12. Select Unique user scans

  13. Name your rule “End Christmas campaign” by clicking the edit icon.

  14. Set the If else condition to is and enter 200.

  15. Enter the link of a landing page that says “the Christmas discount has ended” under Redirect users to.

  16. Enter the link to the business’s home page under If above conditions are not met, redirect users to.

  17. Click Next

  18. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  19. Click Next.

  20. Click Finish.

The first 25 customers who scan the Smart Rule QR Code will be redirected to the page where they can download their coupons. The campaign will end after 200 unique users have scanned the QR Code and will redirect scanners to a page where the discount campaign has ended.

Create a device language and OS-based Smart Rule QR Code

Let’s say you are launching a new app in Japan and want to make it easy for users to download the correct app version for their devices. You can use a Smart Rule QR Code to redirect users to the appropriate landing page to download the app based on their device language and OS.

  1. Click + Add new rule.

  2. Select Country.

  3. Set If to is and choose Japan.

  4. Click + Add Condition (and)

  5. Select Device OS.

  6. Set If to is and choose iOS.

  7. Enter the link to the app’s App Store link to redirect iPhone users to under Redirect users to.

  8. Click + Add new rule.

  9. Select Country.

  10. Set Else If to is and choose Japan.

  11. Click + Add Condition (and)

  12. Select Device OS.

  13. Set Else if to is and choose Android.

  14. Enter the link to the app’s Play Store link to redirect Android users to under Redirect users to.

  15. Enter the link to the app’s general landing page with links to both the app stores under If above conditions are not met, redirect users to.

  16. Click Next

  17. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  18. Click Next.

  19. Click Finish.

This Smart Rule QR Code will redirect any iPhone user with Japanese as a default device language to the App Store link of your app. Similarly, Android phone users with Japanese as a default device language will be redirected to your app’s Play Store link.

Everyone else will be redirected to your app’s webpage.

Create a location-based Smart Rule QR Code

Let’s say you are a real estate agent who wants to target anyone who scans your QR Code within 10 miles of your property in Washington.

Note: This rule will only apply to the people who have enabled their location settings while scanning the QR Code.

  1. Click + Add new rule.

  2. Select Location.

  3. Select is and enter Washington DC in the Search location field or provide the Latitude and Longitude of the location. Alternatively, you can set the location using the interactive map as well. Specify the range within which the QR Code can be accessed, in this case, 10 miles. Click Save.

  4. Enter the link to the property’s landing page with images and sale information under Redirect users to.

  5. Enter your Card URL under If above conditions are not met, redirect users to.

  6. Click Next

  7. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  8. Click Next.

  9. Click Finish.

This location-based Smart Rule QR Code will redirect scanners within the specified location range to a landing page with property images and sale information. Scans outside the range will be shown your digital business card so they can reach out to you.

Create a passcode-based Smart Rule QR Code

Let’s say you work for a doctor's office that wants to create a QR Code to redirect patients to a landing page with information about a new drug the doctor prescribes. However, only the patients who have already been prescribed the drug should be able to access the information.

Note: The passcode should at least have six characters and is case-sensitive.

  1. Click + Add new rule.

  2. Select Passcode.

  3. Set If to is and enter the passcode as NEWDRUG.

  4. Enter the URL of the landing page with information about the new drug under Redirect users to.

  5. Enter the link to the doctor’s Linkpage with contact information under If above conditions are not met, redirect users to.

  6. Click Next

  7. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  8. Click Next.

  9. Click Finish.

This passcode-based Smart Rule QR Code will only provide access to scanners who enter a pre-defined passcode NEWDRUG after scanning the QR Code.

Create a user age-based Smart Rule QR Code

Let’s say you are a brewery that wants to create a QR Code to redirect users to a landing page with information about their new beer. But, the brewery only wants users over 18 to be able to access the information.

  1. Click + Add new rule.

  2. Select User age.

  3. Name your rule by clicking the edit icon.

  4. Set If to is between and enter the 18 and 40 as Minimum value and Maximum value, respectively.

  5. In the Redirect users to the field, enter the link to information on the new beer.

  6. Enter the link to the doctor’s Linkpage with contact information under If above conditions are not met, redirect users to.

  7. Click Next

  8. Design your QR Code as per your branding. Learn more about how to design custom QR Codes.

  9. Click Next.

  10. Click Finish.

This age-based Smart Rule QR Code will prompt scanners to enter their date of birth. If the scanner enters an age within the specified range, they will be redirected to information on the newly launched beer.

Adding multiple conditions and rules

You can add multiple conditions to a rule to create QR Codes governed by nested logic. Nested logic in Smart Rules QR Codes helps create QR Codes with multiple rules and conditions. (refer Create a device language and OS-based Smart Rule QR Code above). This means that your QR Code can only be scanned if all of the conditions of a rule are met.

  1. To set another condition to a rule:

    1. Click + Add condition.

    2. Select And/Or, then select the type of condition and enter the specifications accordingly.

  2. To add another rule:

    1. Click + Add new rule.

    2. Select the condition and enter the specifications accordingly. You can also add another condition within this rule as well.

Let’s say a business owner wants to create a QR Code that will redirect customers to a different resource depending on the time of day. She wants to receive customer requests via an online form during business hours. However, she needs customers to contact her via her digital business card when closed for business. The logic to set up this Smart Rule QR Code would be:

  1. Rule 1:

    1. If the time is between 9 AM and 5 PM,

    2. then redirect the scanner to the business's contact form.

  2. Rule 2:

    1. If the time is outside of 9 AM to 5 PM,

    2. then redirect the scanner to the business's digital business card.

To set this Smart Rule QR Code:

  1. Click + Add new rule.

  2. Select Time.

  3. For Rule 1:

    1. Under If, select is between.

    2. Set the Start time and End time as 9 AM and 5 PM respectively.

    3. Enter the link of the business's contact form under Redirect users to.

  4. For Rule 2:

    1. Click + Add new rule.

    2. Under If, select is not between.

    3. Set the Start time and End time as 9 AM and 5 PM respectively.

    4. Enter the link of the business's digital business card under Redirect users to.

  5. Click Next.

Setting up a default URL

If the users who scan the QR Code don’t meet the conditions specified in the rules, you can redirect them to a default URL. To do so, enter the URL that you want such users to be redirected to in the Enter default URL field.

Did this answer your question?