Barcode Preprocessing Rules

In today’s warehouse operations, a wide range of SKUs and suppliers results in barcodes of various formats, structures, and qualifiers. Not all scanned barcodes arrive in a format that matches your WMS requirements. Configuring barcode preprocessing rules ensures that barcodes are standardized, validated, and correctly interpreted before they enter your workflows.

With barcode preprocessing rules, you can:

  • Flexibly adapt to evolving supplier or regulatory barcode standards without requiring code customizations.
  • Automate the transformation, standardization, and cleaning of scanned barcode data to fit your organization’s processing rules.
  • Extract or restructure key information segments from the scanned barcode.
  • Reject invalid barcodes before they disrupt operations, reducing manual intervention and errors.
  • Enforce barcode acceptance and formatting in real-time, directly within the WMS.

The Barcode Preprocessing (BarcodePreProcView) UI allows you to configure barcode preprocessing rules directly within WMS. You can specify the conditions under which barcodes are preprocessed and configure the logic for updating them. Once these rules are configured, the system automatically triggers barcode preprocessing when a scanned barcode matches the defined criteria and updates the barcode accordingly.

Note:
  • You can configure these barcode preprocessing rules only in the Redwood format.
  • Currently, the configured barcode preprocessing rules are specific to the logged-in user group.
  • The system triggers barcode preprocessing rules triggers first, and then the resultant barcode is passed for further processing and validation.

Configuring Barcode Preprocessing Rules

On the Barcode Preprocessing UI, you can set criteria for when to preprocess the scanned barcodes.

To configure barcode preprocessing rules, do the following:

  1. Click Create on the Barcode Preprocessing UI.
  2. On the Create form, enter or select the following fields or toggles as required:
    • Sequence Nbr: Determines the order in which barcode preprocessing rules are evaluated.
    • Prefix Text: Prefix to detect from the scanned barcode.
    • Match Function: Select how the barcode should be matched. The system validates the barcode with the selected match functions and the values provided. You can select one of the following match functions:
      • Min Length: Matches if the scanned barcode meets the minimum length. On selecting this function, enter the minimum length value to match with the scanned barcode length.
      • Exact Length: Matches if the scanned barcode is of exact specified length. On selecting this function, enter the exact length value to match with the scanned barcode length.
      • Begins With: Matches if the scanned barcode starts with the configured text. On selecting this function, enter the string to match with the scanned barcode’s beginning string.
      • Contains: Matches if the scanned barcode contains a specific string. On selecting this function, enter the string or text to match with the scanned barcode if it contains the configured text.
      • Regex Match: Matches if the scanned barcode fits the regular expression provided. On selecting this function, enter a regular expression in the regex field.
      Note: All text entries are case-sensitive.
    • Reject Barcode toggle: If enabled, the system rejects the scanned barcode matching this rule. Also, it displays an error message below the barcode entry field during mobile transactions. You can enable this toggle to reject invalid barcodes.
    Note: Either Sequence Nbr or Match Function is mandatory for each barcode preprocessing rule. You can also configure both fields.
  3. Click Save.

You can create multiple rules with different sequence numbers.

The system matches the scanned barcodes against barcode preprocessing rules in sequence. Once the barcode matches a rule, any associated update logic is executed and the system does not check further rules.

Barcode Preprocessing Update rules for a matching sequence define how the barcode is to be updated or handled next.

Configuring Barcode Preprocessing Updates

On the Barcode Preprocessing Updates screen, you can configure logic to update the scanned barcodes.

To define how a matched barcode should be updated, do the following:

  1. In the Barcode Preprocessing UI, select a barcode preprocessing rule.
  2. Click (More Actions) > Barcode Preprocessing Updates action button.
  3. Click Create.
  4. On the Create form, enter or select the following fields:
    • Sequence Nbr: Determines update execution order.
    • Update Function: Logic to transform the scanned barcode. You can select one of the following update functions:
      Update Function Behavior Example
      Substring: Retains a substring, defined by start and end indexes. On selecting this function, enter startindex and endindex values. The system keeps only the portion of the scanned barcode from the specified startindex and endindex.
      Note: ndex value starts with 0. If the provided end index is more than the last index of the scanned barcode, the system considers last character’s position as end index.

      Scanned Barcode: ARTSKU1234567

      Startindex: 3

      Endindex: 9

      Result: SKU1234 (from 3rd to 9th character)

      Strip String: Removes a specified string from the barcode. On selecting this function, enter string value to remove from the scanned barcode. The system removes all instances of a specified string from the scanned barcode.

      Scanned Barcode: ARTSSKUARTS123

      Strip String: ARTS

      Result: SKU123

      Strip Regex: Removes parts of the barcode using a regex expression. On selecting this function, enter a regular expression logic in the regex field to remove portions of the scanned barcode. The system removes portions matching the provided regex from the scanned barcode.
      Note: You can follow the standard regular expression patterns.

      Scanned Barcode: ARTSKU123456

      Strip Regex: ^(.{3})

      Result: SKU123456 (first three characters are removed)

      Insert At: Inserts a string at the specified position. On selecting this function, enter Position and String to insert values. The system inserts a given string at a specified position on the scanned barcode.
      Note: The position value starts with 0. If the provided position is more than the last index of the scanned barcode, the system considers last character’s position as the position to insert string.

      Scanned Barcode: ART12345

      Position: 3

      String to insert: SKU

      Result: ARTSKU12345 (inserts string at 3rd position).

      Regex Replace: Uses regex groups for complex replacements or formatting. On selecting this function, enter a regular expression logic in the regex field. Based on the regular expression provided in the regex field, the system find/replace and enables advanced or multi-field parsing.

      You can use this function to create multi field barcode from the scanned barcode.

      Scanned Barcode: SSBPLPN2201

      regex: ^SSBP(.{7})

      String to replace: SSMFB[A]$1!

      Result: SSMFB[A]LPN2201!

  5. Click Save.

