Summary: Use the recalculation button in a journey to cause a completed statement to trigger a workflow.
workflows can only be triggered by new xAPI statements. If, however, you want to trigger a workflow based on an action/completion that learners have already achieved, there is a workaround. It involves using journeys in Data Cloud.
How to do it
Note: For this to work, you need to follow these instructions in order. If you don't, the journey completion statement may be sent before the workflow is enabled, meaning that it isn't triggered.
First, create a journey in Data Cloud. The journey should include a waypoint or waypoints related to historic actions that you would like to trigger your workflow.
For example, this waypoint checks whether they've completed the course Cyber security in the workplace. Remember, journeys will also be triggered by new completions, so if you only want your workflow to apply to previous completions you can use the when section of the query builder to specify a time frame that this journey will look for.
Make sure that you turn Send Journey Completed Statement? on.
Now complete the waypoints in your journey using a test account. You should see a completed statement for your journey appear in Data Cloud.
Use this to build a query that recognizes these completion statements.
Now copy the code so that you can use this as a workflow trigger in .
Now head over to Automation and create a new workflow. Make sure you select the trigger When a custom xAPI statement is received.
Now paste your query into the trigger.
Once you've done that, build your workflow as you would any other workflow. Once you're done and you've activated your workflow, head back to Data Cloud. Find your journey and click the recalculate button next to it.
This will check who has previously hit the criteria required to complete the waypoints. These learners will now receive completed statements for the journey, which will trigger your Automation workflow.