How does the Production Batch String and auto generation of Production Batch IDs work?

Introduction

Companies that produce lot-tracked product often have a set pattern for how they assign Production Batches to items. For example, they may use the Site ID followed by the Julian Date (e.g., BCS-185). To simplify users having to enter this information in for every production output line item, we have added the ability to auto generate the ID.

Setting up the Production Batch String on the Transaction Class record

There are two properties that work with the Production Batch ID auto generating on a Production Transaction. These are named ‘Auto Assign Production Batches’ and ‘Production Batch String’. The Auto Assign Production Batches property must be set to ‘Yes’ in order to see the ‘Production Batch IDs' field on the Production Transaction to enable the feature.

The Production Batch String property has a default value set as the following: “(YYYY)+(MM)+"-"+[SiteID]+"-"+[ItemID]”, but is always editable on this page. For example, if the current month and year is January 2024, the Site is Bellingham Cold Storage (BCS) and the Item is 110-FZ-05-1 Pacific Cod Fillets, the Production Batch ID would default as "202401-BCS-110-FZ-05-1" for all new Output line items.

Production Batch String rules and supported Keywords

The generated Production Batch String must be <=50 characters, else the message “The generated Production Batch, [entered value], exceeds 50 characters. Please adjust the Production Batch String or manually assign a Production Batch for this line” will be displayed on Save from the Production record when trying to assign the batch ID.

The following Keywords are supported for this feature:

  1. Date:

    1. (DD) - 2 digit day of month

    2. (MM) - 2 digit month

    3. (YY) - 2 digit year

    4. (JD) - 3 digit Julian Date

    5. (YYYY) - 4 digit year

  2. NorthScope Data:

    1. [ItemID] - populates with the Transaction’s Line Item ID

    2. [SiteID] - Transaction Site ID

  3. Text

    1. “Some text value” - As previously mentioned the whole string cannot exceed 50 characters

  4. Concatenation

    1. '+' symbol is a required separator between keywords

Production Batch String Validations

The following validation rules apply when saving a Production Batch String value:

  • Keywords for everything other than text fields must be as expected which is specified in the rules from the previous section of this FAQ.

    1. Case sensitivity is not enforced so users may enter [itemid] instead of [ItemID] for example.

    2. The keyword must be enclosed in the correct format, for example, () for date parts or [] for NorthScope data parts.

      1. Else the message "[entered value] Production Batch String was not in the correct format." will be displayed on Save. 

  • No instance of repeating '+' symbols, for example:

    1. (DD)+(YY) is allowed

    2. (DD)++(YY) is not allowed

      1. Else the message "The Production Batch ID string cannot contain repeating “+” symbols." will be displayed on Save.

  • A string cannot start or end with a '+', for example:

    1. +(DD) is not allowed

    2. (DD)+ is not allowed

      1. Else the message: "The Production Batch ID string cannot begin or end with a “+”." will be displayed on Save. 

  • A text value must be enclosed with double quotes, for example: 

    1. [SiteID]+”a text value” is allowed

    2. *”*BCS is not allowed

    3. BCS*”* is not allowed

      1. Else the message: "Text values must be enclosed with “ ”." will be displayed on Save.

Using the Production Batch String on the Production Transaction record

After setting up the Transaction Class to enable the Production Batch ID to auto generate using the specified string, once a user creates a Production transaction from this class the ‘Production Batch IDs’ field will be visible on the header of the transaction. The batch string value that was saved on the class will display, but this can be edited while the transaction is in a status of ‘New’, following all the aforementioned keywords and validation rules.

As new Output lot line items are added to the transaction, the Production Batch value for the line will be updated after Save to display the specified string value.

Note: This is only applicable to newly created Output lots, if the lot already exists for the Output item, the Production Batch value will default to the existing ID as expected. For example, if the line item is added from Find Output Lots, the Batch ID will default from the lot the item was added from.

Additionally, if the batch string is updated or added, any items that exist on the transaction will not be updated and will only apply to subsequent new Output line items for new lots.