Skip to content

Coach modules

A coach module is a reusable building block for coach conversations — a greeting, a closing prompt, or a conditional segment — authored once and spliced into many conversations. This keeps repeated content in one place.

Follow The authoring model for parent/translations, status, slugs, and validation.

Coach module list in Directus

Parent fields

Field What it means
Slug Stable id, e.g. welcome-back-morning, optional-add-checkin. A conversation references a module by this slug (as its opening or closing module).
Type pool or conditional (see below).
Selection For a pool module, how a variant is chosen (e.g. rotate).
When predicate For a conditional module, the condition that decides whether/which content shows.

Translation fields

A module carries its content per language, in one of two shapes depending on type:

  • poolvariants: a list of alternative item-lists. The Coach picks one variant (per the selection rule) — e.g. a set of interchangeable morning greetings so the opener doesn't feel repetitive.
  • conditional (and simple modules) → items: a single list of items, shown when the predicate matches.

In both cases the items are the same chat-item types used in conversations (messages, reply chips, cards, etc. — see Coach Conversations → item types). The save-time check validates module items and every variant's items with the same rules as conversations.

How modules reach the user

A conversation names an opening module and/or closing module by slug. At play time the Coach splices the module's items in around the conversation's own items. A pool module contributes one chosen variant; a conditional module contributes its items only when its predicate matches.

What blocks a save

  • Any malformed item inside the module's items or a variant's items (same rules as conversations).
  • Renaming the slug while a translation is published (a conversation may reference it).

Where it shows up

Indirectly — module content appears inside whichever conversations reference it, at the start (opening) or end (closing) of the chat.

See also