As we announced in a previous post, Gearset now allows you to deploy Vlocity DataPacks alongside Salesforce metadata. The benefits over the Vlocity Build tools are clear: you can run all deployments using a single tool so your deployment history and audit trail are in one place. While you can deploy your Vlocity DataPacks with the Vlocity Build and IDX Workbench tools, managing all of your deployments using the same Salesforce DevOps solution gives you a truly agile process. Now, you can also use Gearset to include Vlocity DataPacks in your DevOps process, with version control and continuous integration.
The challenge of developing with Vlocity
Let's have a quick recap on Vlocity, now rebranded as Salesforce Industries. Salesforce Industries is a leading provider of industry-specific solutions for companies developing on Salesforce. It provides pre-built modules and packages tailored to a range of different industries, including media, healthcare, manufacturing, public sector, financial services, etc. Vlocity helps businesses to speed up their digital transformation with solutions configured for specific sectors that reduce the time they'd otherwise need to spend on developing and customizing from scratch.
Vlocity offers companies looking to grow quickly huge benefits, but there's one catch. When developing and releasing on Salesforce, you're mostly dealing with Salesforce metadata, but Vlocity components are largely determined by data. This means you can't deploy Vlocity items over Salesforce's metadata API, so your traditional Salesforce tools and pipelines won't cut it for deploying Vlocity data.
So you're using Vlocity, but you're having to rely on a manual workflow separate from your automated Salesforce DevOps process. Here's where Gearset comes in. Our comprehensive suite of DevOps tools can be used in exactly the same way for Vlocity DataPacks, making your release management process as agile and efficient as possible. You can compare environments and see the line-by-line differences in your Vlocity DataPacks (as well as your Salesforce metadata), integrate with version control for a full audit trail and automate your release pipeline with CI/CD.
How to set up a CI job that includes Vlocity items
In a previous post, we went through the basics of deploying Vlocity items alongside Salesforce metadata using Gearset.
Now, let's run through an example of setting up a CI job from a GitHub repository that integrates Vlocity items. We can then see how the process works by making a simple change to the color of a Vlocity FlexCard.
1. Set up a CI job in Gearset
First, let's set up a CI job between the main branch of a Git repository and a Salesforce org. The CI job will be triggered whenever changes are merged into main, and will deploy them to our specified Salesforce org. We could also configure the CI job to run on a periodic basis - if we wanted to.
In the continuous integration dashboard, click Add new deployment job. We can choose anything for the source and target, from Salesforce orgs to Git repos hosted by any provider such as GitHub, BitBucket or GitLab. In this case, we want to select the source as a GitHub repository and then choose our main branch. For the target, we select a Salesforce staging org and set the CI job to run whenever the source branch is updated.
Then, under the Metadata filter tab, we can choose the metadata types to include. Here's where we'll also be able to find the group of Vlocity types, by clicking on Vlocity types to include in the bottom left. We can check these boxes in the exact same way we select other metadata types. In this case, from the Vlocity types we're only selecting VlocityCard, OmniScript, IntegrationProcedure and DataRaptor.
Once we hit Save, a new dialog will appear to set up a webhook on GitHub - this can be done automatically or manually. A webhook allows Gearset to detect when there are changes in the repo we've selected, and we can choose which events will trigger the webhook, like pull requests and pushes.
Once the webhook has been added, we can go into the settings of our GitHub repository and check that it's listed there.
2. Make a change to a Vlocity FlexCard in a developer org
In a Salesforce development environment, we're going to make a small Vlocity change to an OmniStudio FlexCard to test our new CI job. First we deactivate the FlexCard, and then change the background color of the FlexCard. After reactivating, the color change has been made.
3. Compare and deploy the change to the GitHub repository
In Gearset, we can head to Compare and deploy and make a comparison between our developer org and the main branch of our Git repo (it's worth noting that normally we'd create a feature branch and deploy to that first before merging into main). We open up the metadata comparison filter at the bottom to choose what items we want to include in the comparison. Just as when setting up the CI job, you'll see both metadata types and Vlocity types. Here, we're using a pre-saved filter, 'Vlocity only', including only the four Vlocity types mentioned earlier. Clicking Compare now will start the comparison.
When we reach the comparison view, we can see that there's one changed item of the VlocityCard type. Gearset shows us that the background color has been changed, just as expected. We can just check the box for that change and then click Next.
On starting the deployment, Gearset's problem analyzers run, checking if there are any deployment-blocking problems such as missing dependencies in the deployment package. There are no problems with this package, so now we get a summary of the items we're deploying. Here we can add a friendly name for the deployment, leave a commit message, and update any Jira tickets. Once we're happy, we can commit the change to our branch in Git.
4. Verify the change in the CI job's target environment
After committing the VlocityCard change, the CI job that we set up earlier will have been triggered automatically, and the change should have instantly deployed to our Salesforce org. We can check that the color change has been made by going into our staging org and opening an account in the OmniStudio Console to see that the background color of the FlexCard has changed to orange.
Want to include Vlocity in your DevOps workflow?
There's no reason why deploying Vlocity items shouldn't be as easy as your regular Salesforce DevOps workflow. If you're already a Gearset user with an Enterprise license, you can now set up a CI job to deploy Vlocity data or add it to your existing CI jobs. Similarly, if you're new to Gearset, you can do the same by getting started on a 30-day trial today. Let us know how you get on - we'd love to hear from you as always!