Export and Deploy Data Between Orgs (Managed Package)

For the managed package runtime, to export and deploy data from one org to another, use this process.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

  1. Authorize with Salesforce CLI or create property files for each org.
    build_source.properties and build_target.properties.
  2. Create a job file that identifies your project path and the queries for the data pack types to export.
    For example, to export Omnistudio data packs, create a job file like this:
    projectPath: vlocity
    queries:
      - OmniScript
      - IntegrationProcedure
      - DataRaptor
      - FlexCard
    
  3. Run the export process.
    vlocity -sfdx.username source_org@vlocity.com -job Platform.yaml packExport 

    The first time that you deploy data to this org, settings are automatically deployed. The process can take up to 30 seconds. You must rerun the process if settings change.

  4. Evaluate any errors that you encounter during export.

    Errors during export can cause errors during deployment. After errors are fixed, run this command to re-export any failed data:

    vlocity -sfdx.username source_org@vlocity.com -job Platform.yaml packRetry

    If your export process is interrupted due to connection issues, use this command to resume the export:

    vlocity -sfdx.username source_org@vlocity.com -job Platform.yaml packContinue
  5. To check the exported data for potential issues, use this command:
    vlocity -sfdx.username source_org@vlocity.com -job Platform.yaml validateLocalData

    The command provides a summary of duplicate and missing global keys. Use the argument --fixLocalGlobalKeys to add missing keys and change duplicate keys.

    Note
    Note For best results, fix the data in the org.
  6. To run the deployment, use this command:
    vlocity -sfdx.username target_org@vlocity.com -job Platform.yaml packDeploy
  7. If you encounter any errors during the deployment, evaluate whether an error was addressed by later uploads of missing data.
    To retry the failed data packs, run this command:
    vlocity -sfdx.username target_org@vlocity.com -job Platform.yaml packRetry

    This command often fixes errors that result from issues in the order of deployment or Salesforce governor limits.

    Run this command until the error count stops going down after each run:

    packRetry