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

    Import Set configuration with required system ID and metadata.

    interface ImportSet {
        $id: string | number | ExplicitKey<string>;
        $meta?: { installMethod?: "first install" | "demo" | "once" };
        $override?: Record<string, string | number | boolean>;
        active?: boolean;
        copyEmptyFields?: boolean;
        createOnEmptyCoalesce?: boolean;
        enforceMandatoryFields?: "no" | "onlyMappedFields" | "allFields";
        fields?: { [targetField: string]: string | ImportSetFieldValue };
        name: string;
        order?: number;
        protectionPolicy?: "read" | "protected";
        runBusinessRules?: boolean;
        runScript?: boolean;
        script?: string | ImportSetTransformMapFn;
        scripts?: ImportSetScript[];
        sourceTable: keyof Tables;
        targetTable: keyof Tables;
    }
    Index

    Properties

    $id: string | number | ExplicitKey<string>
    $meta?: { installMethod?: "first install" | "demo" | "once" }

    Type Declaration

    • OptionalinstallMethod?: "first install" | "demo" | "once"

      Map a record to an output folder that loads only in specific circumstances. 'first install' -> 'unload' (only loaded when plugin is first registered), 'demo' -> 'unload.demo' (only loaded when demo data is loaded), 'once' -> 'apply_once' (scripts that are only applied once)

    $override?: Record<string, string | number | boolean>

    Set properties not directly supported by this API.

    active?: boolean

    Whether this import set is active

    copyEmptyFields?: boolean

    Copy empty fields from source to target

    createOnEmptyCoalesce?: boolean

    Create new record if coalesce finds no match

    enforceMandatoryFields?: "no" | "onlyMappedFields" | "allFields"

    Mandatory field enforcement level

    • 'no': do not enforce target table mandatory fields during transform
    • 'onlyMappedFields': enforce mandatory only for fields you map in fields
    • 'allFields': enforce all target table mandatory fields; unmapped required fields must still be provided or the row will be rejected
    fields?: { [targetField: string]: string | ImportSetFieldValue }

    Field mappings: targetField -> sourceField or configuration object.

    • Simple string: direct field mapping
    • Object: advanced mapping with transformations and options
    name: string

    Display name of the import set

    order?: number

    Execution order (lower numbers run first)

    protectionPolicy?: "read" | "protected"

    Controls edit/view access for other developers after the application is installed.

    • read: Others can see the script logic but not change it.
    • protected: Others cannot change this record.
    • Omit to allow other developers to customize this record.
    runBusinessRules?: boolean

    Run business rules on target table

    runScript?: boolean
    script?: string | ImportSetTransformMapFn
    scripts?: ImportSetScript[]

    Transform scripts for various lifecycle hooks

    sourceTable: keyof Tables

    Source staging table name

    targetTable: keyof Tables

    Target table to insert/update records