Saltar al contenido principal

Customizations

A church customization is one JSON file (a "pack"). In that single file you define:

  1. Custom fields on any ChurchApps object (people, groups, funds, donations, campaigns, events and more), under objects.<objectType>.fields.
  2. Every place those fields appear: badges, details and cards on record screens, inputs on edit forms, inline forms and pop-up dialogs, table columns, and buttons that open links or copy values.

Writing a pack involves no code, no deploy and no app update. You paste or upload the JSON in Settings → Customizations (or load a starter pack and edit it). B1Admin validates it with @churchapps/customizations and won't publish it until every error is fixed, reporting each one with its exact JSON path. Packs are stored in the church's database with version history and one-click rollback.

The core rule: Fields defined in JSON never appear automatically​

Declaring a field in objects.<entity>.fields only creates the storage for it. Nothing shows up until you place it. Put each field explicitly wherever you want to see or edit it:

To...Place the field in...
Show it on a recordAn overview screen slot, e.g. screens["person.overview"].slots["identity.badges"], ["fund.overview"].slots["overview.details"], ["group.overview"].slots["overview.sections"]
Edit it with the recordAn edit screen slot: person.edit, person.create, group.edit, fund.edit, donation.edit, campaign.edit, task.edit
Edit it right on the record pageA form block inside a card, an inlineEdit block, or an openModal action that contains a form
Show it in a listA column in tables.<tableId>, e.g. people.directory, funds.list, groups.list
Use it in a link or buttonA {custom.<key>} template in an action (openUrl, copyToClipboard, navigate)

A field you declare but never place is stored and kept, but invisible. That's deliberate: you decide exactly what each screen shows.

This guide is self-contained: the rules, three complete examples you can copy, and a full reference of every screen, slot, table, block, input, action, icon and function. A JSON Schema for editor autocompletion is published at @churchapps/customizations/schema/customization.v1.schema.json.


Writing a pack​

  1. Pick an id and name. id is a permanent slug (grace-child-safety). name is what admins see.
  2. Declare your fields under objects.<objectType>.fields, each with a permanent key (bg_check_status), a label and a type.
  3. Place every field. For each one, decide where it's edited (an edit screen slot, or an inline form) and where it's shown (badges, details, cards, table columns). See the table above.
  4. Validate. Paste the JSON into Settings → Customizations → Add Pack. Errors and warnings appear as you type, each with its JSON path. You can also run npx churchapps-customizations validate my-pack.json --strict.
  5. Publish, then open a record to check it. Edit and republish any time; every version is kept, and History rolls back with one click. If a pack ever breaks a screen, turn on Safe Mode in Settings → Customizations to pause every pack in your browser.

Start from one of the examples below or a built-in starter pack (Load starter pack in the editor) rather than a blank file.

Using an AI assistant​

Because packs follow a strict, fully documented schema, an AI assistant can write or update one for you. Give it this page (copy its text, or its address if the assistant can browse) and describe what you want in plain words, for example: "Using this guide, write a B1Admin customization pack that adds a T-shirt size field to people, lets us edit it on the person edit form, and shows it as a column in the people directory." To change an existing pack, use Download .json in Settings → Customizations and give the assistant that file too.

Paste its reply into the editor. B1Admin validates it like any other pack, so if the assistant got something wrong you'll see exactly which path to fix (or you can paste the errors back to the assistant). Remind it of the core rule if a field it declared doesn't show up anywhere.


Example 1: Background Checks​

Person fields for a background check status, date and applicant id. A status badge on the person record, a button that opens the check in Protect My Ministry, a Child Safety card with an inline form to update the values, and a BG Check column in the people directory.

{
"engine": 1,
"id": "grace-background-checks",
"name": "Background Checks",
"description": "Track each person's background check, show its status, and link to Protect My Ministry.",
"version": "1.0.0",
"allowedHosts": ["app.protectmyministry.com"],
"objects": {
"person": {
"fields": [
{
"key": "bg_check_status",
"label": "Background Check",
"type": "select",
"choices": [
{ "value": "Not Started", "color": "default" },
{ "value": "Pending", "color": "warning" },
{ "value": "Cleared", "color": "success" },
{ "value": "Expired", "color": "error" }
]
},
{ "key": "bg_check_date", "label": "Background Check Date", "type": "date", "helperText": "Date the most recent check cleared" },
{ "key": "pmm_applicant_id", "label": "PMM Applicant ID", "type": "text", "validation": { "maxLength": 50 } }
]
}
},
"screens": {
"person.overview": {
"sections": { "order": ["attendance", "giving", "groups", "custom:safety"] },
"slots": {
"identity.badges": [
{
"type": "badge",
"bind": "custom.bg_check_status",
"showIf": "isNotEmpty(custom.bg_check_status)",
"colorMap": { "Cleared": "success", "Pending": "warning", "Expired": "error" }
}
],
"identity.actions": [
{
"type": "action",
"label": "View Background Check",
"icon": "VerifiedUser",
"variant": "outlined",
"action": "openUrl",
"url": "https://app.protectmyministry.com/applicants/{custom.pmm_applicant_id}",
"target": "_blank",
"showIf": "isNotEmpty(custom.pmm_applicant_id)"
}
],
"summary.top": [
{
"type": "alert",
"severity": "error",
"title": "Background Check Expired",
"text": "{person.name.first} shouldn't serve with children until a new check clears.",
"showIf": "custom.bg_check_status == 'Expired'"
}
],
"summary.sections": [
{
"id": "safety",
"type": "card",
"title": "Child Safety",
"icon": "Shield",
"children": [
{
"type": "form",
"submitLabel": "Update Screening",
"permissions": ["MembershipApi.People.Edit"],
"fields": [
{ "bind": "custom.bg_check_status", "input": "select", "grid": { "xs": 12, "sm": 4 } },
{ "bind": "custom.bg_check_date", "input": "date", "grid": { "xs": 12, "sm": 4 } },
{ "bind": "custom.pmm_applicant_id", "input": "text", "grid": { "xs": 12, "sm": 4 } }
]
}
]
}
]
}
}
},
"tables": {
"people.directory": {
"mode": "patch",
"columns": [
{
"id": "bgStatus",
"label": "BG Check",
"bind": "custom.bg_check_status",
"display": "badge",
"colorMap": { "Cleared": "success", "Pending": "warning", "Expired": "error" },
"after": "membershipStatus",
"sortable": true
},
{ "id": "bgDate", "label": "BG Check Date", "bind": "custom.bg_check_date", "display": "date", "after": "bgStatus", "defaultVisible": false }
]
}
}
}

