Dependency Resolution
When deploying HubSpot metadata, the order matters. You can't create a property before its parent object exists, or a pipeline stage before the pipeline itself. HubSpot Deploy automatically handles these dependencies for you.
How It Works
Before any deployment begins, the system analyzes all selected items and arranges them in the correct order based on their dependencies. This ensures that:
- Parent objects are created before their children
- Foundation elements are deployed before dependent items
- Updates happen in a safe, predictable sequence
Deployment Order
The system follows this standard order when deploying metadata:
- Owners - Team members and users
- Standard Objects - Built-in HubSpot objects (Contacts, Companies, etc.)
- Custom Objects - Your custom CRM objects
- Association Definitions - Custom relationship labels
- Standard Object Properties - Properties for built-in objects
- Custom Object Properties - Properties for custom objects
- CRM Properties - General CRM properties
- Property Groups - Property groupings
- Pipelines - Deal, ticket, and custom pipelines
- Pipeline Stages - Individual stages within pipelines
- Lists - Contact and company lists
- Forms - Marketing forms
- CTAs - Call-to-action buttons
- Landing Pages - Marketing landing pages
- Email Templates - Email designs
- Campaigns - Marketing campaigns
- Workflows - Automation workflows
Why This Matters
Prevents Deployment Failures
Without proper ordering, deployments would fail when trying to create items that reference things that don't exist yet. For example:
- Creating a property for a custom object that hasn't been created yet
- Adding a pipeline stage to a pipeline that doesn't exist
- Creating a workflow that references a property that isn't deployed yet
Ensures Data Integrity
The correct order ensures that all relationships between metadata items are valid throughout the deployment process.
Handles Complex Dependencies
When you select multiple items for deployment, the system automatically:
- Identifies all dependencies between selected items
- Arranges them in the correct order
- Deploys them sequentially to maintain integrity
Parent-Child Relationships
Some metadata types have special parent-child relationships:
Custom Objects and Properties
When you create a new custom object, you can include its properties in the same deployment. The system:
- Creates the custom object first
- Automatically includes all properties as part of the object creation
- Skips separate property deployment (they're already created)
This is more efficient than deploying the object and properties separately.
Pipelines and Stages
Similarly, when creating a new pipeline:
- The pipeline is created first
- All stages are included in the pipeline creation
- Individual stage deployments are skipped
Standard Objects and Properties
For built-in HubSpot objects (Contacts, Companies, Deals, etc.):
- The object already exists in HubSpot
- Properties are deployed separately
- The system ensures properties are deployed after the object is confirmed
Rollback Order
When rolling back a deployment, the order is reversed:
- Items are removed in the opposite order they were created
- This ensures dependent items are removed before their parents
- Prevents orphaned metadata or broken references
What You Don't Need to Worry About
The dependency resolution system handles all of this automatically:
- ✅ You don't need to manually order items
- ✅ You don't need to know which items depend on others
- ✅ You can select any combination of items for deployment
- ✅ The system will figure out the correct order
Common Scenarios
Scenario 1: Deploying a New Custom Object with Properties
What you select:
- 1 custom object
- 10 properties for that object
What happens:
- System detects the custom object is being created
- Includes all 10 properties in the object creation payload
- Deploys everything in a single operation
- Marks individual properties as "deployed with parent"
Scenario 2: Deploying Mixed Metadata Types
What you select:
- 2 custom objects
- 5 properties for object A
- 3 properties for object B
- 1 pipeline
- 4 pipeline stages
What happens:
- Custom objects deployed first (A, then B)
- Properties included with their parent objects
- Pipeline deployed next
- Stages included with the pipeline
Scenario 3: Updating Existing Items
What you select:
- 3 property updates
- 1 workflow update
- 2 form updates
What happens:
- Properties updated first (they're earlier in the dependency order)
- Forms updated next
- Workflow updated last
Troubleshooting
"Dependency not found" Error
If you see this error, it means:
- An item references something that doesn't exist in the target portal
- The referenced item wasn't included in your deployment selection
Solution: Include the missing dependency in your changeset, or ensure it already exists in the target portal.
Deployment Stuck on One Item
If a deployment seems stuck:
- The item might be waiting for a dependency to complete
- Check the deployment logs to see which item is currently processing
- Verify that all dependencies were successfully deployed
Items Deployed in Unexpected Order
The system always follows the standard dependency order. If items appear out of order:
- Check the item types - they might be in different categories
- Review the deployment logs to see the actual sequence
- Remember that items of the same type are deployed in the order they appear in the changeset
Best Practices
Let the System Handle It
Trust the automatic dependency resolution. Don't try to manually order items or deploy them in separate batches unless you have a specific reason.
Include Complete Feature Sets
When deploying a new feature, include all related metadata in one changeset:
- The custom object and all its properties
- The pipeline and all its stages
- The forms, workflows, and lists that use them
This ensures everything is deployed in the correct order in a single operation.
Review Before Deploying
Before starting a deployment, review the changeset to ensure:
- All necessary items are included
- No critical dependencies are missing
- The scope makes sense as a complete unit
Related Features
- Pre-Deployment Backups - Automatic backups before deployment
- Deployment Strategies - How items are deployed (batch vs sequential)
- Assisted Deployment - Manual deployment with retry options