Interface representing the run context with various properties and methods.

interface Run {
    AddRunLogEntry: boolean;
    CartManagement: CartManagement;
    Configurations: ConfigurationsObject;
    CurrentContext: CurrentContextObject;
    CurrentMessage: string;
    CustomDataCategory: CustomDataCategoryObjects;
    Customers: Customers;
    Data: {};
    Database: Database;
    DateTime: DateTime;
    Departments: DepartmentObject;
    EditableContent: EditableContentObject;
    ExternalApi: ExternalApi;
    File: FileObject;
    GenerateMegaScriptLink: ((parameters: Object, additionalParameters: Object) => string);
    Helper: HelperObject;
    HotFolder: HotFolderObject;
    Links: Links;
    MegaScriptInstance: MegascriptInstanceListObject;
    MessageHandler: MessageHandlerObject;
    MisPlugins: MisPluginsObject;
    OrderProductVariants: OrderProductVariantsObject;
    Orders: Orders;
    Parse: ParseObject;
    PdfHelper: PdfGeneralObject;
    PriceHelper: PriceHelper;
    Products: Products;
    Progress: number;
    Reporting: Reporting;
    Request: Request;
    RequestTime: ((time: number) => boolean);
    Response: Response;
    SavedQuotes: SavedQuotes;
    TriggerMode: MegascriptInstanceFlag;
    UploadLocation: UploadLocation;
    Die(): boolean;
    ExecuteMegaScriptAsync(megascriptInstanceName: string, parameters?: object, jobName?: string, isHeavy?: boolean, priority?: number): boolean;
    IsExecutionCancelled(): boolean;
    SymphonyStatsStart(): void;
    SymphonyStatsStop(count: number): void;
}

Properties

AddRunLogEntry: boolean

Indicates whether to add a run log entry.

CartManagement: CartManagement

Cart management operations within the run.

Configurations: ConfigurationsObject

Configurations used in the run.

CurrentContext: CurrentContextObject

Current context object within the run.

CurrentMessage: string

The current message associated with the run.

CustomDataCategory: CustomDataCategoryObjects

Custom data categories associated with the run.

Customers: Customers

The customers involved in the run.

Data: {}

The data associated with the run.

Database: Database

Database operations within the run.

DateTime: DateTime

The price helper object.

Departments: DepartmentObject

Departments involved in the run.

EditableContent: EditableContentObject

Editable content associated with the run.

ExternalApi: ExternalApi

External API used in the run.

File object used in the run.

GenerateMegaScriptLink: ((parameters: Object, additionalParameters: Object) => string)

Generates a MegaScript link with specified parameters.

Type declaration

    • (parameters, additionalParameters): string
    • Parameters

      • parameters: Object

        Parameters for the MegaScript link.

      • additionalParameters: Object

        Additional parameters for the MegaScript link.

      Returns string

      The generated MegaScript link.

Helper: HelperObject

The helper object.

HotFolder: HotFolderObject

Hot folder object related to the run.

Links: Links

Links related to the run.

MegaScriptInstance: MegascriptInstanceListObject

The MegaScript instance associated with the run.

MessageHandler: MessageHandlerObject

Message handler object used in the run.

MisPlugins: MisPluginsObject

MisPlugins related to the run.

OrderProductVariants: OrderProductVariantsObject

Order product variants associated with the run.

Orders: Orders

Orders related to the run.

Parse object associated with the run.

PdfHelper: PdfGeneralObject

PDF helper object used in the run.

PriceHelper: PriceHelper

The price helper object.

Products: Products

Products involved in the run.

Progress: number

The current progress of the run, represented as an integer.

Reporting: Reporting

The reporting object.

Request: Request

The request associated with the run.

RequestTime: ((time: number) => boolean)

Checks if the request time matches the given time.

Type declaration

    • (time): boolean
    • Parameters

      • time: number

        The time to compare against the request time.

      Returns boolean

      True if the request time matches, false otherwise.

Response: Response

The response generated from the run.

SavedQuotes: SavedQuotes

The saved quotes object.

The trigger mode for the run.

UploadLocation: UploadLocation

Upload location used in the run.

Methods

  • Terminates the execution of the run.

    Returns boolean

    True if the run was successfully terminated, false otherwise.

  • Executes a MegaScript asynchronously with specified options.

    Parameters

    • megascriptInstanceName: string

      The name of the MegaScript instance to execute.

    • Optionalparameters: object

      Parameters for the MegaScript execution.

    • OptionaljobName: string

      Optional name of the job.

    • OptionalisHeavy: boolean

      Optional flag indicating if the execution is heavy.

    • Optionalpriority: number

      Optional priority for the job execution.

    Returns boolean

    True if the execution was successfully initiated, false otherwise.

  • Checks if the execution has been cancelled.

    Returns boolean

    True if the execution is cancelled, false otherwise.

  • Starts the Symphony statistics timer.

    Returns void

  • Stops the Symphony statistics timer and records the statistics.

    Parameters

    • count: number

      The count of items to include in the statistics.

    Returns void