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

    NAP config with advanced condition mode — requires a custom condition script.

    nowAssistPanel: {
    enabled: true,
    // roles omitted in advanced mode — the condition script governs access
    conditionMode: 'advanced',
    conditionScript: `(function executeCondition(current) {
    return current.getValue('priority') === '1';
    })(current);`,
    }
    interface NowAssistPanelConfigAdvanced {
        conditionMode: "advanced";
        conditionScript?: string;
        enabled: true;
        roles?: (string | Role | Record<"sys_user_role">)[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    conditionMode: "advanced"

    Advanced mode uses a custom condition script for applicability evaluation.

    conditionScript?: string

    Server-side JavaScript condition script evaluated at runtime to determine if the skill is applicable for a given context.

    Must follow the pattern:

    (function executeCondition(/* glide record */ current) {
    // customize condition logic here, return true or false
    return false;
    })(current);

    If omitted, a default template script is used that returns false (i.e., the skill will not pass the condition check until customized).

    enabled: true

    Enable NAP deployment

    roles?: (string | Role | Record<"sys_user_role">)[]

    Roles that can access this skill in the Now Assist Panel. Optional in both modes.

    • Simple mode: if omitted, defaults to 'now_assist_panel_user' (the universal panel-access role). Provide additional roles to broaden access.
    • Advanced mode: if omitted, roles are left empty and the conditionScript alone governs access. No default role is injected.

    In simple mode, omitting 'now_assist_panel_user' from provided roles raises a warning; advanced mode does not warn.

    roles: ['now_assist_panel_user', 'access_analyzer_ai_user']