Skip to content

barcodeScan

The barcodeScan action will open the users camera module and scan a barcode. The scanned result will be available in the payload of the then action. They are accessible in $payload with the fixed key barcode. If the barcode contains a JSON string which should be parsed, the actionValues can be set with the parseJson option set to true. As default the barcode is only read as a string. Example:

actionValues
parseJson boolean

It is possible to define barcode parameters. It is similar to the configuration for the attribute. Add it to the actionValues. See Barcode/ QR-Code

{
    "label": "Scan Barcode",
    "action": "barcodeScan",
    "actionValues": [
        {
            "parseJson": true
        }
    ],
    "then": {
        "action": "request",
        "params": {
            "result": "${$payload.barcode}"
        }
    }
}