How to Guide - VQL
Prerequisites
Customer/Users have downloaded Sharering app and set up a Sharering account
Definitions
Customer - person who is being queried, user of the sharering app
User - person who is defining identity queries for the customer, user of the VQL web platform
Introduction
Vault Query Language (VQL) is a mechanism that allows both physical and online businesses to request information about their users/visitors via the presentation of a QR code. This information can then be used to either make a decision about whether they can access your service/product, or what services are available to them.
With VQL, we eliminate the need for filling out forms, or showing your identity. We also put the user in control of their identity and what information they share, and with who.
- A few examples for when VQL can be used to increase security and reduce friction for the users:
- Banks/Credit unions - scan the QR code to sign up for a bank account.
- Convenience Store - scan the QR code to prove your age (for liquor purchases)
- Foreign Exchange Booth - scan the QR code to provide your information for the currency exchange
- Car Sharing System - scan the QR code to instantly sign up for a car sharing account.
- Hotel - scan the QR code to instantly check in for your booking and get your room key
Overview
A user can define queries with any custom logic with the Identity Query Language dashboard. Logic must be expressed in script format. The defined query will then be displayed as QR Code on the web platform. Sharering mobile users can then scan the QR code of the custom query. The query results will be displayed on the customers mobile app and the users web platform too. All query request results will be stored on the web platform too. The query is executed based on values that the mobile app provides. There are two types of values – defined values and custom information values.
- Defined value is what already exists in user’s vault by extracting uploaded documents
- Custom value is inputted manually during query running if there are no saved values in the mobile app.
1. Login
Login to the customer portal https://vql-alpha.shareri.ng/user/login by scanning the QR code with your Sharering App Scanner.
On your Sharering app after scanning the code, confirm your pin
Then, inputting security code if you did not input it yet (This security code is used to encrypt and decrypt query's result)
After inputting security code and clicking on "Create" button, the app will open screen below
2. Create your Query
Navigate back to the customer web portal and click the create button
To define your query. Fill in all the following details:
Query Name - the name of the query for reference
Query Title - the query you wish to ask
Query Code - this is basic java script which will be used to query users vaults
Use javascript code to express logic
For defined values, use the VALUE keyword. For example, VALUE("passport.number")
- age
- name
- country
- vaccination_date
- covid_test_result
- date_of_birth
- email_address
- phone_country
- phone_number
- address
- drivers_license.number
- drivers_license.issue_date
- drivers_license.expiry_date
- drivers_license.document_proof
- drivers_license.document_proof
- passport.country
- passport.number
- passport.issue_date
- passport.expiry_date
- passport.document_proof
- ShareLedger_Address
- Matic_Address
- alias_image
- Photo
- For custom values, use the CUSTOM_VALUE keyword. For example, CUSTOM_VALUE("shoe_size")Below are examples of using custom query in practical scenarios
Night Club
Purpose: Checking age
Query title: How old are you?
Query code:
return VALUE("date_of_birth");
Purpose: Check if guest is over 18 years old
Query title: Are you over 18 years old?
Query code:
if ( VALUE("age") > 18) return "Yes";
else return "No";
Purpose: Check if guest is over 18 years old and from Australia
Query title: Are you from Australia and over 18 years old?
Query code:
if ( VALUE("age") > 18 && VALUE("country").toLowerCase() === 'australia') return "Yes";
else return "No";
Skiing Resort
Purpose: Checking shoe size, helmet size,... ( custom fields )
Query title: What's your shoe and helmet size?
Query code:
```
return "shoes size:" + CUSTOM_VALUE("shoes_size") + "\n" + "helmet size: " + CUSTOM_VALUE("helmet_size");
```
Required
After entering the valid query code, the Admin can click the “Check” button to list out all fields being requested from the users vault
The Admin then selects the check box for fields they want to set as “Required” from the user. This means the user must share this information from their vault they do not have the option to not provide these data points. The fields which are not checked as required are optional i.e. the user has a choice whether or not they want to share the data points.
- Required fields: User cannot deselect
- Optional fields
- Selected fields: User will share with VQL panel
- Deselected fields: User will not share with VQL panel. With these deselected fields, it will show “Unknown” result
API endpoint - the definition for you endpoint you wish to integrate
To understand how to use this field, follow instructions below as reference
From your browser, accessing to this url - https://webhook.site/
Copy URL
Paste that URL into API endpoint field on creation query dialog, then click Submit to create query
Now, if user scans query QR, you will get result firing back to your api endpoint as below
App Color - Choose a color, you can change this at any time
3. Test your query
If you click the eye icon in the actions column you can show the qr code on a unique url path.
You can choose to have a dynamic/static code
- Dynamic: After user scans QR, query’s result will be showed on user’s app and website at the same time
- Static: After user scans QR, query’s result will be showed only on user’s app
If you take the Sharering app scanner and scan the QR code the user will have to enter their pin for confirmation and then scan the QR for the result. Click the refresh button on the webapp to view the QR code again.
After scanning successfully the QR will return the answer on the url web app and on the users app interface.
4. Edit a query
By clicking the pencil under the actions column you can edit your query how you wish. Click Submit to save the new information.
5. View query code
By clicking the paper plane icon in the actions column you have a shortcut to view the query code.
6. Delete a query
By clicking the rubbish bin in the actions column you can remove the query from your list
7. View Requests
If you navigate back to the web panel and select Requests on the left hand menu, you can review a list of all the logged scans from your code for reference.
8. Log out
By clicking on the Avatar icon on top right corner you will see a "Sign out" button
Clicking on that "Sign out" button will log out current session
NOTE:
- After logging out and signing in back, queries and query requests will still be there
9. Access Management
Click on the “Access Management” tab
Click on the “Invite” button to see the invite QR code
Send this QR code to user you want to invite to have access to the query dashboard
Note: There is one QR code per invitation. Which means after a user has scanned this QR code then it will become invalid and you will need to generate another to invite another user.
After the user has scanned successfully, they will appear on the list.
Click the “Bin” icon to remove the user from accessing the query dashboard.
Note: Invited users cannot see the admin from this list