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

  • CustomObjectMapSpec

Implements

Constructors

Properties

salesforceService: SalesforceService

Methods

  • This hook is called before deploying the first record in a datapack, and is only called once very datapack in the deployment.

    • Use this hook to execute and pre-deployment actions. This action is comparable with the pre-step job from the Vlocity tools library.
    • Use the getRecords function to get a list of records for a specific SObject type.

    The type argument passed to getRecords should not be prefixed with a namespace. I.e; to get a list of OmniScript__c records in the deployment use:

    DatapackDeploymentEvent.getRecords('OmniScript__c')
    

    instead of

    DatapackDeploymentEvent.getRecords('vlocity_cmt__OmniScript__c')
    

    The event object also exposes getDeployedRecords; in the __type this will always return an empty array.

    Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<[{
        error?: string;
        id: string;
        success: boolean;
    }[], {
        error?: string;
        id: string;
        success: boolean;
    }[]]>