Overview
OmniStudio (formerly Vlocity) components—like OmniScripts, FlexCards, Integration Procedures, and DataRaptors—require a different approach than standard Salesforce metadata. While some pieces can be moved via Metadata API or Change Sets, the recommended, repeatable way for robust deployments is using DataPacks and the Vlocity/OmniStudio Build Tool together with Salesforce CLI (SFDX) for dependent metadata.
Common Deployment Options
1) Vlocity / OmniStudio DataPacks (VBT — Vlocity Build Tool)
Best practice for migrating OmniStudio assets. DataPacks understands OmniStudio relationships and exports/imports related components together.
Typical steps:
sfdx force:auth:web:login -a SourceOrg
sfdx force:auth:web:login -a TargetOrg
vlocity packExport -u SourceOrg -p ./datapack --query "Name='MyOmniPackage'"
vlocity packDeploy -u TargetOrg -p ./datapack
Notes:
– Use packExport/packDeploy (or packPack/packInstall variations depending on the tool version). The tooling may be installed as the vlocity build tool or an SFDX plugin in later versions.
2) SFDX / Metadata API
Some OmniStudio metadata is exposed as Metadata API types (custom objects, custom metadata, Apex, Lightning components). Use SFDX for those artifacts and for deployment of dependent Salesforce metadata:
sfdx force:source:deploy -u TargetOrg -p force-app/main/default --testlevel RunLocalTests
Use this for: Custom Objects/Fields, Permission Sets, Apex, Named Credentials, Remote Sites, Connected Apps, and any metadata the target org must have for OmniStudio assets to function.
3) Unlocked Packages / Managed Packages
Large organizations sometimes wrap stable OmniStudio assets into packages (unlocked packages) to get versioning, but OmniStudio-specific components may not always package cleanly. Evaluate packaging only after testing DataPacks/Metadata API approaches.
4) Change Sets
Not recommended—Change Sets don’t reliably support most OmniStudio assets, and important dependencies may be missing.
Deployment Workflow & Best Practices
1) Identify Dependencies First
OmniStudio components often depend on:
Custom Objects & Fields, Record Types, Page Layouts, Apex classes, Permission Sets, Named Credentials, Remote Site Settings, Connected Apps, Labels, and Custom Metadata. Deploy these items before deploying OmniStudio DataPacks.
2) Export/Version Control
Export OmniStudio assets to DataPacks and commit them to your repository. Keep SFDX metadata in source control as well so both the Salesforce metadata and DataPacks are versioned together.
3) CI/CD Pipeline
Automate the process using CI (GitHub Actions, Jenkins, CircleCI):
– Authenticate orgs (SFDX auth) for source and target
– Export a DataPack bundle from source
– Run metadata deploy for dependent metadata
– Import DataPacks to target with packDeploy
– Run tests, smoke tests, and activate any runtime configs if needed
4) Post-Deploy Steps
– Activate OmniScripts and FlexCards if required (the build tool has options to activate)
– Update org-specific config (Named Credentials, environment variables, endpoint URLs)
– Data migration for any reference data used by OmniStudio components (use Data Loader or DataRaptor)
Troubleshooting & Tips
Common Issues
– Missing dependencies: use DataPacks queries to include related elements.
– Version mismatches: ensure Vlocity/OmniStudio package versions align across orgs.
– API/Tooling Differences: some older Vlocity build tools have different command names—consult your tool version docs.
Validation
– Run a dry-run in a QA sandbox.
– Check deployment logs from the build tool and SFDX for errors.
– Use automated UI smoke tests to validate key OmniStudio flows.
Recommended Strategy (Summary)
– Use Vlocity / OmniStudio DataPacks + Vlocity Build Tool for OmniStudio assets.
– Use SFDX / Metadata API for platform dependencies and metadata not covered by DataPacks.
– Automate with CI/CD, keep everything in version control, and validate in QA sandboxes before production deployment.
Following this approach ensures consistent, repeatable deployments of OmniStudio components between sandboxes and into production.








Leave a Reply