In this tutorial we will cover the use of an advanced feature, the custom chips. These provide you with static data that you can use to fill in incomplete data.
First, follow along with the following video tutorial quickly explaining custom chips, then read the in depth instructions below for more information.
In depth Tutorial
The xAPI spec has a lot of requirements for valid statement design, and sometimes your raw data might be missing some information. For example, a requirement in the spec for any email is that they begin with mailto:. Let's say perhaps you imported a file that has e-mails without this prefix. You will see an error similar to this in step 3.
We see an error saying actor > mbox is not a valid mailto IRI. That error is helpful but not completely helpful, so to continue diagnosing, let's look at our template in step 2.
If we review the example in the template, we will see that our Mbox requires a mailto: component, but if we look at all of our preview rows, this never appears. We could return to our data file and add this text to every row, or we could use custom chips.
Custom chips allow you to create static data that you can use just like a data chip to add more information to your statements. To solve our problem of the missing mailto:, we can create a custom chip that includes this text and then we can add it to our Mbox property.
To begin, let us scroll down to the bottom of the page on step 2 and expand our advanced section.
For this tutorial, we will be focusing on the section Custom Data. To create a new chip, click the plus button to open the dialog window.
In the dialog menu, enter in a title for your chip and then your content that you want to have in the chip. In this case, the text we want to display is mailto:, so let's enter that.
Once you've filled out the short form, create your new chip.
Now that we have created a custom chip, a table is being displayed beneath the plus button. This table will show every chip you have made with the display chip in the header, and the content rendered below.
Custom chips can be used the exact same way as a data chip. So simply click the chip, drag it up to the Mbox property, and drop it right before the Actor.Email chip.
The Mbox property now has two chips. The content of both of these chips will be strung together to make one value, and this will make the Mbox property pass xAPI validation.
To check, let's take another look at step 3.
Looking at our previewed output this time, we will see every email is correct and our statements pass.
This is a simple but very common example to have. There will be many times in which your statements are close but missing just a little bit of information. These quick fixes can be easily achieved using custom chips.
Refer to these other resources for more information and advanced features: