You are here:
Export and Deploy by Using the Omnistudio Build Tool Job File (Managed Package)
For the managed package runtime, use the job file to specify settings, the project path, what to export, and where to
deploy. The packExport command takes parameters based on
what’s in the job file. The simplest way to export is to include a manifest in your job file that
exports all data packs by their data pack key. Or you can narrow the export using SOQL queries.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
- Job File Settings and Path (Managed Package)
For the managed package runtime, use the job file to change the default settings and specify the project path. - Define Export Based on Data Pack Key (Managed Package)
For the managed package runtime, the simplest method is to export data packs by their data pack key. - Define Export Based on Query (Managed Package)
For the managed package runtime, thepackExportcommand exports all data by default. To narrow the exported data, define any Salesforce SOQL query that returns the IDs of records you want to export. - Deploy Based on Git Changes (Managed Package)
For the managed package runtime, you can speed up deployment to your target org by deploying data packs based on Git changes. - Sample Omnistudio Build Tool Job File (Managed Package)
For the managed package runtime, review a sample job file with settings and queries.
Job File Settings and Path (Managed Package)
For the managed package runtime, use the job file to change the default settings and specify the project path.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
If no settings are specified in your file, the default job settings are applied. Don’t add settings to the file unless you want to change a default setting.
The primary setting is the folder to use to contain your project.
projectPath: ../myprojectPath
The projectPath can be the absolute path to a folder or the relative path from where you run
the vlocity command.
Define Export Based on Data Pack Key (Managed Package)
For the managed package runtime, the simplest method is to export data packs by their data pack key.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
The folder name matches the data pack key of the data pack that’s exported.
For a product, the data pack key is Product2/${GlobalKey__c}. To get a full list of data pack keys, run getAllAvailableExports.
To export all Omnistudio Data Mappers and Omniscripts, use the following command.
projectPath: ./myprojectPath
queries:
- DataRaptor
- OmniScript
Define Export Based on Query (Managed Package)
For the managed package runtime, the packExport command exports all data by default.
To narrow the exported data, define any Salesforce SOQL query that returns the IDs of records
you want to export.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
This query exports an Omnistudio Data Mapper data pack by querying the SObject table for DataRaptor DRBundle__c. It even supports the LIMIT 1 and LIKE
syntax.
queries:
- VlocityDataPackType: DataRaptor
query: Select Id from %vlocity_namespace%__DRBundle__c where Name LIKE '%Migration' LIMIT 1
Predefined Versus Explicit Queries
Salesforce has defined full queries for all supported data pack types, which export all currently active Salesforce metadata. This method is the simplest way to define your own job file queries.
To export all Data Mappers and Omniscripts, use the following command.
projectPath: ./myprojectPath
queries:
- DataRaptor
- OmniScript
This predefined syntax is defined in lib/querydefinitions.yaml and loads these queries.
queries:
- VlocityDataPackType: DataRaptor
query: Select Id, Name from %vlocity_namespace%__DRBundle__c where %vlocity_namespace%__Type__c != 'Migration'
- VlocityDataPackType: OmniScript
query: Select Id, %vlocity_namespace%__Type__c, %vlocity_namespace%__SubType__c, %vlocity_namespace%__Language__c from %vlocity_namespace%__OmniScript__c where %vlocity_namespace%__IsActive__c
= true AND %vlocity_namespace%__IsProcedure__c = false
The WHERE clauses show that these queries export all Data Mappers and all active Omniscripts.
When you export a data pack, the API exports all dependencies of the related data pack. When you export the Omniscripts, all referenced Data Mappers, VlocityUITemplates, and other Omnistudio dependencies are included. As a result, Omniscripts are fully usable when deployed.
Query All
Running packExport with no queries defined in your
job file exports all the predefined queries for each type. If you define additional queries,
you can also run packExportAllDefault to specify all
the default queries.
Deploy Based on Git Changes (Managed Package)
For the managed package runtime, you can speed up deployment to your target org by deploying data packs based on Git changes.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
To enable checking what the latest Git hash was before deploying to the target org, add
gitCheck: true to your job file. With this setting,
only the data packs that have changed between the previous git hash and the latest git hash
are deployed.
If more than one folder in your repository contains data packs, add the key gitCheckKey: Folder1 to your individual job files.
To redeploy the commit from the local branch without changing the commit in the target org,
add overrideOrgCommit: local_commit_id to your job
file.
Sample Omnistudio Build Tool Job File (Managed Package)
For the managed package runtime, review a sample job file with settings and queries.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
To view a sample job file, see Example.yaml and ReadMeExample.yaml.
projectPath: ./example_vlocity_build
queries:
- VlocityDataPackType: DataRaptor
query: Select Id from %vlocity_namespace%__DRBundle__c LIMIT 1
When creating your own job file, you must set the projectPath, which specifies where the data packs files are written. All other settings use the default project settings.
By default, all data pack types are exported when you run packExport. To override the export data, use predefined queries, or write your own.

