Skip to main content

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:

  1. Owners - Team members and users
  2. Standard Objects - Built-in HubSpot objects (Contacts, Companies, etc.)
  3. Custom Objects - Your custom CRM objects
  4. Association Definitions - Custom relationship labels
  5. Standard Object Properties - Properties for built-in objects
  6. Custom Object Properties - Properties for custom objects
  7. CRM Properties - General CRM properties
  8. Property Groups - Property groupings
  9. Pipelines - Deal, ticket, and custom pipelines
  10. Pipeline Stages - Individual stages within pipelines
  11. Lists - Contact and company lists
  12. Forms - Marketing forms
  13. CTAs - Call-to-action buttons
  14. Landing Pages - Marketing landing pages
  15. Email Templates - Email designs
  16. Campaigns - Marketing campaigns
  17. 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:

  1. Creates the custom object first
  2. Automatically includes all properties as part of the object creation
  3. 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:

  1. The pipeline is created first
  2. All stages are included in the pipeline creation
  3. Individual stage deployments are skipped

Standard Objects and Properties

For built-in HubSpot objects (Contacts, Companies, Deals, etc.):

  1. The object already exists in HubSpot
  2. Properties are deployed separately
  3. 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:

  1. System detects the custom object is being created
  2. Includes all 10 properties in the object creation payload
  3. Deploys everything in a single operation
  4. 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:

  1. Custom objects deployed first (A, then B)
  2. Properties included with their parent objects
  3. Pipeline deployed next
  4. Stages included with the pipeline

Scenario 3: Updating Existing Items

What you select:

  • 3 property updates
  • 1 workflow update
  • 2 form updates

What happens:

  1. Properties updated first (they're earlier in the dependency order)
  2. Forms updated next
  3. 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