kapi WorksDocs
Format reference

Placeholders

The words Kapi fills in when a person opens a course: the company's name, its contacts and the learner's first name.

Words can hold placeholders in braces. Kapi fills them in from the company's settings when a person opens the course. Declare each one in context in kapi-works.json: "required" when the course needs it, "optional" when it works without it.

PlaceholderDeclare in contextWhat Kapi fills in
{company.name}company.nameThe company's name, for {company.name}.
{learner.firstName}learner.firstNameThe person's first name, for {learner.firstName}, where the company switches it on.
{contacts.<key>.name}, {contacts.<key>.email}, {contacts.<key>.phone}, {contacts.<key>.url}contacts.<key>A contact the company fills in, such as contacts.it-help, for {contacts.it-help.name}, .email, .phone and .url.

A contact block shows a whole contact, by its key. Where the company hasn't filled in an optional contact, the page shows common.contact-missing.<key> from the words file instead.

Context without a placeholder

Kapi gives a course these too. Words can't name them.

KeyWhat it is
doorWhich door the person learns through: employee, partner or customer.
roleThe person's role, one of roles.

What Kapi checks

CheckSeverityWhat Kapi says
placeholder_unknownError… isn't a placeholder Kapi fills. Use {company.name}, {contacts.<key>.name}, .email, .phone, .url or {learner.firstName}.
placeholder_undeclaredErrorThese words use a placeholder, but kapi-works.json doesn't declare … in context.
placeholder_in_linkErrorA link address can't hold a placeholder. Kapi checks every address before a learner opens it.
first_name_twin_missingErrorThese words use {learner.firstName}, so they need a twin, …, for people whose first name isn't given.
contact_missing_wordErrorThis contact is optional, so write … for companies that haven't filled it in.
context_not_allowedError… can't be required for customers. Kapi never gives it in a customer door.

On this page