Online Validation

Description

A line step can be Online or Offline validated. This is opposed to on posting (header steps)

Use case 

  • Tell the user instantly whether an input value is correct
  • Return additional steps - based on the input

Limitations

  • You will limit the Offline capability because a request is made for each order lines registration

There are two types of Online Validation

  • Standard steps (steps in the standard Workflows)
  • Custom steps

Standard Step Validation

Standard validation can be set up in the following steps from the "standard" workflow

  • ToBin / FromBin
  • Lot number
  • Tote
  • Serial number
  • Quantity

How to set it up

In the mobile configuration:

Add the "<validation>" tag in the service section, to enable the validators needed. Each required element needs to be enabled and have a document type set.
The "includeCollectedValues" attribute defines whether previously gathered steps should be added to the request

<service id="Pick" type="Order" orderType="Pick">
   <requests>
     <..>
   </requests>
  <validation>
    <lotNumberValidation online="true" documentName="ValidateLotNumber" includeCollectedValues="true"/>
    <serialNumberValidation online="true" documentName="ValidateSerialNumber"/>
    <fromBinValidation online="true" documentName="ValidateFromBin"/>
    <toBinValidation online="true" documentName="ValidateToBin"/>
    <toteValidation online="true" documentName="ValidateTote"/>
    <quantityValidation online="true" documentName="ValidateQuantity"/>
  </validation>
</service>


OnlineValidation Request

ItemNumber, lineNumber and orderBackendId are always included, followed by the step setup for validation, and previously gathered steps if setup to do so.

XML Example
<?xml version="1.0" encoding="utf-8"?>
<request name="ValidateLotNumber" created="2021-12-14T11:22:30+01:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
  <requestData name="ValidateLotNumber">
    <itemNumber>TF-003</itemNumber>
    <lineNumber>20000</lineNumber>
    <orderBackendId>RE000160</orderBackendId>
    <ExpirationDate>13-07-2022</ExpirationDate>
    <lotNumber>ScannedLotNumber</lotNumber>
  </requestData>
</request>


The online validation responses should look as follows.

XML Example
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="07E64DA6-2335-40C1-83DB-5C40E3043083" status="Completed">
  <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel" />
</response>

If the status is returned as Completed, then the application will take that as a positive response. Another status will be interpreted as an error and will prevent the user from going forward.

Custom Step Validation

Generic step validation is a mechanism for validating any step in the workflow configuration, which does not have a specific validation element in the services section. This type of online validation still has the possibility to validate the current step and any previous step if set up to do so.
Configuration is done inside the workflow and looks as follows.

<workflow id="customWorkflow" itemNumberAI="01,02,91">
  <configuration scanBehaviourWhenRegisteringQuantity="ScanNextItem" cancelBehaviour="Close" autoSave="false" fastForwardMode="InputAndScanValues">
    <steps>
       ...
       <text id="23" name="CustomTextField" header="Custom Text Field">
        <onlineValidation documentName="ValidateCustomTextField" online="true" includeCollectedValues="true"/>
      </text>
      <typeAndQuantity header="Type something" id="5" name="TypeAndQuantity" scanBehavior="Add">
        <onlineValidation online="true" documentName="ValidateTypeAndQuantity" includeCollectedValues="true"/>
      </typeAndQuantity>
      ...
    </steps>
  </configuration>
</workflow>

The request and response will look the same as the specific validation types.

Extended online validation functionality

Besides the capability to validate whether or not an entered value is accepted by the backend, several online validators also support returning additional information, and changing behavior.

Step Updates from Custom Validation

Available from v. 1.9.1

Step updates lets the backend return values as a response to an online request. The individual <step /> element needs to contain a name and a value. The name is used to identify a step in the current registration collector workflow, and the value is applied to that step. Currently step updates will only be applied to steps past the validating step.

The response should look as follows, where step updates is the wrapper element containing any specific step update.

<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="836DEC5F-097E-4300-8CC0-7FE4CB2B76A5" status="Completed">
  <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel">
    <stepUpdates xmlns="http://schemas.taskletfactory.com/MobileWMS/WarehouseInquiryDataModel">
      <step name="CustomStep" value="CustomStepValue" />
      <step name="Quantity" value="2.5"  interactionPermission="AllowEdit" /> // interactionPermission is only supported for the specific Quantity step/name.
    </stepUpdates>
  </responseData>
</response>

Response for Type and Quantity

The generic online validator does have an extra feature when it comes to the Collector Step TypeAndQuantity step , which allows the backend to return a new display name for the scanned value.
So instead of e.g. displaying a serial number, the item number or a human-readable name can be displayed on the control.
Notice that the display value (TypeDisplay) needs to contain all the information.

XML Example
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="28AEF07E-2629-46F4-B935-AB6207DC3FFC" status="Completed">
  <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel">
    <TypeKey>TF-002</TypeKey>
    <TypeDisplay>TF-002 - Intense Orange</TypeDisplay>
  </responseData>
</response>

Returning a quantity

When utilizing lot or serial number validation, a quantity can be returned, which will be used as the quantity going forward.
Whether or not the user is allowed to edit the quantity can be set by the <ValueInteractionPermission> element.

ValueInteractionPermission can have three states.

  • AllowEdit - Allows the user to edit the value in the quantity step. User still sees quantity step
  • ApplyDirectly - Hides the quantity step altogether
  • VerifyOnly - "Disables" the quantity step. User still sees quantity step, but cannot edit it


XML Example
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="EA9FD6AF-78C6-47DE-82CE-3EB789FAFE64" status="Completed">
  <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel">
    <LotNumberInformation xmlns="http://schemas.taskletfactory.com/MobileWMS/WarehouseInquiryDataModel">
      <Quantity>5</Quantity>
      <ValueInteractionPermission>ApplyDirectly</ValueInteractionPermission>
    </LotNumberInformation>
  </responseData>
</response>

Returning registration collector steps

Available from v. 1.5.12

All standard online validators can return steps as part of the response to validation.

The response should look as follows:

XML Example
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="6972D4AF-1829-43FE-B0FB-C37B3249E689" status="Completed">
  <responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel">
    <registrationCollectorConfiguration xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response">
      <steps>
        <add inputType="Text" id="10" name="MyCustomStep1" autoForwardAfterScan="true" header="MySerialSteps1" defaultValue="" editable="true" optional="false" primaryInputMethod="Scan" />
        <add inputType="Text" id="20" name="MyCustomStep2" autoForwardAfterScan="true" header="MySerialSteps2" defaultValue="" editable="true" optional="false" primaryInputMethod="Scan" />
      </steps>
    </registrationCollectorConfiguration>
  </responseData>
</response>

The registration collector configuration element can be combined with lot and serial number information elements, and should exist on the same xml node level.

Setting Serial Number Validation Level (optional)

When using Serial Number validation, you can also set the "ValidationLevel" for how restrictive to validating serial numbers.

<service id="Pick" type="Order" orderType="Pick">
  <validation>
    <serialNumberValidation online="true" documentName="ValidateSerialNumber" validationLevel="Line"/>
  </validation>
</service>

The levels are:

  • Item: The same serial number can only be registered once per item, but multiple times across items.
  • Line: A serial number can only be registered once per order line, but multiple times per order.
  • Order (default): A serial number can only be registered once per order
  • None: Does not check for serial number uniqueness.

Step 2: Handle validation in backend

See How-to: Online Validation for Planned step