Trace Number Validation Rules

yellowbox

Trace Type

Select a Trace Type to apply the Validation Rule against. Use the edit pick button to choose from any of the Trace Types defined on the Trace Number Types tab.

Rule Description

Enter a text description for the Trace Number Validation Rule you are creating. This description will be used to determine the Validation Rule that is applied in other TruckMate applications, such as the Customer Service program.

Only When Client or Client Group Is…​

This section allows the User to specify a particular Customer or Customer Group (as defined in the Customer & Vendor Profiles program) that the Trace Number Validation Rule will apply to.

Client

Specify a Client ID (from the CLIENT table) to apply the displayed Trace Type Validation Rule against. The Trace Number Validation Rule will apply when this Client is selected as one of the flagged Freight Bill Party options below ('Bill To', 'Caller', 'Shipper' or 'Consignee').

Group

Specify a Client Group ID to apply the displayed Trace Type Validation Rule against. The Trace Number Validation Rule will apply when any Client ID that exists in the Client Group is added to the Freight Bill as one of the flagged options below ('Bill To', 'Caller', 'Shipper' or 'Consignee'). Client Groups are created in the Customer & Vendor Profiles program > Customer > Groupings tab.

Note: Multiple Validation Rules can apply to a single Client ID or Group ID.

Bill To / Caller / Shipper / Consignee

Choose which Freight Bill party the Client ID (or any Client within the selected Client Group ID) must be chosen as on the Freight Bill for the Trace Type Validation Rule to come into effect. You may choose one flag (such as 'Bill To'), or any combination of flags.

Trace Number Validation

To set up Trace Number Validation rules:

  • A 'Trace Type' must be specified in the top-most field.

  • A 'Client ID' (or 'Client Group ID') is optional, but if selected, then at least one of the 'FB Party' flags ('Bill To', 'Caller', 'Shipper', 'Consignee') must be selected.

  • Initially, all 40 of the 'Trace Number Validation' fields will be blank. The User must select the first blank field ('1'), select one of the three colored buttons at the bottom of the screen, and that field will become a required variable (of whatever button-type was chosen) for Trace Numbers for the selected Client or Client Group. Alternatively, the User can type a specific character using the keyboard. In this case, the Validation field will be left with a white background, and the character typed will display inside the box.

    • 'Alpha' (Green): specifies the Validation field as an Alphabetic value.

    • 'Numeric' (Yellow): specifies the Validation field as a Numeric value.

    • 'AlphaNumeric' (Blue): specifies the Validation field as Alpha-Numeric.

    • 'Check Digit' (Red): specifies the validation field as a check digit, which will depend on the algorithm specified for the 'Group' selected.

Currently, only the 'MOD 10' Group logic is provided, which validates the check digit based on the LUHN formula.

The order of the validation fields used during setup is left to right, followed by top to bottom. The User will not be able to setup a Validation Rule for a given field if the previous field has not had a value entered against it. The User can setup validations for as many as 40 fields (characters) using the process described above, which is the maximum allowable length for any Trace Number. Once finished, the User can save the Validation Rule and the rule will be used to validate Trace Numbers that are entered on new Freight Bills in the Customer Service program (or Quick Bill Entry program).

Validation Rules can be edited once initially configured. When a User modifies a Validation Rule and selects the 'Save' (checkmark) button, the system will read the 'new' Validation Rule, modify the appropriate fields in the TRACE_VALIDATION_ITEMS table, and reload the new fields onto the screen (in case of a deletion in the middle of the Validation Rule).

For example, if a Validation Rule was initially 8 characters long, and the User deletes the first character and selects the 'Save' button, the system will delete the first entry in the TRACE_VALIDATION_ITEMS table with 'TVI_FIELD_NUM' = 1, then the system will re-sequence all of the following 7 characters to have their 'TVI_FIELD_NUM' value decreased by one. Finally, the system will reload the Validation Rule onto the Codes Maintenance program screen to reflect the new field appearance of the Validation Rule that consists of only 7 characters.

Behavior in Customer Service

Once you have setup a Trace Validation Rule (TVR), you will see error messages in the Customer Service program when trying to post a Freight Bill when the customer codes attached to the Freight Bill fall into the rules defined on this tab. When the error message, and the nature of the error message itself, are determined by several factors:

  • The Application Configurator program > CSERV.EXE > 'When to Check Trace Number' option can be set to either 'Post' or 'Approve', meaning that the TVR can be checked when the user attempts to post the FB or when they try to approve it for billing.

  • There are two stored procedures that are used to return error messages when a TVR check fails against any applicable Freight Bill:

    • SP_CHECK_TVR_RULE*: this stored procedure runs when the user enters data on the Customer Service program > Trace tab and then attempts to save it. Because of the way Customer Service saves its data, the user must save the freight bill itself prior to entering a trace number, because this procedure must be passed the Client IDs of the Freight Bill in order to determine if a TVR should apply or not. This procedure also calls the CUSTOM_TRACE_VALIDATE_MESSAGE function, which can be edited to create a custom message to the user when a TVR check fails.

    • SP_CHECK_TVR_RULE_BEFORE_POST*: this stored procedure runs if the Application Configurator option mentioned in #1 above is set to 'Post'. It will check the TVR rule and return a default error message if the entered trace number fails validation. The user must then go to the Trace tab and enter in (or edit) the trace number there so that it complies.