Creating your first xAPI Action Flow
Last updated
Last updated
Now that your setup is complete, you are about to create your first Salesforce Flow with integrated xAPI Actions. Following this process exactly as described below will give you a good high-level understanding of how the application functions.
For this example we will use Salesforce Chatter as a convenient endpoint to demonstrate an xAPI triggered Action Flow.
Our Aim is to send all inbound xAPI Verbs to a chatter stream.
We will first create a Salesforce Flow that will go on to send a message to Chatter when the xAPI triggered event is fired.
From the Salesforce Setup screen, use Quick Find to locate “Flows”:
Open the Flows app and select to create a New Flow:
Select to "Use a Template", and select Next:
Select "xAPI Actions Handler Base Flow" and select Create:
This base handler receives and processes xAPI statements from your connection.
Note that when you save it, you must call it xAPI Actions Handler
This is an Autolaunched Flow that will be called when an xAPI statement arrives.
Select the plus sign to add an Action and select the Chatter post action:
If you have not used Chatter before, the quickest way to post is to post to yourself. You do this by entering in your username, which you can get from your settings page, then enabling Target Type and entering the text user
in the field:
Now you need to decide what to post. You want to post only the Verb Id of inbound statements for this simple demonstration.
Select the Message field so that the Resources drop down selector appears. It is here that you will find the xAPI statement data:
Select statementData then select xapiVerb
Then select id
Finally you need to save and enable your flow.
When you save the flow, you must call it xAPI Actions Handler Flow
otherwise it will not be triggered. By default it will want to save it as "xAPI Actions Handler Base Flow" because it has come from the template. You should also select the Source Template as "xAPI Actions Handler Base Flow" as Salesforce will not do this automatically:
Once you have saved the flow, Activate it by selecting the button in the top menu.
If you have had your LRS connected all this time (if not, do that now), switch over to Chatter to see the Experience verb id posts in your Chatter posts view:
You have completed your first test flow.