Skip to main content
Version: v1 (Current)

Plan Templates and Application

An Experience Plan provisions resources into a project. The current platform has two application engines: legacy JSON instructions and database-backed template items. New Developer Hub plans use database-backed items. The stored is_legacy value selects the engine; the formats and their guarantees differ.

Use Experience Plans for authoring and AI worklists, and Create and Configure a Project for installation. This reference describes the template contract, not production deployment or recovery procedures.

Choose the format​

AspectDatabase-backed templateLegacy JSON template
Storageplan_template_items rowsPlan's template array
Hierarchyparent_idNested dependencies arrays
Item conditioncondition_paramsconditionParams
Explicit prerequisitedepends_on identifier listNo equivalent ordering engine
Execution orderParent and explicit dependencies first, stable tree order otherwiseSequential array order, then each item's children
Service fieldsservice_class, service_method, service_paramsservice, method, params
Unresolved required referenceSelected reference/generated cases skip the item and dependentsNo equivalent general skip/audit contract
Service restrictionsConfigured class/method allowlistLegacy path does not apply that typed allowlist

In Template, legacy plans expose Convert to template items. Conversion clears existing database-backed items, imports the JSON hierarchy and switches is_legacy off inside a transaction. Keep a copy and test the converted result: this is a change of application engine, not proof of equivalent runtime behavior. The old JSON remains stored but is no longer the selected engine.

The import/export helper uses the legacy-shaped hierarchy and does not preserve depends_on. Do not use it as a complete backup/round trip for an explicitly ordered database template. Preserve the database-backed fields and verify dependencies after any migration.

Database-backed item contract​

The Developer Hub template-item endpoints accept the following fields. The plan and item ownership checks scope edits to the owning team and plan.

FieldMeaning
typeItem-type key, such as groups, pages, portals or service_method
identifierOutput name used by generated values and explicit prerequisites. The authoring service creates one when omitted; use stable, distinct names for referenced items
parent_idAnother item in the same plan; null for a root item
dataOrdered array of column/value-source definitions
condition_paramsConditions gating the item against the target project
depends_onIdentifiers that must have generated before this item runs
sort_orderOrdering among otherwise eligible items
Service fields / optionsUsed by a service-method item; described below

The parent supplies the relationship context: root groups are created through the project's groups() relationship, while widget children are created through their generated portal. A generated value is a reference to output, not itself an ordering edge. Add an explicit prerequisite when the relationship tree does not establish the needed order.

Authoring validates submitted explicit prerequisites for unknown identifiers, self-reference and dependency cycles. Still inspect structural changes and imported/directly persisted rows: bypassing the authoring service is not equivalent validation. The runtime is not a substitute for a valid template graph.

Built-in and custom item types​

The built-in catalog includes pages, portals, widgets, dashboards, tiles, groups, savedSearches, locations, attendeeTypes, credentialTypes, forms, games, agendaItems, socialStreams, aiInterfaces, portalPages, domains and service_method.

CompositionImportant behavior
PagesInstall a library page into the project; configure its resource/dependency bindings separately
PortalsReference a theme and can contain widgets, page links and domains
Portal page linksLink a generated ProjectPage; the built-in type uses ProjectPage as its fixed model type. It does not provide a native-form route item. Path defaults to the generated page's slug
Dashboards/tilesDefault-dashboard application can update the project's existing default dashboard. Tile values include optional grid placement
DomainsCombines subdomain and top-domain values directly; include the separator in the chosen values. This relationship target does not run the full domain reservation/readiness service

Use portal configuration for hostname readiness, authentication and actual route controls. A created domain row is not proof of DNS, certificate or supported reservation handling.

Active global and owning-team item definitions extend the registry. Team definitions can override catalog keys; they cannot declare service targets, which are restricted to global definitions. Application loads definitions from the plan's owning team, while value/reference resolution uses the target project's team. Unknown keys fall back to relationship creation and fail if the actual parent lacks a suitable relationship. Use vetted catalog types instead of assuming arbitrary strings are supported resources.

Data and value sources​

Each data definition supplies a column. A literal supplies value; a dynamic definition adds type and its configuration. A definition can include conditionParams and ordered fallbacks. The resolver uses the first non-null result: false, 0 and an empty string are not null fallbacks. After resolution, known fields with null/empty-string values receive their catalog default or have that column omitted when no default exists.

SourceConfiguration and result
LiteralOmit type or use literal; returns value
metadatakey names a target-project metadata field; displayed as User Input
generatedvalue.identifier and value.key read an output field from this run
referencevalue.model and value.id select a supported accessible library record; optional field selection returns a different column
lookupvalue.model, value.slug, optional return (id, slug, name) and lookupColumn; supported libraries or models opting into the lookup contract
slugTarget project slug plus - plus team slug
unique_slugRandom unique slug against the chosen parent relationship/column; the resolver normally supplies the item's relationship type
concatOrdered literal parts and supported metadata/slug/default-domain tokens
assetvalue matches a plan asset's description, clones it and returns a project reference; it is not simply a filename lookup
default_top_domainTeam's default top domain
arrayKeyed members with nested source tokens; member shapes vary by source
nested_arrayMembers processed recursively, optionally named with key

Use the editor's scoped version picker for plugin-version fields. Zero/current-default options are fallback selection, not proof of a published compatible release. Library access checks and publication checks are separate. Required reference/generated fields that resolve null can skip their item; a literal foreign ID does not pass through that same reference resolver.

