Using Swantide “Bundle Deploy” for special case deployments
Overview
When you create certain metadata in Salesforce’s UI (for example a Sites, DigitalExperienceBundles, DigitalExperienceSites), there are other metadata components created by Salesforce simultaneously. In order to deploy via the API and Swantide Workflows, you have to incorporate each of these required components into a bundled workflow component.
With Swantide Workflows, standard component deployments deploy in order they are presented on the Workflow screen. Differently, the Swantide bundle deploy rule functionality allows you to paste in XML of multiple components and deploy them as one unit, ensuring all required components are created at one time.
This article covers:
How to prepare the metadata and dependencies (via a change set)
How to bundle the metadata in Swantide’s “Bundle Deploy” tool
Best-practice tips and recommended workflow
Step 1: Create a Change Set to identify dependent components
Before you jump into Swantide’s bundle deploy, we recommend you use Salesforce’s native change set (or equivalent) to identify dependencies. This helps ensure you don’t miss related metadata.
Steps:
In your source org (sandbox or dev), go to Setup → Outbound Change Sets.
Create a new Change Set (e.g., “BundlePrep – [ComponentName]”) and add the main component you just created in the UI (for example a Site, or a Lightning Page, or a custom object).
Be sure to click the add all dependencies option so that you pull in any other required components.
You can even u pload the Change Set to a target org (or at least stage it) so that Salesforce will show you any Missing Components or Dependencies the target org will need.
Why do this?
It ensures you capture everything that Salesforce considers required for deployment in your scenario.
It reduces the risk of deployment failure due to missing metadata.
It gives you a nice manifest of what must be included in the bundle.
Step 2: Extract the XML definitions of each component to be bundled
Once you have your list of main components + dependencies (from step 1), you need to collect the metadata XML for each component that you will bundle in Swantide.
In your source org, retrieve the metadata for each component using your tool of choice.
Identify the correct XML file for each component
You’ll end up with a set of XML snippets, one for each component and its dependencies.
Step 3: Use Swantide’s Bundle Deploy – paste multiple XMLs into one deployment
Now you will use Swantide’s bundle deploy tool to package and deploy these metadata items together.
Procedure:
Log into Swantide and navigate to the workflow you'd like to bundle the components into.
Create a new Metadata component, you'll be selecting the “Bundle Deploy” deployment rule
Create a top level shell of the metadata that will serve as the list container for each XML file that you paste in
"xmlContents": [PASTE IN XML COMPONENTS HERE, COMMA SEPARATED]
Paste in the fileName and fileContents for each component into the xmlContents parent list
In this example you can see that the xmlContents[] list contains individual file names. Each component's XML file should be pasted into this list so that Swantide will treat them as a group and deploy all at once.
After all required components have been bundled into the component in Swantide, test deploy the Workflow via Swantide's test deploy feature to see if there are any other required components to be brought in
After testing and validating, publish the workflow for use in available orgs
**TIP: you can use variables the same way you would in any other metadata component in bundle deploy functionality

