Your trigger is your first workflow item, and it may require some additional information in order to work, e.g. the name of the LX that learners need to complete to trigger the workflow:
The following triggers do not offer any additional configuration options:
- "When a user receives a notification"
The remaining triggers and their available configuration options are detailed in this article.
Standard trigger configuration options
There are three options common to most triggers. After specifying the LX Name, by expanding the Show additional options section you can specify a Store within the LRS for which the workflow will be triggered when the appropriate xAPI statement is written to it. Finally, it is also possible to extract information from the triggering xAPI statement to be stored in custom workflow variables. This is done using the Outputs section by selecting the +Add button. Define the Custom variable name and identify the JSON attribute string within the xAPI statement whose containing data should be stored in the variable.
Triggers that only have the above configuration options include:
- "When a user completes a LX"
- "When a user resumes a LX"
Triggers that have configuration options in addition to the standard options are detailed below.
Configuring the "When a user enrols in a LX" trigger
After specifying the LX Name for the trigger, if desired, expand the Show additional options section. The Criteria option allows you to specify under what enrollment circumstances this workflow will be triggered. Options for this include:
- "All enrollments"
- "Only recurrence enrollments"
- "Exclude recurrence enrollments"
Configuring the "When a user passes a LX" trigger
After specifying the LX Name for the trigger, if desired, expand the Show additional options section. This trigger is activated when an xAPI message containing the verb "passed" is detected for the named LX. Further, the activation of this workflow can be limited based on the score contained in the xAPI statement. This is done using the Score option which allows you to specify a logical operator and a score value. This sets the threshold for of values that will trigger the workflow (e.g. "is greater than or equal to 70").
Configuring the "When a user fails a LX" trigger
After specifying the LX Name for the trigger, if desired, expand the Show additional options section. This trigger is activated when an xAPI message containing the verb "failed" is detected for the named LX. Further, the activation of this workflow can be limited based on the score contained in the xAPI statement. This is done using the Score option which allows you to specify a logical operator and a score value. This sets the threshold for of values that will trigger the workflow (e.g. "is less than 70").
Customizing the "When a user passes an Adapt module assessment" trigger
The first requirement for this trigger is to specify the Assessment ID of the Adapt (Authoring) assessment that should be the source for the trigger. This can be found in two ways:
- The Assessment ID is the Assessment Name entered into the Assessment extension settings on the Article within the Authoring (Adapt) module itself.
- If you don't have access to edit the Authoring (Adapt) source module to observe the Assessment Name, the Assessment ID is specified in the xAPI "passed" statement sent to the LRS from the Adapt module. Specifically, the "en" field within the Object of the xAPI statement. For more information about creating assessments in Authoring, see the Authoring - Library Content > Assessments category here in the Help Centre.
After specifying the LX Name for the trigger, if desired, expand the Show additional options section. This trigger is activated when an xAPI message containing the verb "passed" is detected for the named LX. Further, the activation of this workflow can be limited based on the score contained in the xAPI statement. This is done using the Score option which allows you to specify a logical operator and a score value. This sets the threshold for of values that will trigger the workflow (e.g. "is greater than or equal to 70").
Configuring the "When a user fails an Adapt module assessment" trigger
The first requirement for this trigger is to specify the Assessment ID of the Adapt (Authoring) assessment that should be the source for the trigger. This can be found in two ways:
- The Assessment ID is the Assessment Name entered into the Assessment extension settings on the Article within the Authoring (Adapt) module itself.
- If you don't have access to edit the Authoring (Adapt) source module to observe the Assessment Name, the Assessment ID is specified in the xAPI "passed" statement sent to the LRS from the Adapt module. Specifically, the "en" field within the Object of the xAPI statement. For more information about creating assessments in Authoring, see the Authoring - Library Content > Assessments category here in the Help Centre.
After specifying the LX Name for the trigger, if desired, expand the Show additional options section. This trigger is activated when an xAPI message containing the verb "failed" is detected for the named LX. Further, the activation of this workflow can be limited based on the score contained in the xAPI statement. This is done using the Score option which allows you to specify a logical operator and a score value. This sets the threshold for of values that will trigger the workflow (e.g. "is less than 70").
Configuring the "When a custom xAPI statement is received" trigger
The custom xAPI trigger allows you to use your own xAPI query to create a trigger. To do this, you need to be well acquainted with the query builder in Learning Locker. If you’re not, then we suggest that you go to The Academy and take the Getting Started with Learning Locker course before continuing.
In Learning Locker, build a query that filters the xAPI statements down to only those that you would like to trigger your workflow. Then click on the <> button to swap to the plaintext query editor.
Highlight your plaintext query and copy it.
Paste it into your custom xAPI trigger in and click update.
Extracting information from your triggering statement
xAPI statements contain a lot of information. Some of that is extracted by and used to populate global variables such as first name, last name, and email address (click here to read more about global variables). You can extract additional information from a trigger statement by using JSON dot notation to specify which part of a statement you want to extract and then specifying a custom variable for it to be stored in. To do tis, click Show additional options on your trigger item:
When you add an output, you can use the drop down menu to select the custom variable and the JSON attribute section to specify which piece of information you want to retrieve.
The Json dot notation works like this:
A statement is divided into sections. A new section begins when there is an indented line and it ends when there is another line of the same or a shorter indent. For example, everything contained within the curly bracket following Statement (highlighted in orange) is the statement section. Everything in green is in the Authority, section which is a subsection of the statement section.
The JSON dot notation is essentially an address. E.g. statement.authority would tell to save all the information in green in custom variable. Each subsection becomes another dot in the address. For example, if you wanted to export the information in blue you would put statement.actor.name.
{ "stored": "2023-02-28T09:36:47.221Z", "priority": "MEDIUM", "active": true, "completedForwardingQueue": [], "failedForwardingLog": [], "client": "5de63faa60c5ab38181dc998", "lrs_id": "5de63faa60c5ab38181dc997", "completedQueues": [ "STATEMENT_QUERYBUILDERCACHE_QUEUE", "STATEMENT_FORWARDING_QUEUE", "STATEMENT_FORWARDING_PERSONA_DEPENDENT_QUEUE", "STATEMENT_PERSON_QUEUE", "STATEMENT_JOURNEY_QUEUE" ], "activities": [ "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms/home#object/720554" ], "hash": "804cc2fd579c7ef5a1b1ae1c606cfa3dfacbb365", "agents": [ "mailto:matt.watts@learningpool.com" ], "statement": { "authority": { "objectType": "Agent", "name": "New Client", "mbox": "mailto:hello@learninglocker.net" }, "stored": "2023-02-28T09:36:47.221Z", "context": { "platform": "Curatr", "contextActivities": { "grouping": [ { "id": "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms", "definition": { "type": "http://adlnet.gov/expapi/activities/course" }, "objectType": "Activity" }, { "id": "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms/learn#level/155166", "definition": { "type": "http://curatr3.com/define/type/level" }, "objectType": "Activity" }, { "id": "https://academy.thelpacademy.com", "definition": { "type": "http://curatr3.com/define/type/organisation", "name": { "en-GB": "Learning Pool Academy" } }, "objectType": "Activity" } ], "category": [ { "objectType": "Activity", "id": "http://id.tincanapi.com/activity/tags/learning-pool-lms", "definition": { "name": { "en-GB": "Learning Pool LMS" }, "type": "http://id.tincanapi.com/activitytype/tag", "extensions": { "http://curatr3.com/define/extension/tag-type": "skill" } } }, { "objectType": "Activity", "id": "http://id.tincanapi.com/activity/tags/learning-pool-lms", "definition": { "name": { "en-GB": "Learning Pool LMS" }, "type": "http://id.tincanapi.com/activitytype/tag", "extensions": { "http://curatr3.com/define/extension/tag-type": "skill" } } } ] }, "registration": "b78ef914-025a-4d24-b74a-d2e6396a065a", "extensions": { "https://streamlxp.com/extension/trigger_type": { "type": "timed", "user": { "mbox": "mailto:matt.watts@learningpool.com", "objectType": "Agent", "name": "Matt Watts (Learning Pool)" } } } }, "actor": { "mbox": "mailto:matt.watts@learningpool.com", "objectType": "Agent", "name": "Matt Watts (Learning Pool)" }, "timestamp": "2023-02-28T09:36:44+00:00", "version": "1.0.0", "id": "b809e760-d209-4288-a488-1efad60c92a9", "result": { "duration": "PT10S" }, "verb": { "id": "http://adlnet.gov/expapi/verbs/completed", "display": { "en-GB": "completed" } }, "object": { "id": "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms/home#object/720554", "definition": { "type": "http://activitystrea.ms/schema/1.0/article", "name": { "en-GB": "Adding Categories and Courses to the LMS" }, "description": { "en-GB": "A PDF user guide explaining how to add categories and courses to the Learning Pool LMS." }, "extensions": { "https://streamlxp.com/xapi/extensions/resource": { "id": "https://academy.thelpacademy.com/xapi/activity/resource/410653", "name": "Adding Categories and Courses to the LMS", "type": "PDF", "type_id": 12 } } }, "objectType": "Activity" } }, "metadata": { "https://learninglocker.net/result-duration": { "seconds": 10 } }, "hasGeneratedId": true, "deadForwardingQueue": [], "voided": false, "verbs": [ "http://adlnet.gov/expapi/verbs/completed" ], "personaIdentifier": "5e9eb86f93ce0e9fde204bdf", "processingQueues": [], "person": { "_id": "5de6ca62e8c8990bc7eeff18", "display": "Matt" }, "__v": 1, "timestamp": "2023-02-28T09:36:44.000Z", "relatedActivities": [ "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms/home#object/720554", "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms", "https://academy.thelpacademy.com/courses/adding-categories-and-courses-to-the-lms/learn#level/155166", "https://academy.thelpacademy.com", "http://id.tincanapi.com/activity/tags/learning-pool-lms" ], "relatedAgents": [ "mailto:matt.watts@learningpool.com", "mailto:hello@learninglocker.net" ], "organisation": "5ddfa9359718ae0b25399f10", "_id": "63fdcb2fa1b46706f1d1f062", "registrations": [ "b78ef914-025a-4d24-b74a-d2e6396a065a" ], "completedForwardingLog": [], "pendingForwardingQueue": [] }
Configuring the Event Management triggers
If Event Management is configured for your LXP, there are three Event Mangement triggers available:
- "When a learner attends an Event Management event"
- "When a learner registers for an Event Managment event"
- "When a learner unregisters from an Event Management event"
Each of these requires the idenitifiation of the Event URL.
Note: Event Management event triggers are not available by default. If using Event Management with the LXP, please contact Learning Pool support to have these triggers made available.
Other integrations
If you're using the Shopify integration, you can use Shopify to trigger workflows. Click here to read more about the Shopify integration.