For the managed package runtime, start by identifying the data source and the target org. Examples show the simplest job file that can be used to set up a project and the commands for exporting and deploying.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Identify the Source and Target
There are two ways to identify the data source and the target org.
- Use the Salesforce CLI
- Set up the build_source.properties and build_target.properties files
Export Example
The example.yaml file is a simple job file that can be used to set up a project.
projectPath: ./example_vlocity_build
Export and deploy commands accept the argument -key
<DataPackType> or -key
<DataPackType>/<DataPackKey> to define what is exported. See Define Export Based on Data Pack Key.
After creating the example.yaml file, run this command to export all Omnistudio Data Mappers in the org.
vlocity -sfdx.username source_org@vlocity.com -job Example.yaml packExport -key DataRaptor
The command produces this output.
Salesforce Org >> source_org@vlocity.com
Exporting >> DataRaptor a191N000012pxsYQAQ
Creating file >> example_vlocity_build/DataRaptor/ExampleDataRaptor/exampleDataRaptor_DataPack.json
Salesforce Org >> source_org@vlocity.com
Current Status >> Export
Successful >> 1
Errors >> 0
Remaining >> 0
Elapsed Time >> 0m 5s
Salesforce Org >> source_org@vlocity.com
Export success:
1 Completed
Deployment Example
To deploy the data you exported, run this command.
vlocity -sfdx.username target_org@vlocity.com -job Example.yaml packDeploy
The command produces this output.
Salesforce Org >> target_org@vlocity.com
Current Status >> Deploy
Adding to Deploy >> DataRaptor/ExampleDataRaptor - exampleDataRaptor
Deploy Success >> DataRaptor/ExampleDataRaptor - exampleDataRaptor
Salesforce Org >> target_org@vlocity.com
Current Status >> Deploy
Successful >> 1
Errors >> 0
Remaining >> 0
Elapsed Time >> 0m 4s
Salesforce Org >> target_org@vlocity.com