Where each field lives:

FieldEdited inShown in
bg_check_statusThe Child Safety card's formThe identity badge, the expired alert, the BG Check column
bg_check_dateThe Child Safety card's formThe BG Check Date column (off by default; users turn it on in the column picker)
pmm_applicant_idThe Child Safety card's formThe View Background Check button's link

Example 2: Fund GL Account Codes​

Fund fields for a general-ledger code, a department and a restricted flag. Inputs on the fund edit form, a details grid and badges on the fund page, a Copy GL Code button, and three columns in the funds list.

{
"engine": 1,
"id": "grace-gl-codes",
"name": "Fund GL Account Codes",
"description": "Map each fund to a general-ledger account code and department, and flag restricted funds.",
"version": "1.0.0",
"objects": {
"fund": {
"fields": [
{
"key": "gl_account_code",
"label": "GL Account Code",
"type": "text",
"placeholder": "4010-100",
"validation": { "pattern": "^[0-9]{4}-[0-9]{3}$", "message": "Use the format 4010-100" }
},
{ "key": "department", "label": "Department", "type": "select", "choices": ["General", "Missions", "Youth", "Children", "Facilities"] },
{ "key": "restricted_fund", "label": "Restricted Fund", "type": "boolean", "defaultValue": false, "helperText": "Donor-restricted gifts" }
]
}
},
"screens": {
"fund.edit": {
"slots": {
"fields.extra": [
{ "input": "heading", "text": "Accounting" },
{ "bind": "custom.gl_account_code", "input": "text", "grid": { "xs": 12, "sm": 6 } },
{ "bind": "custom.department", "input": "select", "grid": { "xs": 12, "sm": 6 } },
{ "bind": "custom.restricted_fund", "input": "switch", "grid": { "xs": 12 } }
]
}
},
"fund.overview": {
"slots": {
"header.badges": [
{ "type": "badge", "expr": "'Restricted'", "showIf": "custom.restricted_fund == true", "defaultColor": "warning" },
{ "type": "badge", "bind": "custom.department", "showIf": "isNotEmpty(custom.department)", "defaultColor": "info" }
],
"header.actions": [
{
"type": "action",
"label": "Copy GL Code",
"icon": "ContentCopy",
"variant": "text",
"action": "copyToClipboard",
"text": "{custom.gl_account_code}",
"showIf": "isNotEmpty(custom.gl_account_code)"
}
],
"overview.details": [
{
"type": "keyValueGrid",
"columns": 3,
"items": [
{ "type": "text", "label": "GL Account Code", "bind": "custom.gl_account_code", "variant": "monospace", "emptyText": "Not set" },
{ "type": "text", "label": "Department", "bind": "custom.department", "emptyText": "Not set" },
{ "type": "boolean", "label": "Restricted", "bind": "custom.restricted_fund", "trueLabel": "Restricted", "falseLabel": "Unrestricted" }
]
}
]
}
}
},
"tables": {
"funds.list": {
"mode": "patch",
"columns": [
{ "id": "glCode", "label": "GL Code", "bind": "custom.gl_account_code", "after": "name", "sortable": true },
{ "id": "department", "label": "Department", "bind": "custom.department", "display": "badge", "defaultColor": "info", "after": "glCode", "sortable": true },
{ "id": "restricted", "label": "Restricted", "bind": "custom.restricted_fund", "display": "boolean", "trueLabel": "Restricted", "falseLabel": "", "after": "department", "align": "center" }
],
"defaultSort": { "column": "name", "direction": "asc" }
}
}
}

Example 3: Small Group Details​

Group fields for a meeting room, childcare and a curriculum link. Inputs on the group edit form, a badge and a Group Details card on the group page (placed before the members list), and a Room column in the groups list.

{
"engine": 1,
"id": "grace-small-groups",
"name": "Small Group Details",
"description": "Record each small group's room, childcare and curriculum.",
"version": "1.0.0",
"objects": {
"group": {
"fields": [
{ "key": "room", "label": "Meeting Room", "type": "text", "validation": { "maxLength": 40 } },
{ "key": "childcare_provided", "label": "Childcare Provided", "type": "boolean", "defaultValue": false },
{ "key": "curriculum_url", "label": "Curriculum Link", "type": "url", "placeholder": "https://" }
]
}
},
"screens": {
"group.edit": {
"slots": {
"fields.extra": [
{ "bind": "custom.room", "input": "text", "grid": { "xs": 12, "sm": 6 } },
{ "bind": "custom.childcare_provided", "input": "switch", "grid": { "xs": 12, "sm": 6 } },
{ "bind": "custom.curriculum_url", "input": "url", "grid": { "xs": 12 } }
]
}
},
"group.overview": {
"sections": { "order": ["custom:group-details", "members"] },
"slots": {
"header.badges": [
{ "type": "badge", "expr": "'Childcare'", "showIf": "custom.childcare_provided == true", "defaultColor": "success" }
],
"overview.sections": [
{
"id": "group-details",
"type": "card",
"title": "Group Details",
"icon": "MenuBook",
"children": [
{
"type": "keyValueGrid",
"columns": 3,
"items": [
{ "type": "text", "label": "Room", "bind": "custom.room", "emptyText": "Not set" },
{ "type": "boolean", "label": "Childcare", "bind": "custom.childcare_provided", "trueLabel": "Provided", "falseLabel": "Not provided" },
{ "type": "link", "label": "Curriculum", "bind": "custom.curriculum_url", "target": "_blank", "emptyText": "None linked" }
]
}
]
}
]
}
}
},
"tables": {
"groups.list": {
"mode": "patch",
"columns": [
{ "id": "room", "label": "Room", "bind": "custom.room", "after": "name", "sortable": true }
]
}
}
}

