@servicenow/sdk - v4.13.3
    Preparing search index...

    Configuration properties for a Playbook (Argument 1 of PlaybookDefinition).

    The config object holds the playbook's declarative state — inputs and outputs — next to parentTable. This lets TypeScript capture the inputs schema as a const generic and thread it through the 2nd-arg triggers callback so the mapper return type is constrained to the declared inputs.

    interface PlaybookConfig<
        I extends Record<string, Column> = Record<string, Column>,
        O extends Record<string, Column> = Record<string, Column>,
    > {
        $id: string | number | ExplicitKey<string>;
        access?: PlaybookAccess;
        active?: boolean;
        allowAsNested?: boolean;
        copiedFrom?: string;
        copiedFromLabel?: string;
        dataRetentionPeriodOverride?: PlaybookDataRetentionPeriod;
        description?: string;
        designerState?: string;
        evaluateVariantChildrenAfter?: ExplicitKey<string>;
        executionType?: PlaybookExecutionType;
        inputs?: I;
        label: string;
        launcherDescription?: string;
        launcherInputs?: Partial<Record<keyof I, string | Record<keyof Tables>>>;
        launcherRecordFormView?: string | Record<"sys_ui_view">;
        launcherShowRecordForm?: boolean;
        launcherTemplateFields?: string | Record<string, unknown>;
        launcherTitle?: string;
        name?: string;
        nowAssistKb?: string;
        nowAssistPrompt?: string;
        outputs?: O;
        parentTable?: keyof Tables;
        processType?: string;
        publicAccess?: boolean;
        restartable?: PlaybookRestartable;
        runStrategy?: PlaybookRunStrategy;
        schemaVersion?: number;
        snapshot?: string;
        status?: "draft" | "published";
    }

    Type Parameters

    Index

    Properties

    $id: string | number | ExplicitKey<string>

    Unique identifier (required)

    Accessible from: this scope only or all scopes

    active?: boolean

    Whether the playbook is active. Defaults to true; preserved for round-trip data integrity.

    allowAsNested?: boolean

    Whether playbook can be used as nested playbook. Can only be true when executionType is 'on_demand' (enforced by PlaybookDefinitionFunction).

    copiedFrom?: string

    Reference to the playbook this was copied from. Read-only; preserved for round-trip data integrity.

    copiedFromLabel?: string

    Display label of the playbook this was copied from. Read-only; preserved for round-trip data integrity.

    dataRetentionPeriodOverride?: PlaybookDataRetentionPeriod

    Overrides the default data retention period for playbook execution data. Omitted from generated code when the value equals the platform default ('6_week').

    description?: string

    Optional description of playbook purpose

    designerState?: string

    Platform-managed designer state. Read-only; preserved for round-trip data integrity.

    evaluateVariantChildrenAfter?: ExplicitKey<string>

    Defers variant evaluation until after the specified activity completes, instead of evaluating which variant applies at playbook start (the default). Pass the $id of an activity declared in lanes — widens what a variant's condition may reference via activityRef() to include any ancestor of that activity, see docs/api/playbook-api.md for the full validation rules (must be an activity, not a lane; must not be a Run.Manually() optional activity). Omit for the default (evaluate at start) behavior.

    Unlike $id, this field references another node's key within the same playbook body rather than declaring its own identity, so — unlike most $id-shaped fields — it only accepts a Now.ID['key'] reference, not a literal string/number.

    executionType?: PlaybookExecutionType

    Execution type

    inputs?: I

    Playbook inputs - data passed into the playbook

    label: string

    Human-readable label shown in UI (required)

    launcherDescription?: string

    Description shown in the playbook launcher. Note: leading/trailing whitespace is trimmed during XML parsing.

    launcherInputs?: Partial<Record<keyof I, string | Record<keyof Tables>>>

    Sets the value shown, in the on-demand launcher, for each of the playbook's own inputs. Requires inputs to be declared — keys are constrained to those declared input names. For a ReferenceColumn input, pass a sys_id string or a typed Record<'table'> reference. For every other input type — including BooleanColumn and IntegerColumn — pass a string, e.g. isUrgent: 'true' or retryCount: '3', not a raw true/3 literal. A raw boolean/number literal fails to compile (TypeScript rejects it), so this is the only form real playbook authors can use here. If an input has a default and no launcherInputs value is set for it, the default is shown in the launcher automatically. Setting launcherInputs only changes what's shown in the launcher — it does not change the input's own default value.

    launcherRecordFormView?: string | Record<"sys_ui_view">

    Which form view to use when creating a record via the on-demand launcher. Only applies when launcherShowRecordForm is true. The platform stores this as the view's sys_id, not its display name — 'Default view' is a special-case string that works as-is, but any other view must be passed by its actual sys_id, not its display name. Pass the sys_id as a string, or a typed Record<'sys_ui_view'> reference. The SDK cannot verify the view exists or resolve a display name to a sys_id — confirm the value in Playbook Designer before deploying. Cannot be set when executionType is 'on_demand' (enforced by PlaybookDefinitionFunction).

    launcherShowRecordForm?: boolean

    When true, shows the record form in the playbook launcher. Cannot be set when executionType is 'on_demand' (enforced by PlaybookDefinitionFunction).

    launcherTemplateFields?: string | Record<string, unknown>

    Template fields for pre-populating record field values in the on-demand launcher. Only applies when launcherShowRecordForm is true. Use TemplateValue({ fieldName: value, ... }) or a raw 'field=value^' string. This can only be used when there is a parent table — when parentTable is set, TypeScript constrains the object keys to valid field names on that table (via the function signature's generic constraint).

    Note: Record<string, unknown> is just a fallback for when parentTable isn't set — it keeps this field compiling instead of a raw TS error, so the missing-parentTable mistake is instead caught by our own, clearer diagnostics error at build time. When parentTable is set, the function signature below narrows this to the precise TemplateValueElement<P> type.

    Cannot be set when executionType is 'on_demand' (enforced by PlaybookDefinitionFunction).

    launcherTitle?: string

    Title shown in the playbook launcher. Required by the on-demand launcher UI — if omitted, defaults to the playbook's label.

    name?: string

    Optional internal name (auto-generated from label if not provided)

    nowAssistKb?: string

    Now Assist knowledge base reference. Read-only; preserved for round-trip data integrity.

    nowAssistPrompt?: string

    Now Assist prompt associated with this playbook. Read-only; preserved for round-trip data integrity.

    outputs?: O

    Playbook outputs - data returned from the playbook

    parentTable?: keyof Tables

    Table whose records this playbook operates on. Auto-generates a parent_record process input of type Reference pointing to this table. In the body, the record is accessible via params.parentRecord and is dot-walkable to all fields of the referenced table. Not allowed when executionType is 'on_demand' (enforced by PlaybookDefinitionFunction).

    processType?: string

    Playbook type name. Defaults to 'Standard playbook' when omitted. Must exist in the SDK process type mapping, for example 'Standard playbook'. Custom playbook types are not automatically supported in Fluent; each supported type requires explicit SDK mapping and diagnostics/feature handling.

    publicAccess?: boolean

    Allows the playbook to be embedded on public pages and run by unauthenticated users (sys_pd_process_definition.public_access). Defaults to false.

    Public playbooks are constrained on the platform, and Fluent enforces the two it can check at build time:

    • parentTable is required — a public playbook must be tied to a record.
    • Every activity's definition must declare publicAccess: true. Non-public definitions (for example ActivityDefinitions.Core.SendEmail) are rejected both by TypeScript, on the body entry that holds them, and by a build diagnostic naming the activity.

    Requires the Process Automation Designer (sn_pa_designer) store app at version 29.0.0 or later (the Australia release) — sys_pd_process_definition.public_access doesn't exist on earlier versions; the SDK doesn't validate the installed version.

    restartable?: PlaybookRestartable

    Whether playbook can be restarted

    runStrategy?: PlaybookRunStrategy

    How to handle multiple runs

    schemaVersion?: number

    Schema version. Defaults to Fluent's safe fallback version (PLAYBOOK_DEFAULTS.MAX_SUPPORTED_SCHEMA_VERSION) when omitted; preserved for round-trip data integrity otherwise.

    The highest schema version a given instance actually accepts depends on its release — Australia and older releases cap out at 3, Brazil and newer releases also accept 4. When deploying to a Brazil-or-newer instance, set this explicitly to 4 to opt into the newer schema. Don't infer the ceiling from the release name alone — confirm it against the target instance's com.glide.pad.core.model.maxSupportedSchemaVersion system property. See schemaVersion in playbook-api for details.

    snapshot?: string

    Reference to the associated sys_pd_snapshot record. Read-only; preserved for round-trip data integrity.

    status?: "draft" | "published"

    Lifecycle status. Defaults to 'draft'; preserved for round-trip data integrity.