Send xAPI from a Flow

From an existing or a new Flow, you can add a Globebyte xAPI, Send xAPI action.

Select to add an Action then select xAPI from the category list then select the apex-Globebyte__XapiFlowConnector action.

The form contains a set of mandatory and optional xAPI fields. A full list of fields and their purpose can be found here.

The mandatory fields are:

FieldDescription
Actor nameHuman-readable Identifier such as the user’s name, to represent the individual or entity involved in the learning experience.

Examples:

1) “John Smith” (fixed text)
2) “{!$Record.FirstName} {!$Record.LastName}” – when constructing the name from the $User system object for a User object change trigger.
Object IdUnique identifier representing the learning content, activity, or resource being interacted with, enabling precise tracking and analysis of learner engagement.

Examples – must be a URI:

1) https://some.domain.com/object/id

If you use CIP codes you can consider them to construct your Object Id. If you use Salesforce for Education you will find the CIP codes in that schema. Product Id with commerce cloud can also be effective. The Id should be in Uri format, so a format may look like https://[my org domain]/[learning course.ClipCode]/[learning program ClipCode]
Object nameHuman-readable label or title of the learning content, activity, or resource being interacted with, aiding in understanding and contextualizing the associated learning experience.

Examples – must resolve to a text string:

1) “Learning Object Name”
2) “{!$User.customFieldName__c}” – providing the name from a custom field

Make this dynamic by obtaining the name from a Salesforce schema that matches your use case.
Verb displayHuman-readable label or description of the action or verb performed in the learning experience, aiding in understanding and interpretation of the associated activity.

Examples – must resolve to a text string:

1) “experienced”
2) “{!User.customVerbField__c}” – providing the string from a custom field
Verb IdUnique identifier assigned to the specific action or verb performed in the learning experience, facilitating accurate tracking and analysis of learner activities.

Examples – must be a URI:

1) “http://adlnet.gov/expapi/verbs/experienced”
2) “https://some.domain.com/verb/id”

You must also provide a way to identify the user, of which there there are a few methods. The most common method is by using the Actor MBox field, which is the user’s email address.

To enter, enable the MBox option and enter their email. In the example above we are using the email from the $User system object for a User object change trigger. Note that you do not need to include mailto:

Error Handling

In various use cases, you might find it necessary to handle errors, such as sending an internal email notification or altering the user experience flow. You can incorporate a standard Fault Path from the Globebyte xAPI action to efficiently manage your error handling processes. Read about error logging here.

More Information

For more information and implementation details, browse the documentation below:

Setting up Globebyte xAPI Send xAPI from a flow Form action fields Send xAPI from Apex Logging and defaults xAPIStatement class reference