Built-in starter packs​

STARTER_PACKS ships twelve complete packs. Each validates with zero errors and zero warnings, and each places every field it declares. Load one from Load starter pack in the editor to read or adapt it:

Pack idWhat it does
background-checksPerson fields bg_check_status, bg_check_date and pmm_applicant_id. Adds a status badge, conditional View and Order Background Check buttons, a renewal alert after 700 days, an inline Child Safety & Screening form card, and a BG Check column in the people directory.
accounting-gl-codesFund fields gl_account_code, restricted_fund and department. Adds inputs on the fund edit form, badges and details on the fund page, and columns in the funds list.
small-group-detailsGroup fields childcare_provided, curriculum_url and meeting_notes. Adds inputs on the group edit form, a badge, a copy-link button and a details card on the group page, and columns in the groups list.
pastoral-carePerson fields baptism_date, salvation_date, care_priority and pastoral_shepherd. Adds inputs on the person edit form, a care-priority badge and a Pastoral Care card on the person page.
kids-medicalPerson fields allergies, medical_notes, emergency_contact_name, emergency_contact_relationship and emergency_contact_phone. Adds inputs on the person edit form, an Allergies badge and alert, a Call Emergency Contact button, a Medical & Emergency card, and allergy and emergency-phone columns in the people directory.
guest-follow-upPerson fields first_visit_date, how_heard, invited_by, inviter_relationship, follow_up_status, last_contact_date and next_steps. Adds inputs on the add-person and edit forms, a Follow Up menu (call, email, and a Log Follow-Up dialog), a reminder alert, a Guest Follow-Up card, and first-visit and follow-up columns in the people directory.
volunteer-onboardingPerson fields volunteer_skills, serving_frequency, unavailable_until, shirt_size, volunteer_orientation_date and volunteer_agreement_signed. Adds inputs on the person edit form, an onboarding progress card, a Volunteer Profile custom view with a quick-edit form, and skills and shirt-size columns in the people directory.
membership-leadershipPerson fields membership_class_date, membership_date, joined_by, previous_church, membership_certificate_url, leadership_role, leadership_term_start and leadership_term_end. Relabels the name prefix as Title, adds inputs on the person edit form, a role badge, term-ending alerts, a Membership & Leadership card, and member-since and role columns in the people directory.
giving-statementsPerson fields statement_delivery, statement_email and statement_addressee, and donation fields in_kind_item and receipt_requested. Adds inputs on the person and donation edit forms, statement preferences and donor-number actions on the person's giving page, and columns in the people directory, batch donations and person donations tables.
batch-depositsDonation batch fields counted_total, counted_by, verified_by, deposit_date, deposit_reference, ministry_group and reconciled. Adds a Record Count & Deposit dialog, counted/entered/difference stats and mismatch alerts on the batch page, deposit columns in the batches list, and an Offering Counting Checklist card ordered after Giving on the dashboard.
service-plan-productionPlan fields sermon_title, sermon_series, speaker, stage_setup, livestream_url and production_notes. Adds badges, a Production Details dialog, a Sermon card with inline editing and a Production Notes card on the service plan, and sermon columns in the plans list.
task-event-trackingTask fields task_priority, task_category, task_acknowledged, task_reference_url and estimated_hours, and event fields setup_needs, expected_attendance, setup_lead, facility_terms_agreed, room_condition and room_condition_notes. Adds task inputs, priority badges, an inline Acknowledged switch and priority columns in the tasks list, plus a Setup & Room Check dialog, setup details, a room-condition rating and an expected-attendance stat on events.

Rules​

validateCustomizationManifest enforces all of these:

  1. Data, not code. No JavaScript, HTML or CSS anywhere. Every dynamic value is a sandboxed expression (showIf, expr) or a template with {expression} parts.
    • Use == and !=. === and !== are syntax errors. == is strict, except that null and a missing value are equal (custom.x == null is true when x was never set).
    • No method calls. Write lower(s), not s.toLowerCase(); map(list, x => x.id), not list.map(...). Only the built-in functions exist.
  2. Unknown keys are errors, everywhere. The validator suggests the closest valid key (unknown field "colour". Did you mean "color"?).
  3. Only catalog ids. Screen ids, slot names, section ids, table ids, built-in column ids, icons, widget/input/action types and functions must come from the catalogs. Typos are errors, not silent no-ops.
  4. Declare custom fields, then place them. Put each field under objects.<objectType>.fields and read it as custom.<key>. A declared field shows nowhere until a slot, form, table column or action uses it, so place every field where it's edited and where it's shown. An undeclared custom.<key> is a warning rather than an error, because another pack may declare it.
  5. Field keys are permanent. key must match /^[a-z][a-z0-9_]*$/ (e.g. bg_check_status). Values are stored by key, so renaming a key orphans existing data. Change the label instead.
  6. Safe URLs only. openUrl actions and link/image url templates must start with a literal https://<host>, mailto:, tel: or an in-app /path. http://, javascript:, data:, vbscript:, file: and protocol-relative //host are rejected. The host must be written literally (not https://{custom.host}/).
  7. Allowlist external hosts. Every https:// host a template opens must be listed in allowedHosts as a bare host name ("app.protectmyministry.com", with no protocol, path or wildcard).
  8. Every {expression} in a URL is URL-encoded automatically. A value like a/b?c becomes a%2Fb%3Fc, so field data can never change the destination. Don't wrap values in urlEncode() inside URL templates; that encodes them twice.
  9. Every block has a type, except inputs in forms. Inside a form block's fields, and directly in edit-screen slots, an input can be written as { "bind": "custom.key", "input": "select" }. Anywhere else, inputs must sit inside { "type": "form", "fields": [...] }. Never put a form block on an edit screen, since it already has a form.
  10. Choices. select and multiSelect fields need choices. select, multiSelect and radio inputs need choices unless they bind a select field that declares them.
  11. Section cards need ids. A card in a section slot (e.g. summary.sections on person.overview) needs an id before sections.order can place it as "custom:<id>".
  12. Permissions are "<Api>.<ContentType>.<Action>" strings from KNOWN_PERMISSIONS, e.g. "MembershipApi.People.Edit". A block with permissions shows only to users who hold all of them. An unknown permission is a warning, since no user would hold it. "MembershipApi.Domain.Admin" is expanded into the individual permissions at sign-in and never appears in a user's permissions, so use the specific one you need.
  13. Valid id. The pack id must match /^[a-z0-9][a-z0-9-]*$/ and engine must be 1.