You can create multiple updates with different sequence numbers.

The system updates the scanned barcode based on the rules configured in the Barcode Preprocessing Updates screen. The system updates the scanned barcode in the order of sequence number.

Examples

Example 1: Barcode Preprocessing Update

You want to extract just the middle portion of a scanned barcode.

Original Barcode: ARTSSKU1234567

Barcode Preprocessing Rules:

Group Sequence Nbr Prefix Text Reject Barcode Match Function Parameters
Group1 1 ART false min_length {“length”:6}

When the barcode ARTSSKU1234567 is scanned, the system matches based on the prefix and match function.

Barcode Preprocessing Update (for Sequence 1):

Barcode Preprocessing Match Rule Sequence Nbr Update Function Configuration
Company/Facility/1 1 substring

startindex = 4

endindex = 9

The update rule extracts characters starting at position 4 and ending at position 9, so the barcode is updated to SKU123.

Example 2: Reject Barcode

You want to prevent certain invalid barcodes from being processed in WMS by rejecting any barcode starting with “SSITEM”.

Barcode Preprocessing Rules:

Group Sequence Nbr Prefix Text Reject Barcode
Group2 1 SSITEM true

If a barcode such as SSITEM012XYZ is scanned, the system matches the prefix and rejects the barcode.

Example 3: Barcode Preprocessing Rule Evaluation and Update

When a barcode (e.g., SKUSLPN12345) is scanned during a mobile transaction, the system evaluates it against each rule in sequence number order until a match is found.

Barcode Preprocessing Rules:

Group Sequence Nbr Prefix Text Reject Barcode Match Function Parameters
Group3 1 SKU false min_length {“length”:14}
Group3 2 SKU false exact_length {“length”:20}
Group3 3 SKU false begins_with {“string”:“SKUNR”}
Group3 4 SKU false contains {“contains”:“SKU-SKU”}
Group3 5 SKU false regex_match {“regex”:“S.S”}

For the barcode SKUSNLPN12345, the system evaluates the barcode preprocessing rules in order from sequence 1 to 5:

  1. Sequences 1 to 4 do not match with this barcode according to their configuration.
  2. Sequence 5 matches this barcode, because the regular expression rule applies (regex_match: {"regex":"S.S"}).

As soon as the sequence 5 matches, the system triggers the associated barcode preprocessing update rules.

Barcode Preprocessing Update (for Sequence 5):

Barcode Preprocessing Match Rule Sequence Nbr Update Function Configuration
Company/Facility/5 1 strip_string string = SN
Company/Facility/5 2 substring

startindex = 0

endindex = 7

For the barcode SKUSNLPN12345, the system updates the barcode in order from sequence 1 to 2:

  1. Sequence 1: Removes all occurrences of “SN”. (SKULPN12345)
  2. Sequence 2: Extract the first 8 characters from the result. (SKULPN12)

Original barcode: SKUSNPLN12345

After updates: SKULPN12

Example 4: Conditional Extraction Based on Supplier Prefix

You receive barcodes from multiple suppliers, each with a unique prefix and different part number formats:

  • Supplier1: Barcodes start with the prefix “S1-”, with the part number immediately following (e.g., S1-123456).
  • Supplier2: Barcodes start with the prefix “S2”, with the part number immediately following (e.g., S2123456).

You can make the system to automatically recognize the supplier based on the prefix and extract the part numbers.

Barcode Preprocessing Rules:

Group Sequence Nbr Prefix Text Reject Barcode Match Function Parameters
Group4 1 S1- false min_length {“length”:6}
Group4 2 S2 false min_length {“length”:6}

Barcode Preprocessing Update (for Sequence 1):

Barcode Preprocessing Match Rule Sequence Nbr Update Function Configuration
Company/Facility/1 1 strip_string String = S1-

Barcode Preprocessing Update (for Sequence 2):

Barcode Preprocessing Match Rule Sequence Nbr Update Function Configuration
Company/Facility/2 1 strip_string String = S2

For Supplier1 barcode “S1-123456”:

  • The rule matches the “S1-” prefix.
  • The barcode preprocessing update removes the string “S1-”. So, the updated barcode is “123456”.

For Supplier2 barcode “S2123456”:

  • The rule matches the “S2” prefix.
  • The barcode preprocessing update removes the string “S2-”. So, the updated barcode is “123456”.