Skip to content
English
  • There are no suggestions because the search field is empty.

QR Code Reader

The QR Code Reader element allows you to use a camera to scan a QR code.

To add the QR Code Reader element, right-click on an empty area or drag and drop the output of the element you want to connect the QR Code Reader to into your frame and select "QR Code Reader".

The QR code reader can only read QR codes in JSON format.
 
If you do not know what JSON format is, have a look here: https://en.wikipedia.org/wiki/JSON
 
At the following link you'll find a code sandbox that generates a QR code in JSON format: https://codesandbox.io/s/yp1pmpjo4z?file=/index.js

In the sidebar of the element you can now add a transformation rule. By applying your information to an attribute/variable, you can use the information from the QR Code during the following conversation (e.g. as a condition or to make the robot speak it out loud, or if your information is a website, you can open the website with the website element).

 

Also make sure you use the 'QR Code not detected' output of the QR Code reader element, as this will be triggered if a QR code is not detected within 20 seconds, or if the device does not allow access to the camera.
 
 

 

Example of how to use the QR Code Reader

 
QR code below has stored:

 name: 'Jane Doe' id: 928328 insider: true

 
 

If the avatar Cho has scanned the QR code, she greets Jane Doe, if not, she asks if she should do it again or ask a human colleague for help.

 
Depending on the structure of how the data is stored in the QR Code, the JSON Key Path differs. In our case, everything is in the first level and we can enter the data with or without the $.
 
 
 
With #ATTRI/name, the Avatar Cho can say the name and have the information displayed next to her.