(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

About Smart Scan

Smart Scan is a very powerful feature. It allows you to configure filter sets that enable your app-users to capture just the right barcode when in the right context.

It’s important to learn the filters, filter sets, context, and matches.

First, you can create a barcode filter with a preset configuration. For example, when the app’s camera view is open to read barcodes, it captures the right barcodes as they match. The barcodes within the camera view must have some definable context, such as the barcode types in the view. Also, you can embed the data on those barcodes (suffix, prefix, etc.).

In some cases, you’ll need more than one barcode filter depending on the context. Those filter sets work together to ensure the correct match in that view. Also, you may need a set of matches because the app may display different camera views, each with its own context and filter sets.

IMEI Example

Here’s an example of how Smart Scan can be used to capture just the IMEI barcode on Apple’s iPhone box. There are four Code 128 barcodes and one UPC barcode all within the same camera view. The IMEI is one of the four Code 128 barcodes so we can’t filter simply by barcode type.

For this example, let’s assume the IMEI always starts with “035” or “35” (which it does under certain criteria). One of the filters can be the barcode type code 128 and the other must then must be a pattern match using a regular expression. With these filters, the app looks for a Code 128 barcode and only captures it if when it has the suffix is “035 or “35”.

iphone box barcodes

You can have your app-user instantly capture just the IMEI barcode on an iPhone box in a camera view and still be able to scan Code 128 barcodes when not scanning iPhone boxes. Then, you need additional filters to further define the iPhone box’s context. Also, consider the context of the other camera views to create filter sets and matches accordingly. See a screenshot below of one way to set up scanning for IMEI barcodes.

For example, with the iPhone box, you could add a barcode filter such that the match must include a UPC barcode, assuming the other contexts won’t meet the matching requirements of that filter.

Smart Scan of an IMEI barcode

Setup Instructions

Join Together Barcodes with a Separator

The standard scanning configurations (i.e. non-smart-scan) only capture one barcode in the camera view. However, with Smart Scan, the app will try to read every barcode in the camera view but will only capture your targeted barcodes. If you want to capture multiple barcodes in a camera view, you should check this box and define a separator such as a comma, bat, semicolon, or carriage return.

CodeREADr App

It will submit all scans into the ‘barcode’ field of a scan record if you use the Batch Mode for the primary scan. Also, it will submit all scans into the ‘answer’ field if you use it for an app-user prompt.

CodeREADr KEY App

It will submit all scans into the one target field where the cursor was blinking.

Match Barcode Format

You will specify the barcode type(s) targeted with this profile.

Match Barcode Value Pattern

In this variant, you will define the characteristics of the barcode value(s) that the app can read and capture (‘capture-only’). Then, it will ignore the values that don’t match. Here are a few examples.

The Pattern regex to only capture an IMEI barcode that begins with either a prefix of “35” followed by 13 digits or a prefix of “035” followed by 14 digits is ^(35[\d]{13})$ as one match and ^(035[\d]{14})$ as the second match.

Smart Scan IMEI

Regex examples

The Pattern regex to only capture barcodes beginning with (5) zeros followed by (5) numbers (“0000012345”) would be
^(00000[\d]{5})$

The Pattern regex to only capture barcodes including VALUES_IN_STRING (enter your string there) would be
^[\s\S]*?VALUES_IN_STRING[\s\S]*?$

For both examples, you would not check the option to “Replace pattern match”.

Replace Pattern Match

You can use the Pattern match to alter the scan value. In that case, you enter the pattern regex and must enter the replacement value. It’s used for the same reasons when using our standard Alter Scan feature. Also, you can use the standard Alter Scan feature instead of applying it here. However, when you apply it here, you have more options, including multiple replacements and filters. Learn more about Alter Scan Value here. In the screenshot example below, we show a regex to capture just the first 39 characters of a scanned value.

Note: If you use this replacement feature for Barcode 1, you should also create a Barcode 2.

Not Required

You can allow an override of the Smart Scan rule if it doesn’t meet this particular profile.

Return Barcode Results When Found

Here, you can choose to have the barcode matching this profile recorded or not. You may want this profile matched but only record the barcode matched with another profile.

Add Another Barcode

You can add another barcode filter to create a filter set. Notice in the screenshot below, the filter is ‘Barcode 1’. Also, you can create Barcode 2, Barcode 3, etc.

Add Another Match

You can add other filter sets for matching. Notice in the screenshot below, the match is ‘Smart Scan 1’. Likewise, you can create Smart Scan 2, Smart Scan 3, etc.

With the CodeREADr app, you have an extra degree of flexibility. For instance, you can create a filter set for the primary scan and different sets for secondary scans (i.e. app-user prompts after the primary scan).

Make a Copy of This Profile

This is a helpful tool when using the JSON developer option.