Reusable Notification, Badge and AI-Prompt Libraries
Use these libraries to prepare reusable content before connecting it to a project. A library definition, its selected version, the project resource using it and a delivered message/printed badge/model response are separate states. Check the current team, ownership and actual consuming resource before editing shared content.
Find the right library
On the dashboard host, use these team-context routes:
| Library | Path | Consuming workflow |
|---|---|---|
| Notification Templates | /{team}/notification-templates | Project templates and notification schedules |
| Badge Template Library | /{team}/badge-templates | Credential types and badge printing |
| AI Prompts | /{team}/ai-prompts | Project AI interfaces |
The template library lists normally select non-project definitions owned by the team or marked public. The notification selector also supports a project context that includes that project's and its team's unscoped templates plus public templates. A filtered list or public label is not a guarantee that every mutation, version or downstream project can access that definition.
Permissions and source limitations
| Resource | Configured view/list | Configured management |
|---|---|---|
| Notification template | view_notification_templates | manage_notification_templates |
| Badge template | view_badge_templates | manage_badge_templates |
| AI prompt | view_ai_prompts | manage_ai_prompt (singular) |
Notification and badge controllers explicitly authorize the relevant template operations. Their view policies combine the required permission with public/team ownership rules. Public visibility is not permission to edit another team's content. Verify parent/version ownership and the current team for the actual route, including a denied account and an unrelated definition.
The AI-prompt catalog keys do not establish ordinary-account access: the reviewed AiPromptPolicy ability methods return false, while the global Gate hook allows super admins. Its controller authorizes HTML index/detail and mutations, but standard AJAX index/detail return before those page policy calls. This discrepancy needs deployed authorization and privacy acceptance; do not bypass a denied page by treating its JSON response as a supported permission workaround. Ask the platform maintainer to reconcile access rather than granting progressively broader ordinary roles.
Only super admins may create public AI prompts or update/delete an existing public prompt through these controller paths. Public-marked prompts can appear in other teams' selection lists; keep provider credentials, personal data and private instructions out of reusable public content. A successful list/read or save is not proof of every tenant boundary.
Prepare a notification template
- Create a named template in the intended team/library scope, selecting the actual email, SMS or push type and supported target. A notification template is not necessarily an email just because a project's entry path uses that label.
- Open the returned editor and inspect General Settings and the channel-specific content/form controls. Configure the sender and content expected by the consuming workflow. Public/library content that executes against another team's data needs special care with recipient fields and substitutions.
- Save the draft and inspect its version number, publication state and current/default selection. An edited draft is not automatically what an existing schedule sends.
- Select or copy the intended template through the project's supported configuration workflow. Confirm the selected template/version or published-default setting in the schedule.
- With agreed test recipients, verify the actual received content, substitutions, sender and channel result using the notification acceptance steps.
Opening a definition can repair an invalid current-version pointer and redirect to its latest numbered version editor. Therefore traversing every detail link is not guaranteed read-only, and the opened version need not be the one a schedule uses. Version route values resolve the parent's numbered versions; row IDs and version numbers are different identifiers. Use the platform's returned links, then verify the actual parent/version when a create redirect or older integration supplies an ambiguous identifier.
The clone service selects the latest numbered version, clears notification role/role-target linkage, creates a new definition with copied content/form and copies assets. It does not prove the clone is the source's published release, that all consuming schedules changed, or that every copied asset renders in its new context. Inspect ownership, type, recipient/sender settings, versions and asset URLs before using the copy. Clone is a real write, not a content preview.
Prepare a badge template
- Create a named library template, or choose Copy From Template when an available design is the intended starting point. Verify the copied source and resulting team/project scope.
- In General Settings, set the physical format, orientation and print DPI. In Design, configure the supported elements and data fields; use Code Editor only for a compatible renderer design.
- Preview representative data, including long names, missing optional fields and readable credential codes. Preview HTML is not evidence of physical printer/scanner readiness.
- Save the intended draft, then publish and select the current version through the offered version controls. These are separate operations. A current-version pointer alone does not establish publication or production readiness.
- Connect the appropriate project template/credential type through its supported copy/selection flow. Verify the version actually resolved by printing, then use a controlled physical badge test before a real batch.
Library detail opening also repairs a missing current-version pointer when necessary and redirects to the latest numbered editor; it is not a guaranteed read-only audit path. Inspect listing/source evidence when mutations are prohibited.
The reviewed copy helpers use the latest numbered design/settings, which can differ from a selected published version. A clone is a separate definition; it does not migrate all existing project templates or credential bindings. Verify assets, data fields, ownership and the new version's publication/current state rather than assuming a visually similar preview proves the copy is ready.
Published versions have update/delete restrictions in their version controllers. Make a new draft for design changes. The set-current endpoint is a separate parent-authorized action; verify the chosen version is the release you intended. Rolling back a template cannot reprint or recall badges already issued. See Badge Printing for the device/client, queue and physical-output boundary.
Prepare and bind an AI prompt
Use the authorized AI Prompts workflow described by the access limitations above. A prompt is a reusable record with name, description, prompt text, tags and optional settings; it is not a system model, provider credential or Developer Hub coding-agent configuration.
- Create a clearly named private prompt in the intended team. Creation assigns a generated slug when one is not supplied by the service; retain the saved identifier instead of deriving it from the name.
- Open Settings for Prompt Text, metadata, tags and the saved slug. Use the editor's save behavior and reload to verify persistence. The slug update contract accepts 8–32 characters and rejects an already-used slug. Check dependent references before changing it; no automatic migration of external slug references is established here.
- Use Prompt Wizard → Config Form for the supported substitution form settings. Its field names should match literal prompt placeholders, such as
{{greeting}}. A JSON-shaped save is not proof that the form renders or that its values reach a model. - In the project AI interface, select the intended prompt, enable its system-prompt use where supported and supply the intended substitutions. Confirm the saved interface configuration before sending any controlled content.
- Verify the effective prompt and real response/error/usage behavior through the interface's supported session path. Editing a prompt does not prove that a provider executed it, that every interface refreshes identically or that previous conversations changed.
The current interface override replaces literal {{key}} occurrences with supplied substitution values. It does not promise general template evaluation, escaping or resolution of an omitted key. Missing/extra substitutions and untrusted text need controlled acceptance; do not treat the wizard as an input-sanitization or authorization boundary. The message-job/realtime/resource paths use the override, but provider-specific behavior still follows the selected model/driver contract.
Prompt updates and deletion are ordinary record mutations, not a published-version lifecycle equivalent to notification/badge versions. The delete service detaches tags and deletes the prompt; no automatic repair of every dependent interface is established by that method. Retain and migrate dependent references deliberately before removing shared content. Use AI interface settings and response handling for substitution merge/reset, saved-message and retry boundaries.
Verify a library change
Record the source definition, owning team/project, intended consuming resource, saved/numbered version where applicable, publication/current selection, installed/bound resource and expected output. Then verify an allowed edit/read and an expected denial in the target deployment.
For copied templates, compare content, assets, data-field bindings and sender/recipient or printer format against the source. For prompt changes, check the selected prompt, effective substitutions, provider outcome and access to prior session history. Separate preview/save, queued work and final delivery or physical output. Use controlled recipients, attendees and devices; a docs build does not execute those tests.
Troubleshooting
| Observation | Check |
|---|---|
| Library item missing | Team/project context, public/owned scope, filters, feature availability and actual policy path |
| Definition opens an unexpected version | Latest numbered redirect versus published/current consumer selection; parent slug versus row ID |
| Opening a detail changed metadata | Current-version repair in the definition show controller; use read-only evidence for audits |
| Copy differs from the live design/message | Latest source version, copied assets/settings and actual consuming binding/version |
| Published content cannot be edited | Create a new supported draft; save, publish and current selection differ |
| AI-prompt access denied despite catalog grant | False-returning prompt policy, global Gate behavior and page/AJAX discrepancy; maintainer acceptance is required |
| Placeholder remains or prompt seems unchanged | Literal field name, supplied substitutions, enabled prompt use and actual saved interface/provider path |
| Removed definition breaks a project | Dependent references and owning module recovery; deleting a library record does not migrate consumers |
Source and verification scope
Reviewed against library controllers/services/policies/models, numbered template controllers, dashboard routes and selected library editor/composable components at experience-portal 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093. This guide adds no executable example or live send, print, clone, prompt/model call, publication, deletion or privacy probe. It reuses detailed notification/printing/AI contracts with their prior bounded evidence; deployed access, copied assets, final delivery/output and dependency migration remain separate acceptance. Repository docs/surface-content-libraries-review-2026-10-15.md retains source fingerprints and reader findings.