Rule Examples

Rule 1: Add the prefix "0"

  • To add a rule select Workflow Rules from the PG Config View.

SCREENSHOT OF WIZARD

  • Delete existing rules, so they do not affect your scans.

SCREENSHOT OF WIZARD

  • Click on the orange plus sign on the bottom right side to create a new rule. After the rule is created, click on the pencil symbol next to the rule to edit it.

SCREENSHOT OF WIZARD

  • Click on the trash symbol next to the existing action symbol and then click on the orange plus sign again. Here you can add either a new condition or a new action. Because we do not need a condition other than an incoming barcode event for this rule, we will only add a new action.

SCREENSHOT OF WIZARD

  • After the new action is created, we need to choose Insert (prefix) as the type and write the data we want to add to the front of our barcodes. In this case that number is 0.

SCREENSHOT OF WIZARD

  • After this action is created, we need to add another action to send the incoming barcode data. Here you will need to choose the action according to your integration path.
    • Paste barcode data with keyboard - Software Keyboard
    • Send barcode data via Intent - Intent
    • Send barcode data to the SDK - SDK

For this example, we had chosen Software Keyboard as the integration path, which is why we are choosing Paste barcode data with keyboard.

SCREENSHOT OF WIZARD

  • After you are done implementing these changes, you will see a “0” in front of all your scanned barcodes.

Rule 2: Add the prefix "0" if the barcode has 12 digits

For this rule there are two things we need to keep in mind: 1. We want to add the prefix “0” only if the length of the barcode is 12 digits 2. We want to send all barcodes that we scan to our platform (also barcodes that are longer or shorter than 12 digits)

  • To add a rule select Workflow Rules from the PG Config View.

SCREENSHOT OF WIZARD

  • Delete existing rules, so they do not affect your scans.

SCREENSHOT OF WIZARD

  • Click on the orange plus sign on the bottom right side to create a new rule. After the rule is created, click on the pencil symbol next to the rule to edit it.

SCREENSHOT OF WIZARD

  • This will be the rule where we define that we want to add the prefix “0” if the length of the barcode is 12 digits. Delete all existing conditions and actions so we can add new ones.

  • First we need to add the condition that when there is an incoming barcode AND that barcode has 12 digits, we want an action to occur.

    That means we need two conditions:

    1. An incoming barcode event
    2. The length of the barcode being 12 digits

Add these conditions using the orange plus sign and then clicking the Conditions category.

SCREENSHOT OF WIZARD SCREENSHOT OF WIZARD SCREENSHOT OF WIZARD

  • After you have added the two conditions, you need to add the action of adding the prefix “0”.

SCREENSHOT OF WIZARD

After you are done, the first rule should look like this:

SCREENSHOT OF WIZARD

  • After this rule is created, go back by clicking the back arrow on the top left side and create a second rule. After it is created click on edit.

SCREENSHOT OF WIZARD

  • This will be the rule where we define that our barcode is sent. For this we do not need a condition other than an incoming barcode event.

SCREENSHOT OF WIZARD

  • Then we need to add the action of the barcode being delivered. Here you will need to choose the action according to your integration path.
    • Paste barcode data with keyboard - Software Keyboard
    • Send barcode data via Intent - Intent
    • Send barcode data to the SDK - SDK

For this example, we had chosen Software Keyboard as the integration path, which is why we are choosing Paste barcode data with keyboard.

SCREENSHOT OF WIZARD

  • After choosing the action according to your integration path, the rule should look similar to this:

SCREENSHOT OF WIZARD

After you are done implementing these changes, all of your barcodes will be delivered and the barcodes with 12 digits will have the prefix “0”.

NOTE: The sequence of the order you create the rules are important!

For example, in this case the prefix ”0” should be added before the incoming barcode is pasted with keyboard.

Rule 3: Replace "FN1" with "["

  • For this rule there are two things we need to keep in mind:
  • If there is the string “FN1” in the incoming barcode we want to replace it with the character “[”
  • We want to send all barcodes that we scan to our platform either with or without modification

  • To add a rule select Workflow Rules from the PG Config View.

SCREENSHOT OF WIZARD

  • Delete existing rules, so they do not affect your scans.

SCREENSHOT OF WIZARD

  • Click on the orange plus sign on the bottom right side to create a new rule. After the rule is created, click on the pencil symbol next to the rule to edit it.

SCREENSHOT OF WIZARD

  • This will be the rule where we define that we want to replace “FN1” in the incoming barcode with “[” . Delete all existing conditions and actions so we can add new ones.

  • First we need to add the condition that when there is an incoming barcode AND that barcode has the string “FN1”, we want an action to occur.

    That means we need two conditions:

    1. An incoming barcode event
    2. The barcode contains string “FN1”

Add these conditions using the orange plus sign and then clicking the Conditions category.

SCREENSHOT OF WIZARD SCREENSHOT OF WIZARD SCREENSHOT OF WIZARD

  • After you have added the two conditions, you need to add the action of replacing “FN1” with “[”. Here we assume that we want to change all “FN1” strings to the character “[”.

SCREENSHOT OF WIZARD

  • After this rule is created, go back by clicking the back arrow on the top left side and create a second rule. After it is created click on edit.

SCREENSHOT OF WIZARD

  • This will be the rule where we define that our barcode is sent. For this we do not need a condition other than an incoming barcode event.

SCREENSHOT OF WIZARD

  • Then we need to add the action of the barcode being delivered. Here you will need to choose the action according to your integration path.
    • Paste barcode data with keyboard - Software Keyboard
    • Send barcode data via Intent - Intent
    • Send barcode data to the SDK - SDK

For this example, we had chosen Software Keyboard as the integration path, which is why we are choosing Paste barcode data with keyboard.

SCREENSHOT OF WIZARD

  • After choosing the action according to your integration path, the rule should look similar to this:

SCREENSHOT OF WIZARD

  • After you are done implementing these changes, all of the strings “FN1” in your barcode will be replaced with “[”.

NOTE: The sequence of the order you create the rules are important!

For example, in this case the string “FN1” must be replaced with the character “[” before the incoming barcode is pasted with keyboard.