Scanning barcodes in Operator Interface or in the WATS Mobile App supports filling in the 5 fields serial number, part number, revision, batch number, and operation type. By default, the scanned value is split by '/' and input into these fields in order. This behavior can be configured using the BarcodeIdentifier REST API methods.
NOTE: For barcode scanning to function properly, the serial number must be present and positioned correctly (according to the defined serial number regex).
Since multiple patterns can be created and prioritized by order, the scanner will process them sequentially - checking each pattern until it finds the first valid serial number and pattern combination.
If no valid combination is found, no action will be taken.
Therefore, it is recommended to add new patterns as needed while keeping the default pattern unchanged as a fallback.
NOTE: The API method described below is supported from WATS Server ver 20.3.
A BarcodeIdentifier looks like this:
{
"id": 0,
"pattern": "string",
"serialNumber": "string",
"partNumber": "string",
"revision": "string",
"batchNumber": "string",
"process": "string",
"order": 0,
"description": "string"
}
- id; the ID of the BarcodeIdentifier, generated by WATS.
- pattern; is not in use anymore.
- serialNumber; RegEx for finding the part of the scanned value that belongs in the serial number field.
- partNumber; RegEx for finding the part of the scanned value that belongs in the part number field.
- revision; RegEx for finding the part of the scanned value that belongs in the revision field.
- batchNumber; RegEx for finding the part of the scanned value that belongs in the batch number field.
- operationType; RegEx for finding the part of the scanned value that belongs in the operation type field.
- order; if you have multiple BarcodeIdentifiers, they are processed in order from low to high.
- description; text description of what the BarcodeIdentifier is, typically an example of what the barcode looks like (i.e. 'serialNumber/partNumber/revision/batchNumber/operationType').
Serial number is required. Except that, you only have to fill in the fields your barcode has, the rest can be left empty.
To view the configured BarcodeIdentifiers, use this REST API method:
GET https://yourWATSserver/api/BarcodeIdentifiers/BarcodeIdentifiers
To add or update a BarcodeIdentifier, use this REST API method with a BarcodeIdentifier in the body:
PUT https://yourWATSserver/api/BarcodeIdentifiers/BarcodeIdentifier
To remove a BarcodeIdentifier, use this REST API method:
DELETE https://yourWATSserver/api/BarcodeIdentifiers/BarcodeIdentifier/{id}
where {id} is the id of the BarcodeIdentifier to remove.
See Also:
Swagger
Comments
0 comments
Please sign in to leave a comment.