For the managed package runtime, the job file has a number of additional runtime settings that you can use to define your project and to run exports and deployments run. Modify the default settings only to account for unique issues in your org.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Basic
This example shows the basic structure of a job file: the relative path to the project and the relative path to the data pack directory.
projectPath: ../my-project # Where the project will be contained. Use . for the current folder.
# The path is always relative to where you’re running the command,
# not this yaml file.
expansionPath: datapack-expanded # The path relative to the projectPath to insert
# the expanded files. This is also known as the data pack
# directory in this documentation.
Export
Exports can be set up as a series of queries or a manifest.
Export by Queries
Queries support full SOQL to get an Id for each data pack type. You can have any number of
queries in your export. SOQL Queries can use %vlocity_namespace%__ to be namespace independent or the namespace of your
managed package can be used.
queries:
- DataRaptor
- Vlocitydata packType: VlocityUITemplate
query: Select Id from %vlocity_namespace%__VlocityUITemplate__c where Name LIKE 'campaign%'
Export by predefined queries is the recommended approach for defining your project. You can mix the predefined and explicit queries as shown.
Export Results
This tool writes the results of the export to the local folders at the expansionPath. Additional post processing makes the results
as version control friendly as possible.
You can create an export build file as a single file with all of the exported data pack data with no post processing.
exportBuildFile: AllDataPacksExported.json
You can't import this file into a Salesforce org through the data packs API, but you can use it to see the full raw output from a Salesforce org. Instead, use the BuildFile task to create an import file.
BuildFile
This setting specifies a file to create from the data pack directory. You can then upload it in a Salesforce org.
buildFile: ProductInfoPhase3.json
Anonymous Apex
You don't need to change these settings unless you want to change the default behavior. The templates and Flexcards are deactivated before deployment, and products have their attribute JSON generated after deployment.
Anonymous apex runs before and after a job-by-job type and before each step of a deployment.
Available types are Import, Export, Deploy, BuildFile, and ExpandFile. Apex files are in
vlocity_build/apex. You can include multiple Apex files with //include FileName.cls; in your .cls
file.
preJobApex:
Deploy: DeactivateTemplatesAndLayouts.cls
With this default setting, the Apex Code in DeativateTemplatesAndLayouts.cls runs before deployment. It deactivates the templates and layouts (Flexcards) associated with the deployment.