Top-Level Manifest (CustomizationManifest)​

FieldRequiredTypeDescription
engineYes1Engine version (CUSTOMIZATION_ENGINE_VERSION).
idYesstringPack slug, /^[a-z0-9][a-z0-9-]*$/. Stays the same across versions of the pack.
nameYesstringShown in Settings → Customizations.
descriptionNostringWhat the pack does.
versionNostringYour own label (e.g. "1.2.0"). B1Admin also numbers every published version.
allowedHostsNostring[]Bare host names that https:// URL templates may open.
objectsNo{ [objectType]: { fields: CustomFieldDefinition[] } }Custom fields per object type.
screensNo{ [screenId]: ScreenCustomization }Slot blocks, section layout, field overrides and custom views per screen.
tablesNo{ [tableId]: TableCustomization }Column changes per table.
$schemaNostringJSON Schema URL for editors. The engine ignores it.

Custom Fields (objects)​

"objects": {
"fund": {
"fields": [
{ "key": "gl_account_code", "label": "GL Account Code", "type": "text", "validation": { "pattern": "^[0-9]{4}-[0-9]{3}$", "message": "Use ####-###" } },
{ "key": "department", "label": "Department", "type": "select", "choices": ["General", { "value": "Missions", "color": "info" }] }
]
}
}
Field keyRequiredDescription
keyYesStable slug, /^[a-z][a-z0-9_]*$/. Must be unique per object type.
labelYesDefault label wherever the field appears.
typeYesOne of the field types below.
choicesselect / multiSelectEach choice is either "Text" or { "value": "Stored", "label"?: "Shown", "color"?: "<color>" }. Values must be unique.
placeholder, helperTextNoInput hints.
defaultValueNoInitial value for new records. It must match the type: a boolean, a number, a choice value, or an array for multiSelect.
requiredNoThe field must be filled in on edit screens.
validationNo{ min?, max?, minLength?, maxLength?, pattern?, message? }. pattern is regex source (no slashes) of at most 200 characters.
permissionsNo{ view?, edit? }. These are stricter than the object's default permissions and are enforced by the API.
sortNoOrder in generic field lists.

Field types: text, textarea, number (whole), decimal, currency, boolean, date (stored YYYY-MM-DD), dateTime, select, multiSelect, email, phone, url, rating, personRef / groupRef / fundRef (store a record id), and file.

Legacy person-field types map to these types for migration (LEGACY_PERSON_FIELD_TYPE_MAP): Textbox → text, Whole Number → number, Decimal → decimal, Date → date, Yes/No → boolean, Multiple Choice → select.

validation.pattern is a JavaScript regular expression source (no slashes or flags, at most 200 characters). Patterns that can backtrack catastrophically are rejected: a repeated group that contains another repeat or |, like (a+)+, ([a-z]+)* or (\w+\s?)+. Write ^\w+(\s\w+)*$ instead of ^(\w+\s?)+$.

Publishing a pack creates or updates its fields. They appear only where the pack places them (see the core rule). Removing a field from a pack archives the field. Its stored values are never deleted.


Screens (screens)​

"screens": {
"person.overview": {
"sections": { "order": ["custom:safety", "attendance"], "hidden": ["deliveryProblems"], "labels": { "giving": "Donations" } },
"slots": { "identity.badges": [ ... ], "summary.sections": [ ... ] },
"customViews": [{ "id": "safety", "label": "Safety", "icon": "Shield", "blocks": [ ... ] }]
},
"person.edit": {
"fieldOverrides": { "person.membershipStatus": { "label": "Status" } }
}
}
  • slots: maps a slot name to an array of blocks. Slots that a manifest doesn't fill render nothing. See Screens, slots and sections for every slot.
  • sections: order lists built-in section ids and custom:<cardId> ids in the order to show them. Sections you don't list keep their native order after the listed ones. hidden removes sections and labels renames them. Only person.overview, group.overview and dashboard have sections; sections anywhere else is an error.
  • fieldOverrides (edit screens only, e.g. person.edit): keyed by a native field path ("person.membershipStatus") or "custom.<key>". Each override is { hidden?, required?, readOnly?, label?, placeholder?, helperText?, defaultValue?, showIf? }. A field can't be both hidden and required. Overview screens have no native form to change, so fieldOverrides there is an error.
  • customViews: drill-in pages opened at ?view=custom:<id>, each { id, label, icon?, permissions?, blocks }. They're available on person.overview and group.overview.

Edit screens (person.edit, person.create, group.edit, fund.edit, donation.edit, campaign.edit, task.edit) put slot inputs inside the native form, so they save together with it. On overview screens, collect values with a form block, an inlineEdit block or an openModal action containing a form.


Blocks​

Every block accepts these common keys:

