Scenario Session Events Related Queries
Finding Events by event and value types
This query can be used to find Scenario Session Events of one or many given types (eventTypes
argument):
CALL_CONNECT
CALL_DISCONNECT
CHECKLIST_ITEM_COMPLETE
CONTINUE_SESSION
CREATE_SESSION
END_SESSION
ENTER_SESSION
EXIT_SESSION
FINISH_SESSION
SCREENSHOT_CAPTURED
VIEW_STEP
QUIZ_COMPLETE
QUIZ_ITEM_COMPLETE
Â
Also, when querying for Events of the type CHECKLIST_ITEM_COMPLETE
, a valueTypes
argument can be passed in to specify one or many of the following:
PHOTO
NUMBER
BARCODE
YES_NO_OPTION
BOOLEAN
TEXT
QUIZ_MULTIPLE_CHOICE_2D
QUIZ_MULTIPLE_CHOICE_3D
MULTI_OPTION
MULTI_OPTION_3D
MULTI_SELECT
MULTI_SELECT_3D
QUIZ_MULTI_SELECT_2D
QUIZ_MULTI_SELECT_3D
Â
For instance, when querying for recent Events capturing a photo upload in a checklist item step:
Variables
{
"first": 10,
"eventTypes": ["CHECKLIST_ITEM_COMPLETE"],
"valueTypes": ["PHOTO"],
"orderBy": {
"attribute": "startedAt",
"direction": "DESC"
}
}
Query
query FetchRecentPhotoChecklistItemCompleteEvents(
$first: Int,
$eventTypes: [ScenarioSessionEventTypeEnum!],
$valueTypes: [ScenarioStepItemTypeEnum!],
$orderBy: SortOrderInputObject
) {
scenarioSessionEvents(
first: $first
orderBy: $orderBy
eventTypes: $eventTypes,
valueTypes: $valueTypes
) {
nodes {
id
value
photo {
fileUrl
}
}
}
}
Â
User and Session arguments to refine the query
In order to narrow down the results in the above sample query to a given User, a User id
or username
can be passed in.
Also a scenarioSessionId
can be used as a filter:
Variables
{
"first": 10,
"eventTypes": ["CHECKLIST_ITEM_COMPLETE"],
"valueTypes": ["PHOTO"],
"username": "jane.doe",
"scenarioSessionId": "sR9216ls6ww3Jp9cr4l5hpRiD8XyoEPgvT9PO--6cQC_SjkS9gitsWjSuYw1wTAf",
"orderBy": {
"attribute": "startedAt",
"direction": "DESC"
}
}
Query
Â
Â
Â