Clause Library
The Clause Library is a per-school repository of reusable contract text snippets — refund policies, GDPR notices, photo consent paragraphs, cancellation terms — that can be dropped into any contract template via the Contract Builder.
Maintained centrally so a school's lawyer or admissions head can update standard language in one place, and have new contracts pick up the change automatically.
Where to find it
Templates → Clause Library in the sidebar. Same permission gate as contract templates (contracts.manage to edit, contracts.view to browse).
What a clause looks like
Each clause has:
| Field | Use |
|---|---|
| Name | Internal label like "Refund policy v3" |
| Category | Grouping for the palette: Fees / Privacy / Cancellation / Programme / Other |
| Body | The actual rich text (headings, lists, formatting allowed) |
| Variables | Variables the clause uses (e.g. {refund_window_days}) |
| Tags | Free-form tags for filtering |
| Status | Draft / Published / Archived |
| Notes | Internal-only comments (not rendered in contracts) |
Only Published clauses appear in the contract builder's palette. Draft clauses are work-in-progress; archived ones stay in the system for historical reference but don't appear in pickers.
Inserting clauses into a contract
Two modes, picked when you insert:
Static copy (default)
When you drag a clause into a section, it's copied inline into that section. Future edits to the library clause don't affect already-inserted copies. Each insertion is independent.
Use static for clauses that should be locked at template authoring time — once a contract template is published, the wording shouldn't change retroactively.
Linked clause
Linked clauses reference the library entry by ID. When the contract is rendered (at send time), the latest published version of the clause is pulled in.
Use linked for clauses that legitimately need to evolve: GDPR notices that update with new regulations, privacy policies that get clarified, etc. Schools using linked clauses get free updates across all templates whenever the library is updated.
Toggle "Link to library" in the section's right-rail when inserting.
Variables inside clauses
Clauses can themselves contain variables (same syntax as contract templates: {child_name}, {refund_window_days}). Variables resolve at render time using:
- Variables explicitly set on the clause (defaults)
- Variables from the linked lead
- Variables from the contract itself
Example clause body:
Cancellation may be requested in writing up to {refund_window_days} days
before the {enrolment_year_start} programme start. After this date,
the full {tuition_amount} fee is non-refundable.When inserted into a contract for lead #42, all three variables resolve to actual values.
Versioning
Every Save on a clause creates a new version. Linked clauses always pull the latest published version at render time — older versions stay accessible via the History tab for reference but don't render.
Static clauses are frozen at the version they were inserted from. If you need to update a static clause across many templates, you have to manually edit each template.
The History tab shows:
- All versions with timestamps and authors
- Diff between any two versions
- Which contracts reference which versions
- Restore to a prior version (creates a new version matching the old)
Categories + tags
Categories are a fixed list (Fees / Privacy / Cancellation / Programme / Other) and primarily drive the palette grouping in the contract builder.
Tags are free-form and let you slice the library by your own taxonomy ("toddler-only", "full-day", "GDPR", "v3-approved"). Search inside the library by tag.
Search
Top of the library page: search box. Searches:
- Name (exact + partial)
- Body text (fuzzy)
- Tags (exact)
Use to find a clause you remember by content but not by name ("the one that mentions photo consent").
Status workflow
Draft → (publish) → Published → (archive) → Archived
↗
(edit creates new version, stays Published)Drafts are visible only to clause editors. Publishing makes them available in the contract builder. Archiving hides them from the builder but keeps them in the library for retroactive contract rendering.
Archived clauses are NOT deleted — they're just hidden. If a contract template still references one (linked), it continues to render. Schools sometimes archive aggressively and then need to unarchive when an audit references an old clause.
Permissions
- View library:
contracts.view - Create / edit drafts:
contracts.manage - Publish / archive:
contracts.publish - Delete (irreversible):
contracts.manage+ must not be referenced by any contract
Most schools restrict publish to a small group (legal team, head of admissions) and let anyone create drafts.
Import / export
For schools migrating from another system, the library supports bulk JSON import:
- Format your clauses as a JSON array (schema documented in the import dialog).
- Clause Library → Import → paste JSON → preview → commit.
Each imported clause goes in as Draft for review before publishing.
For exports (backup, lawyer review, etc.): Export all dumps the full library as JSON.
Audit log entries
Library operations fire audit_logs:
clause_created— new clause draftclause_published— clause moved to Publishedclause_archived— clause archivedclause_unarchived— restored from archiveclause_updated— edit on a Published clause (creates new version)clause_deleted— irreversible deletion
Common errors
| Symptom | Likely cause |
|---|---|
| Clause not appearing in builder palette | Status is Draft or Archived. Check status. |
| Linked clause shows old text in new contract | Browser cache. Hard refresh the contract builder. |
| Library import fails 422 | JSON schema mismatch. Compare against the schema in the import dialog. |
| Delete button greyed out | Clause is referenced by an existing contract. Archive instead. |
| Variable in clause renders blank | Variable name doesn't match anything on the lead/contract. Check spelling. |
When to use clauses vs custom blocks
| Use clause | Use custom block |
|---|---|
| Reused across multiple templates | One-off content for this template |
| Legal / compliance language that needs central control | Lead-specific custom paragraph |
| Versioning + audit history matters | Expected to be edited in-place |
| Shared between schools (if multi-tenant) | Single school, single contract |
If you find yourself copy-pasting the same paragraph into 3+ templates, promote it to a clause.