This is similar to Get Score and Get Completion Status, but it allows you to retrieve a wider selection
of information from a wider selection of xAPI statement types. If you’re not familiar with xAPI statements and the LRS, we recommend reading these guides.
You need to specify the Verb and Activity ID so that the workflow knows which statements to search for. Click here to read our guide to which statements Learning Pool products send. If you are looking for something different, please contact support as this may not yet be documented.
You can find the Activity ID by finding another xAPI statement that’s related to the object you want to reference. For example, if you want to look up whether the learner has previously completed their Cybersecurity training, you would set the verb to “completed”. To get the activity ID, you open your LRS or xAPI Data Manager and search for statements relating to the Cybersecurity training and locate the activity ID within that statement.
The Activity ID can be found in Statement / Object / ID in an xAPI statement. These sections of a
statement are nested inside each other by indents. So, to find Statement / Object / ID, you first want
to find where Statement is indented.
Click Show additional options to specify that the statements have to be from a certain period of time or must be from a specific LRS store.
Information from the retrieved xAPI statement can then be used as outputs in custom variables in the same way as they can in other workflow items.
Checking if something has NOT happened
You may wish to check if something has not happened i.e. a learner has not left a comment on an object. You can use the 'Get custom xAPI statement' node and a 'Condition' node together and check whether a Timestamp is return when the 'Get' is done.
Here is an example to explain this further. Let's say you want a generic workflow that nudges learners on ANY learning experience if they have not completed it within 30 days of being enrolled.
Your workflow could look like this:
Your 'When a custom xAPI statement is received' trigger query would look like this:
{
"$and": [
{ "$comment": "{\"criterionLabel\":\"D\",\"criteriaPath\":[\"statement\",\"verb\"]}",
"statement.verb.id": {
"$in": ["http://activitystrea.ms/schema/1.0/join"]
}
}
]
}
If you are unsure how to retrieve a query like this, take a read of 'Configuring the "When a custom xAPI statement is received" trigger' on this guide as you can easily copy-paste this from your LRS / xAPI Data Manager.
Your 'Get custom xAPI statement' node would look like this so that your workflow is 'getting' any 'completed' xAPI statements from the LRS that are related to the learner and the learning experience they were enrolled to (the TriggerObjectUrl global variable is used to identify this in the 'Activity ID'):
Note how you are looking for statements in the previous month. This is to cover the 'Delay' period of 30 days.
It is good practice to use a 'Date period' even if you have no 'Delay' node to remove any issues with the xAPI statement you are checking for in the 'Get custom xAPI statement' node reaching the LRS after the xAPI statement that was the original workflow trigger. This can happen due to the way that xAPI statements are processed.
In the Outputs section, use a custom variable such as 'Completion timestamp' to store data from the 'completed' xAPI statement so that we can use that timestamp later.
Now we are ready to do the clever logic...
Because we want to do nudge our learner when they have NOT completed the LX they were enrolled to after 30 days, our 'Condition' node looks like this:
Because there is no 'completed' xAPI statement found by the 'Get' node, the 'Completion timestamp' variable is null or empty and so the false path is followed and we email the user to nudge them.
If you have any questions on how to do this, please contact our support team.