Optionalpermissions?: (params: PermissionParams<P, E>) => PlaybookPermissionsAccess control for the playbook. A callback receiving params (with the dot-walkable
parentRecord, available when parentTable is set) and returning permission sets
grouped by reference kind. Pills inside may reference params.parentRecord and
wfa.playbook.activityRef(...).
OptionalpreservedAttachment?: {Framework-managed. Carries a preserved image attachment's raw record data (see "Image Attachments" in docs/guides/playbook-unsupported-features-guide.md) so it survives the Fluent authoring/build/deploy round trip. Populated automatically when transforming a process definition that has one — not meant to be set or edited by hand.
Optionalvariants?: (params: PlaybookBodyParams<I, P, E>) => VVariant definitions keyed by variant name. Enables conditional path selection via
variant hierarchy. Declared here (rather than in the body) so activities in the 3rd-arg
lanes callback can reference a variant directly as params.variants.<name> — no
wrapping call needed. A variant's own parentVariant field references a sibling
variant declared in this same callback directly by local identifier (not through
params.variants), since both are in scope together.
{
permissions: (params) => ({
users: [{ user: wfa.playbook.dataPill(params.parentRecord.assigned_to), view: true }],
}),
triggers: [
PlaybookTrigger(
PlaybookTriggerTypes.RecordCreate,
{ $id: ..., label: 'On Create' },
{ table: 'incident' },
(trigger) => ({
priority: wfa.playbook.dataPill(trigger.current.priority), // ← left + right intellisense
}),
),
],
}
Config-dependent declarations for a Playbook (Argument 2 of PlaybookDefinition).
Holds the
triggersarray and optionalpermissions— declarations whose contents depend on the 1st-arg config (the inputs schemaI,parentTableP, andexecutionTypeE). TheIgeneric captures the declaredinputsschema so eachPlaybookTrigger()mapper is type-checked (left-side keys must be declared inputs; right-sidetrigger.currentautocompletes the trigger table). ThePgeneric typesparams.parentRecordin the permissions callback. TheEgeneric narrowstriggersto[]whenexecutionTypeis'on_demand'.