KeyDescription
idLetters, digits, - and _. Must be unique within a screen. Required for cards that sections.order places.
showIfExpression. The block renders only when it's truthy.
permissionsstring[]. The user must hold all of them.
grid{ xs?, sm?, md?, lg? }, each 1–12 (MUI Grid columns).

Display widgets​

{ "type": "<widget>", "bind": "<path>" } or { "type": "<widget>", "expr": "<expression>" }. Exactly one of bind and expr is required. link and image may use only url.

WidgetShowsExtra keys
textPlain textvariant: plain | bold | muted | monospace; copyable
badgeA colored chipcolorMap (value → color), defaultColor, variant: filled | outlined
dateA localized date
relativeDate"3 days ago" / "in 2 weeks"
ageAge in years from a date
currencyA money amount
numberA formatted number
percentPercentage points: 42 shows as 42% (not a 0–1 fraction)
booleanYes / NotrueLabel, falseLabel
emailA mailto: linkcopyable
phoneA tel: linkcopyable
linkA linkurl (URL template) or a bound url value; target
tagListChips for an array or comma-separated textcolorMap, defaultColor, variant
ratingStarsmax
progressA progress barmax (default 100)
imageAn imageurl or a bound value. An image address from an expr only loads from an in-app /path or an https:// host in allowedHosts.
markdownRendered Markdown (sanitized)
entityLinkA link to a record by identityType (required)

Every widget also accepts label (shown as a caption, or as the key in a keyValueGrid) and emptyText (shown when the value is empty). A file field shows as a link to the uploaded file (its default widget is link). A link that binds a url custom field (instead of a url template) opens whatever https:// address the field holds. The host allowlist applies only to URL templates written in the manifest, and B1Admin still rejects non-https values at runtime.

Colors: default, primary, secondary, success, warning, error, info.

Layout blocks​

TypeKeysNotes
cardtitle?, subtitle? (templates), icon?, childrenA titled card. In a section slot, give it an id.
gridspacing?, childrenChildren use their own grid spans.
stackdirection? (row | column), spacing?, children
keyValueGridcolumns? (1–4), itemsitems holds display widgets. Each item's label is the key.
statlabel, bind | expr, display?, icon?, color?, helperText?A KPI tile.
alertseverity (success | info | warning | error), title?, texttitle and text are templates.
dividerlabel?

Interactive blocks​

TypeKeysNotes
actionSee Actions.A button or link.
actionGrouplabel?, variant? (buttons | menu), icon?, actionsA row of buttons or a menu.
formtitle?, submitLabel?, fieldsAn inline form that saves the bound values of the current record. fields may contain only inputs.
inlineEditbind, input?, label?, display?, choices?, validation?, colorMap?, defaultColor?, emptyText?Shows one value with a pencil button to edit it in place.

Inputs​

{ "bind": "custom.key", "input": "<input>" } inside form.fields or an edit-screen slot. Write { "type": "input", ... } for an explicit input block.

KeyDescription
inputOne of the input types below. May be omitted when bind names a field declared in the pack or a native field: it then defaults by field type (boolean → switch, select → select, date → date, personRef → personLookup, ... see DEFAULT_INPUT_FOR_FIELD_TYPE). Required for heading, divider, infoText and undeclared fields.
bindThe value path the input edits: custom.<key> or an editable native field such as person.contactInfo.email. Not used by heading, divider or infoText. Read-only native fields can't be bound.
label, placeholder, helperText, choices, validation, required, defaultValueDefault to the bound field's definition.
readOnly, showIf, permissions, grid
textTemplate for heading and infoText, or the full consent wording of a consentCheckbox (separate from its short label).
min, max, stepFor number, slider and rating.

Input types: text, textarea, number, decimal, currency, email, phone, url, markdown, select, multiSelect, radio, checkbox, switch, yesNo, consentCheckbox, date, dateTime, rating, slider, color, file, campusSelect, personLookup, groupLookup, fundLookup, and the layout-only heading, divider and infoText.

An input that doesn't suit its field's type is a warning, for example a date input bound to a boolean field. Booleans take switch, checkbox, yesNo, consentCheckbox, select or radio. personRef fields take personLookup, groupRef takes groupLookup, and fundRef takes fundLookup.


{
"type": "action",
"label": "View Background Check",
"icon": "VerifiedUser",
"variant": "outlined",
"color": "primary",
"action": "openUrl",
"url": "https://app.protectmyministry.com/applicants/{custom.pmm_applicant_id}",
"target": "_blank",
"showIf": "isNotEmpty(custom.pmm_applicant_id)",
"permissions": ["MembershipApi.People.View"],
"confirm": { "title": "Leave B1Admin?", "message": "Open {person.name.display} in PMM?", "confirmLabel": "Open" }
}
actionRequired keysBehavior
openUrlurlFills the URL template (every {expr} is URL-encoded), checks it with isSafeActionUrl, and opens it. target is _blank (opened with rel="noopener noreferrer") or _self.
navigatetoIn-app navigation to a path template that starts with a single /, e.g. "/people/{person.id}?view=custom:safety".
copyToClipboardtextCopies the filled template and shows a confirmation.
openModalmodal: { title, maxWidth?, blocks }Opens a dialog with any blocks, including a form.
startWorkflowworkflowIdEnrolls the current person in a workflow. Works on person screens and tables only.
triggerWebhookwebhookKeySends a customization.action event with the current record to the webhook whose id or name is webhookKey (Settings → Developer → Webhooks). It runs through the server, so no secrets reach the browser. It needs a record, so it isn't allowed on dashboard.

Other keys: variant (contained | outlined | text | link | icon; icon requires icon), color (primary | secondary | success | warning | error | info | inherit), icon (from Icons), and confirm ({ title, message, confirmLabel? }, where message is a template). A key that belongs to a different action type is an error, e.g. to on an openUrl.

URL rules:

