Configuration of check flows
There are several parameters you can use to customize the users' experience during the check flows. All of these are parameters you can either pass from the URL of the parent page or programmatically from the authentication flow.
This document will take https://webapp.class2.xund.solutions
as an example for the address of the embedded XUND Web App.
Age and gender
It is possible to pass the user’s age, gender, or both to a check as a parameter. The Web App will skip the check’s first, second, or first two questions respectively if the values are passed.
From the parent page
Pass only the age parameter like this:
https://webapp.class2.xund.solutions/?birth=1990-01-01
(by passing the birth date of the user in the following format:YYYY-MM-DD
)Pass only the gender parameter like this:
https://webapp.class2.xund.solutions/?gender=male
(orfemale
for female users, only these two values are supported)Pass both age and gender like this:
https://webapp.class2.xund.solutions/?birth=1990-01-01&gender=male
Programmatically
By changing the following line(s) from these
const birth = wrapperSearchParams.get('birth')
const gender = wrapperSearchParams.get('gender')
to these (or similarly)
const birth = '1990-01-01'
const gender = 'male'
in the frontend-auth.js file (as called in the authentication guide).
Direct check
It is possible to pass a check type as a parameter to start a check with the corresponding check type. The Web App will skip the welcome page and immediately start the check.
From the parent page
Pass the check type parameter like this: https://webapp.class2.xund.solutions/?directCheck=SYMPTOM_CHECK
(or ILLNESS_CHECK
to start an illness check, only these two values are supported)
Programmatically
By changing the following line from this
const directCheck = wrapperSearchParams.get('directCheck')
to this (or similarly)
const directCheck = 'SYMPTOM_CHECK'
in the frontend-auth.js file (as called in the authentication guide).
Check ID
It is possible to pass a previously started, but not yet finished check’s ID as a parameter to continue it. The Web App will either show an error message in case the check doesn’t exist or if it is already finished, or will restore its state completely.
From the parent page
Pass the check ID parameter like this: https://webapp.class2.xund.solutions/?checkId=20354d7a-e4fe-47af-8ff6-187bca92f3f9
(the format must be a valid UUID)
Programmatically
By changing the following line from this
const checkId = wrapperSearchParams.get('checkId')
to this (or similarly)
const checkId = '20354d7a-e4fe-47af-8ff6-187bca92f3f9'
in the frontend-auth.js file (as called in the authentication guide).
External ID
It is possible to pass an external ID as a parameter to get it back in the callback’s payload when the check is finished and the callback is triggered. The callback’s URL can be set in the Client Hub.
From the parent page
Pass the external ID parameter like this: https://webapp.class2.xund.solutions/?state=20354d7a-e4fe-47af-8ff6-187bca92f3f9
(the format must be a valid UUID)
Programmatically
By changing the following line from this
const state = wrapperSearchParams.get('state')
to this (or similarly)
const state = '20354d7a-e4fe-47af-8ff6-187bca92f3f9'
in the frontend-auth.js file (as called in the authentication guide).