Worked template item​

Create a root Group item in Template with these database-backed attributes. This JSON is an item payload, not an import/export array or a public API-key request. The existing authenticated Developer Hub authoring endpoint supplies the plan context.

Database-backed group item
{
"type": "groups",
"identifier": "reviewers",
"parent_id": null,
"sort_order": 0,
"data": [
{
"column": "name",
"type": "metadata",
"key": "reviewer_group_name",
"fallbacks": [{ "value": "Documentation Reviewers" }]
},
{ "column": "slug", "value": "documentation-reviewers" },
{ "column": "group_type", "value": "normal" }
]
}

When the target project's metadata has reviewer_group_name, the created group uses it. When the key is absent, its name is Documentation Reviewers. The group belongs to that project; the example does not add attendees, expose a portal page or grant an API permission. Application to a fresh project was checked through the actual database-backed engine using both metadata and fallback inputs.

A later item's generated value can refer to this output:

Generated-value fragment
{
"column": "group_id",
"type": "generated",
"value": { "identifier": "reviewers", "key": "id" }
}

Use this fragment only in a type whose actual target supports group_id, and declare depends_on: ["reviewers"] where the hierarchy does not guarantee ordering. It is not a complete resource payload.

Conditions, ordering and skipped items​

An item condition reads a named value on the target project, or inside a column such as metadata. Every condition must pass. A missing value fails normal comparisons. The database engine supports ==, !=, >, >=, <, <=, in, not_in, contains, empty and not_empty. Membership accepts an array or comma-separated string. empty means absent, null or an empty string; it does not mean false, zero or an empty array.

Item condition fragment
[
{ "column": "metadata", "name": "include_reviewers", "logic": "==", "value": true }
]

The runner processes parents and explicit prerequisites before their consumers. A conditionally omitted parent or an ungenerated prerequisite skips dependent items. An unresolved required reference/generated value raises the specific skip exception and records a plan_item_skipped project audit entry. Other execution errors propagate instead of being converted into successful skips. A completion event can therefore coexist with intentional missing resources; compare the result to the conditions and audit trail.

Service-method items​

Database-backed service targets must match the configured class and method allowlist:

ClassAllowed method
App\Services\AttendeeTypeServicebatchCreate
App\Services\AttendeeFieldServicebatchCreate
App\Services\ProjectPageServiceupdateFromPlan

The call receives the target project, the resolved data array when nonempty, then the service parameters. options.returnsValue stores a returned object/value for later generated references. An unlisted class/method raises an error; selecting a class alone does not authorize every method on it. The legacy dispatcher does not apply this allowlist, so treat legacy service instructions as privileged code and convert/review them deliberately.

Legacy JSON compatibility​

A legacy template is an array of instructions. Relationship instructions run in order; dependencies are child instructions, not an explicit prerequisite list. Put a producer before a consumer. Item and data gates use conditionParams; the legacy comparison implementation supports equality and does not provide the database engine's full operator/skip contract.

Legacy group template
[
{
"type": "groups",
"identifier": "reviewers",
"data": [
{ "column": "name", "value": "Documentation Reviewers" },
{ "column": "slug", "value": "documentation-reviewers" },
{ "column": "group_type", "value": "normal" }
]
}
]

This example creates one group through the actual legacy application path. Legacy nested-array tokens and service fields use the legacy shape; do not copy database row fields into the JSON and assume they have the same effect. In particular, the typed engine's fallback, explicit-dependency and reference-skip guarantees do not automatically apply to legacy instructions.

Application, assets and retries​

Project creation commits its project/default dashboard before queued plan provisioning. The current queued job runs plan application in the project's database transaction. If application throws, that transaction rolls back its database work and the job discards collected asset-copy jobs; it does not delete the already-created base project. The completion event is dispatched after commit. On success the job subsequently queues collected asset copies, so placeholder references can exist before the bytes are usable. The asset batch permits failures and emits its completion event in finally; inspect individual uploads and URLs before considering them ready.

The application method itself does not enforce the plan's ready status, provide the outer job's transaction to direct callers or guarantee idempotent replay. Reapplying relationship instructions can create duplicates. Direct callers can leave partial resources; caught errors/skipped items and post-commit asset/dispatch failures are also distinct from a thrown database rollback. External storage/provider effects are not made atomic by a database transaction. Inspect the actual job stage, created project and failed/skipped items before any retry. The permission-team context is changed for application; callers must also account for scoped execution context when embedding this method in another workflow.

Acceptance checklist​

  • Apply to a fresh controlled project and compare every intended item to the actual records.
  • Exercise present/missing metadata and condition branches; verify generated identifiers and consumer bindings.
  • Test accessible and unavailable library selections, intended versions and the consuming team's entitlements.
  • Confirm portal routes, domains, authentication and audiences separately from installed pages or admin shortcuts.
  • Check cloned asset status and usable URLs, then test the real plugins and dashboard layouts.
  • Record failed/skipped/partial results before deciding on a retry or migration.

Source and validation scope​

This reference was reconciled with PluginPlan, PlanTemplateItemService, PlanRunner, the registry/provider, value sources/targets, worklist/finalizer and project creation/job code in platform commit fadddafb930c0e7ea9a3df4f2cf5cff2ba82a84c. Focused isolated tests exercise the retained JSON examples and selected dependency/reference/lifecycle behavior on current application source with older cached Docker dependencies. They do not establish lock-matched, concurrent production, agent-output, storage-copy or live portal acceptance.