A deployment spec contains Datapack specific logic and allows hooking into the deployment process to manipulate what get's deployed and execute post-deployment activation logic.

Implementers can implement any of the specified functions in this interface, all functions are optional and only the implemented functions are executed.

For many standard datapacks spec logic is implemented under the ./deploymentSpecs folder.

Hierarchy

  • OmniScript

Implements

Constructors

Properties

container: Container
embeddedTemplates: Map<string, string[]> = ...
logger: Logger
lwcEnabledDatapacks: Set<string> = ...
preprocessorMessages: Map<string, string[]> = ...
ParallelActivations: number = 4

Number of parallel activations to perform.

ParallelToolingDeployments: number = 4

Number of parallel tooling deployments to perform.

Methods

  • Add a warning message to a record from the preprocessing stage; stores the messages and adds them to the records in the afterRecordConversion stage.

    All pre-processor messages are warnings, if the pre-processor encounters an error it should throw an exception.

    Parameters

    • sourceKey: string | {
          VlocityRecordSourceKey?: string;
          sourceKey?: string;
      }

      Source key of the future record to add the warning to

    • message: string

      Message to add

    Returns void

  • This hook is called after all records of a datapack are deployed and will only be called once for every datapack in the deployment. Use this hook to execute datapack activation logic. It is comparable to post-step in Vlocity tools and should also execute any activation logic if required.

    Use the getDeployedRecords function to get a list of deployed records for a specific SObject type. This excludes any records that didn't get deployed.

    The type argument passed to getRecords should not be prefixed with a namespace even if the object you try to access has a namespace; see also __type.

    Parameters

    Returns Promise<void>