URL starts withAllowed?
https://<literal host>Yes, if the host is in allowedHosts
mailto:, tel:Yes
/path (in-app)Yes
{expression} (no literal prefix)No. The destination can't be checked.
https://{expression}No. The host must be literal.
http://, //host, javascript:, data:, vbscript:, file:, anything elseNo
Anything containing \ (e.g. /\evil.com, /foo\bar)No. Browsers read \ as /.
https://user:pass@hostNo

Tables (tables)​

"tables": {
"funds.list": {
"mode": "patch",
"columns": [
{ "id": "glCode", "label": "GL Code", "bind": "custom.gl_account_code", "after": "name", "sortable": true },
{ "id": "restricted", "label": "Restricted", "bind": "custom.restricted_fund", "display": "boolean", "after": "glCode" },
{ "id": "taxDeductible", "label": "Tax Status" }
],
"defaultSort": { "column": "name", "direction": "asc" },
"rowActions": [
{ "type": "action", "label": "Ledger", "icon": "Receipt", "variant": "icon", "action": "navigate", "to": "/donations/funds/{row.id}" }
]
}
}
  • mode: "patch" (the default) keeps the built-in columns. List a built-in column id to override its label, display, width, align, sortable or hidden, or to move it. List a new id with bind or expr to add a column. New columns are added before the trailing system columns (edit, actions, deleteOption) unless before/after places them. Moves run in list order and may reference columns added later in the list.
  • mode: "replace" shows exactly the listed columns in the listed order. A listed built-in id keeps its native rendering. before and after are ignored.
  • Column keys: id, label, bind | expr, display (any display widget; defaults to the bound field's widget, so a bound select is a badge and a bound boolean is boolean), colorMap / defaultColor (badge / tagList), url + target (link), trueLabel / falseLabel (boolean), max (rating / progress), entityType (entityLink), width (pixels or a CSS length such as "120px" or "15%"), align (left | center | right), sortable, hidden (removed entirely), defaultVisible (false means it's offered in the column picker but off by default), before / after, permissions, and exportable (included in CSV export; the default is true).
  • Row scope: row (and the object name, e.g. person, which is the same record), custom (the row's custom values), user and church.
  • Users can still show and hide columns themselves. Reset to church default returns them to the manifest's layout.

Expressions & Templates​

Names in scope​

WhereNames
Screen with a record (e.g. person.overview)<objectType> (e.g. person), custom, user, church
dashboarduser, church
Tables (columns, rowActions)row, <objectType>, custom, user, church

user is the signed-in user (user.id, user.firstName, user.lastName, user.email, user.personId). church is the current church (church.id, church.name, church.subDomain). Reading an unknown name is an error. Reading an unknown native path (e.g. person.contactInfo.emial) is a warning.

Syntax​

  • Literals: 'text', "text", 12, 1.5, true, false, null, arrays [a, ...b] and objects { a: 1, ...c }.
  • Paths: person.name.first, custom.bg_check_status, row['id'], items[0].
  • Operators: !, unary -, *, /, %, + (adds numbers, otherwise joins text), -, <, >, <=, >=, ==, !=, &&, ||, ??, ? :, and parentheses. <, >, <= and >= are false when either side is empty (null, missing, ''), so age(person.birthDate) < 18 is false for someone without a birth date.
  • Lambdas: x => x.id and (x, i) => i. They work only as arguments to map, filter and find.
  • Not allowed: ===, !==, =, method calls, __proto__, prototype and constructor. Expressions are limited to 200 levels of nesting and 2,000 characters.
  • Every evaluation has a budget: 10,000 steps, 200 levels of nesting at run time (including recursion through lambdas), 50,000 characters of built text and 5,000-item lists. An expression that exceeds it fails, which hides a showIf block instead of freezing the screen.

Templates​

Text props embed expressions in braces: "Last cleared on {formatDate(custom.bg_check_date)}.". These props are templates: alert title and text, card title and subtitle, stat helperText, the text of heading / infoText / copyToClipboard, modal title, confirm message, url and to. Missing values render as empty text. In url and to, every value is URL-encoded.

Built-in functions​

FunctionDescription
daysSince(date)Whole days from date until today (null if empty).
daysUntil(date)Whole days from today until date.
age(date)Whole years since date, e.g. age(person.birthDate). null if empty, invalid or in the future.
yearsSince(date)Whole years elapsed since date, e.g. yearsSince(custom.baptism_date). null if empty; negative for future dates.
today()Today's local date as 'YYYY-MM-DD'.
formatDate(date, format?)short (default), long, iso, monthDay, monthYear or dateTime. YYYY-MM-DD values (and the API's midnight-UTC form, YYYY-MM-DDT00:00:00.000Z) are local dates, so they never shift a day.
formatCurrency(amount, code?)e.g. $1,234.50 (default USD).
formatNumber(n, decimals?)e.g. 1,234.
lower(s), upper(s), trim(s)Text case and whitespace.
concat(a, b, ...)Joined text. If the first argument is an array, returns one combined array.
coalesce(a, b, ...)The first value that isn't null, missing or ''.
includes(listOrText, value)Membership or substring test.
len(v)Length of a list or text, or the number of keys in an object. List functions also accept a JSON-encoded list such as a raw multiSelect value '["a","b"]'.
map(list, x => ...), filter(list, x => ...), find(list, x => ...)List helpers. find returns null when nothing matches.
join(list, sep?), split(text, sep?)The default separator is ', ' for join and ',' for split (parts are trimmed).
replace(text, search, replacement)Replaces every occurrence. Plain text, not regex.
startsWith(text, prefix), endsWith(text, suffix)
abs(n), round(n, decimals?), min(...), max(...)min and max also accept a list.
toNumber(v), toString(v)toNumber returns null when the value isn't a number. toString turns null into ''.
urlEncode(v)encodeURIComponent. Not needed inside URL templates.
isEmpty(v), isNotEmpty(v)Empty means null, missing, blank text, [] or {}.

Common patterns​

isNotEmpty(custom.pmm_applicant_id)
custom.bg_check_status == 'Cleared' && daysSince(custom.bg_check_date) > 700
includes(['High', 'Urgent'], custom.care_priority)
coalesce(person.name.nick, person.name.first) + ' ' + person.name.last
custom.restricted_fund ? 'Restricted' : 'Unrestricted'

Combining Packs​

A church can enable several packs, for example Background Checks, Accounting GL Codes and a church-specific overrides pack. mergeCustomizationManifests combines them in their stored order, and later packs win conflicts:

  • allowedHosts are combined (union).
  • Fields merge by key, with the later definition replacing the earlier one.
  • Slots concatenate: each pack's blocks are appended.
  • sections: a later order replaces an earlier one, hidden lists are combined, and labels merge.
  • fieldOverrides merge property by property.
  • customViews merge by id.
  • Tables in patch mode compose column by column, so a later pack can hide or move a column an earlier pack added. A later replace table discards earlier columns. defaultSort takes the last value given. rowActions accumulate and are replaced by id.

Catalogs​

Objects and native fields​

Object typeLabelDefault view / edit permissionNative fields (* = read-only)
personPersonMembershipApi.People.View / MembershipApi.People.Editperson.id, person.name.display, person.name.first, person.name.middle, person.name.last, person.name.nick, person.name.prefix, person.name.suffix, person.contactInfo.email, person.contactInfo.workEmail, person.contactInfo.mobilePhone, person.contactInfo.homePhone, person.contactInfo.workPhone, person.contactInfo.address1, person.contactInfo.address2, person.contactInfo.city, person.contactInfo.state, person.contactInfo.zip, person.membershipStatus, person.gender, person.birthDate, person.maritalStatus, person.anniversary, person.photo, person.householdId, person.householdRole, person.campusId, person.school, person.grade, person.graduationDate, person.employer, person.nametagNotes, person.donorNumber, person.inactiveReason, person.inactiveDate, person.optedOut, person.child, person.dateAdded, person.userId*
householdHouseholdMembershipApi.People.View / MembershipApi.People.Edithousehold.id*, household.name
groupGroupMembershipApi.People.View / MembershipApi.Groups.Editgroup.id, group.name, group.categoryName, group.memberCount, group.about, group.photoUrl, group.tags, group.meetingTime, group.meetingLocation, group.campusId, group.joinPolicy, group.trackAttendance, group.parentPickup, group.printNametag, group.capacity, group.minGrade, group.maxGrade, group.archived*, group.confidential, group.slug
groupMemberGroup MemberMembershipApi.Group Members.View / MembershipApi.Group Members.EditgroupMember.id, groupMember.personId, groupMember.groupId, groupMember.leader, groupMember.joinDate, groupMember.person.name.display, groupMember.person.contactInfo.email, groupMember.person.contactInfo.mobilePhone
fundFundGivingApi.Donations.View / GivingApi.Donations.Editfund.id*, fund.name, fund.description, fund.taxDeductible, fund.visible
donationDonationGivingApi.Donations.View / GivingApi.Donations.Editdonation.id, donation.batchId, donation.personId, donation.donationDate, donation.amount, donation.currency, donation.method, donation.methodDetails, donation.notes, donation.memo, donation.status, donation.person.name.display
donationBatchDonation BatchGivingApi.Donations.View / GivingApi.Donations.EditdonationBatch.id, donationBatch.name, donationBatch.batchDate, donationBatch.status, donationBatch.closedDate, donationBatch.donationCount, donationBatch.totalAmount
campaignCampaignGivingApi.Donations.View / GivingApi.Donations.Editcampaign.id*, campaign.fundId, campaign.name, campaign.description, campaign.goalAmount, campaign.startDate, campaign.endDate, campaign.showPublic, campaign.allowSelfPledge
eventEventContentApi.Content.Edit / ContentApi.Content.Editevent.id, event.groupId, event.title, event.description, event.start, event.end, event.allDay, event.visibility, event.registrationEnabled, event.capacity, event.waitlistEnabled, event.registrationOpenDate, event.registrationCloseDate, event.tags, event.photoUrl
planPlanMembershipApi.Plans.Edit / MembershipApi.Plans.Editplan.id, plan.name, plan.ministryId, plan.campusId, plan.serviceDate, plan.notes, plan.signupDeadlineHours, plan.showVolunteerNames
taskTaskDoingApi.Tasks.View / DoingApi.Tasks.Edittask.id, task.taskNumber, task.taskType, task.title, task.status, task.dateCreated, task.dateClosed, task.dueDate, task.associatedWithType, task.associatedWithId, task.associatedWithLabel, task.assignedToType, task.assignedToId, task.assignedToLabel, task.createdByLabel
songSongMembershipApi.Plans.Edit / ContentApi.Content.Editsong.id*, song.title, song.artist, song.album, song.language, song.releaseDate, song.seconds, song.thumbnail
campusCampusMembershipApi.People.View / MembershipApi.Settings.Editcampus.id*, campus.name, campus.address1, campus.address2, campus.city, campus.state, campus.zip, campus.timezone, campus.website

Screens, slots and sections​

Screen idScreenRecordEdit screenSlotsBuilt-in sections
person.overviewPerson recordpersonNoidentity.header — Under the person's name in the identity card
identity.badges — Chips beside the membership status in the identity card
identity.details — Extra rows in the identity card's contact details
identity.actions — Buttons at the bottom of the identity card
summary.top — Above the summary cards (alerts, banners)
summary.sections (section slot) — Cards among the summary sections; give each card an id to order it with custom:<id>
summary.bottom — Below the summary cards
attendance, giving, groups, notes, deliveryProblems, documents, forms, requests, tasks
Supports customViews
person.editEdit personpersonYesbefore.name — Inputs above the name fields
after.contact — Inputs after the contact fields
after.demographics — Inputs after membership status, birth date, gender and other demographics
custom.sections — Extra cards of inputs at the end of the form
actions — Buttons beside Save / Cancel
—
person.createAdd personpersonYesfields.extra — Inputs after the built-in name and email fields—
person.givingPerson givingpersonNoheader.actions — Buttons in the giving header
summary.top — Above the donation list
summary.bottom — Below the donation list
—
group.overviewGroup recordgroupNoheader.badges — Chips beside the record title
header.actions — Buttons in the record header
overview.top — Above the group overview
overview.sections (section slot) — Cards among the overview sections; give each card an id to order it with custom:<id>
overview.bottom — Below the group overview
members, sessions, calendar, health, notes
Supports customViews
group.editEdit groupgroupYesfields.extra — Inputs after the built-in group fields
custom.sections — Extra cards of inputs at the end of the form
—
fund.overviewFund recordfundNoheader.badges — Chips beside the record title
header.actions — Buttons in the record header
overview.top — Above the fund's donations
overview.details — Key/value details under the fund name
overview.bottom — Below the fund's donations
—
fund.editEdit fundfundYesfields.extra — Inputs after the built-in fund fields—
donationBatch.overviewDonation batchdonationBatchNoheader.actions — Buttons in the batch header
summary.top — Above the batch's donations
summary.bottom — Below the batch's donations
—
donation.editEdit donationdonationYesfields.extra — Inputs after the built-in donation fields—
campaign.overviewCampaign recordcampaignNoheader.badges — Chips beside the record title
header.actions — Buttons in the record header
overview.top — Above the pledge progress
overview.bottom — Below the pledge progress
—
campaign.editEdit campaigncampaignYesfields.extra — Inputs after the built-in campaign fields—
plan.overviewService planplanNoheader.badges — Chips beside the record title
header.actions — Buttons in the record header
overview.top — Above the plan's items and teams
overview.bottom — Below the plan's items and teams
—
task.overviewTasktaskNoheader.badges — Chips beside the record title
header.actions — Buttons in the record header
details.extra — Extra rows in the task details
overview.bottom — Below the task conversation
—
task.editEdit tasktaskYesfields.extra — Inputs after the built-in task fields—
dashboardDashboard—Notop — Above the dashboard cards
sections (section slot) — Cards among the dashboard cards; give each card an id to order it with custom:<id>
bottom — Below the dashboard cards
plans, tasks, groups
event.overviewEventeventNoheader.actions — Buttons in the event header
details.extra — Extra rows in the event details
overview.bottom — Below the event details
—
registrations.overviewEvent registrationseventNoheader.actions — Buttons in the registrations header
summary.top — Above the registration list
summary.bottom — Below the registration list
—

Only screens with built-in sections (or a section slot) accept sections; on the others it's an error rather than a silent no-op.

Tables​

Table idTableRowsBuilt-in column ids
people.directoryPeople directorypersonphoto, displayName, lastName, firstName, middleName, address, city, state, zip, email, phone, birthDate, birthDay, age, gender, grade, school, membershipStatus, donorNumber, campus, maritalStatus, anniversary, nametagNotes, dateAdded, deleteOption
groups.listGroupsgroupname, memberCount, actions
group.membersGroup membersgroupMemberphoto, name, leader, email, phone, actions
funds.listFundsfundname, taxDeductible, edit
fund.donationsFund donationsdonationdate, donor, batch, amount
donations.batchesDonation batchesdonationBatchname, batchDate, donationCount, totalAmount, status, edit
donations.batchItemsBatch donationsdonationdonor, date, method, memo, notes, amount, edit
person.donationsPerson donationsdonationdate, batch, method, fund, notes, amount
campaigns.listCampaignscampaignname, fund, startDate, goal, pledged, given, progress, edit
tasks.listTaskstasktitle, associatedWith, assignedTo, opened, status
plans.listService plansplanname, serviceDate, serviceOrder, actions
registrations.listEvent registrationseventname, email, status, registeredDate, actions

Icons​

Add, Assignment, AttachMoney, AutoAwesome, Badge, Block, Bolt, Bookmark, Cake, CalendarMonth, Call, Campaign, CheckCircle, ChildCare, Church, Close, Cloud, ContentCopy, CreditCard, Delete, Description, Download, Edit, Email, Error, Event, Favorite, Flag, Folder, Group, Groups, Handshake, Help, History, Home, Info, Label, Launch, Link, LocalHospital, LocationOn, Lock, MenuBook, Message, MusicNote, Notes, Notifications, OpenInNew, People, Person, Phone, Print, Receipt, Schedule, School, Search, Security, Send, Settings, Share, Shield, Star, Sync, Task, ThumbUp, Upload, VerifiedUser, Visibility, VolunteerActivism, Warning, Webhook, Work


Validating & Testing​

Validate before publishing (or before handing AI-written JSON to an admin). Fix every error (publishing is blocked) and every warning.

# CLI (installed with the package)
npx churchapps-customizations validate my-pack.json # human-readable, exits 1 on errors
npx churchapps-customizations validate my-pack.json --strict # also fails on warnings
npx churchapps-customizations validate my-pack.json --json # full result + impact summary
import { validateCustomizationManifest, summarizeManifestImpact } from "@churchapps/customizations";

const result = validateCustomizationManifest(JSON.parse(text));
// { valid, errors: [{ path, message, severity }], warnings: [...] }
for (const e of result.errors) console.log(`${e.path}: ${e.message}`);
// e.g. screens['person.overview'].slots['identity.actions'][0].url: host "evil.com" isn't in allowedHosts; add "evil.com" to the manifest's "allowedHosts"

console.log(summarizeManifestImpact(manifest, previousVersion).summaryLines);
// ["+3 custom fields on Person", "Customizes Person record (10 blocks in 4 slots, section layout)", "People directory table: +2 columns", ...]