(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PF5R8F7');

Knowledge Base

Conditional Validations

What Is Conditional Validation?

The standard Invalid and Invalid Duplicate validation is the default when creating validation services. Those service types work when the app user is online or offline. However, conditional validation allows you to add a special count and duration-based conditions to invalidate scans. For these options, the app-user will need Internet connectivity. Additionally, you’ll need to create your own Postback URL to incorporate these specific validation options. But, you don’t need your own server and you don’t need to be a programmer! Follow the instructions below and, if you’re having trouble, we can build it for you on request.

Conditional Validation Options

  • Setting a minimum requirement of scans in order to make a scan valid. For example, you could fulfill an offer only if the customer had the offer scanned ‘x’ times. Or check if a student or member has fulfilled attendance obligations ‘x’ times before issuing a reward.
  • Setting a maximum number of scans allowed for each barcode. For example, you could limit the number of times a customer could use the same coupon, voucher, or ticket. Or limit the number of times a student, member or guest could attend an event.
  • Setting a start and end time for when scans are valid. For example, you could have a ‘value’ (ticket, coupon, voucher, membership, etc.) be exclusively used ‘x’ times between certain hours. The service will become inaccessible outside of this time period set. Important: The default is timezone America/New York.
  • Setting a start and end date range for when scans are valid. For example, you could have a value be exclusively used ‘x’ times between certain dates.
  • Setting a first_scan duration from the current time during which scans will be valid. For example, you could have a value be exclusively used ‘x’ times over a defined period, with the period beginning with the first scan.
  • Setting a day range from a specific day range for when scans are valid, repeating each week. For example, you could have a scan valid only on weekdays and not on weekends or to be valid for ‘x’ times each week. You also have the option for a scan to be valid on specific days of the week like Mondays, Wednesdays, and Fridays only. Note: for non-consecutive days the maximum scan limit resets each day as opposed to the three days in aggregate.
  • Setting a maximum number of scans for an app-user for which scans are valid. For example, you could have a value be exclusively scanned ‘1’ time by an app-user but have the total maximum for all app users be a higher number.
Conditional Validations

Note: You need to have a paid plan to use this feature as you will need to be able access your API key.

Using Conditional Validations

Validation Override

Your conditional validation will apply to all database values associated to a specific service. Although different services can have different conditions, you might have cases where the conditions need to be different within a single service.

To override the primary conditional validation, you can add simple, structured text in your validation database’s response text (column 2). For example, let’s say most of your values are valid for 24 hours but some need to be valid for 48 hours. You can set up the service for a 24 hour validation (duration=1440) from the first scan but over-ride that to validate specific values at 48 hours if the structured text duration=2880 is in the response. Refer to the instructions for further details.