Initialize a group of specs that are called im the order that they are added to the group.
Optionalspecs: DatapackDeploymentSpec[]optional list of specs
Adds a deployment spec to a group of specs; the spec can be partially implemented by in which case only the implemented spec functions will be registered in the group.
Spec object to register in the spec group
OptionalafterThis 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 DatapackDeploymentEvent.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 DatapackDeploymentEvent.getRecords should not be prefixed with a namespace even if the object
you try to access has a namespace; see also beforeDeploy.
event object
OptionalafterExecutes after a group of records is deployed, at this stage it is not possible to change any field value anymore. The hook point can be used to run post-deployment validations or post-deployment activation processes.
Note: this runs on record level and use afterDeploy to run datapack activation processes.
Array of records that got deployed; contains both the failed and success records.
OptionalafterThis hook is almost identical to the DatapackDeploymentSpec.preprocess hook except that executes after a datapack is converted into 1 or more Salesforce records.
The list of records past into this hook contains all the records generated for a single datapack; it is not possible to remove/drop any record but individual records can be manipulated,
Note At this point dependencies are not yet resolved
OptionalbeforeOptionalbeforeThis hook is called before deploying the first record in a datapack, and is only called once very datapack in the deployment.
pre-step job from the Vlocity tools library.The type argument passed to DatapackDeploymentEvent.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 DatapackDeploymentEvent.getDeployedRecords; in the beforeDeploy this will always return an empty array.
event object
OptionalbeforeExecuted just before the records are being deployed; the event contains a readonly array of records. At this stage values for the records can still be manipulated. This hook point should only be used to run logic that depends on all dependencies on individual record level are resolved.
Note: this runs on record level and use beforeDeploy to run datapack activation processes.
Array of records that is going to be deployed
PrivatecallOptionalpreprocessThis function executes before a datapack is converted into a set of DatapackDeploymentRecord's and allow changing the datapack data, correct faulty field values that would otherwise cause errors during record conversion or remove certain fields that should not be deployed.
This hook can also be used to override certain fields with autogenerated values; i.e. setting the element order and level field of OmniScript elements
Datapack object
Groups multiple spec implementation together and executes them in sequence, specs can be added to the group and only for the exposed methods on the specs the group will expose implementations.
The order of execution of the specs is determine by the order in which they are added to the group.