Skip to content

Pipelines

Pipelines define the stages that deals, tickets, and custom objects move through in HubSpot. JetStack AI captures the full pipeline definition — including stages, probabilities, automation rules, and associated workflows — and either creates or maps them in the destination portal.

During import, JetStack AI retrieves:

  • Pipeline metadata — label, display order, object type, and whether it is the default pipeline
  • Stages — each stage’s label, internal ID, display order, and metadata
  • Stage metadata — probability (deals), isClosed flag, ticketState (open/closed for tickets)
  • Stage automation — workflows triggered on stage entry, email sends, owner assignments, and property sets configured at the stage level

HubSpot uses numeric objectTypeId values to identify which object type a pipeline belongs to. JetStack AI handles all three types with unified logic:

Object TypeobjectTypeIdDescription
Deals0-3Sales deal pipelines
Tickets0-5Service ticket pipelines
Custom objects2-xxxxxCustom object pipelines (e.g., 2-12345)

The objectTypeId is preserved during import and used to route the pipeline to the correct API endpoint during deploy. For custom objects, the objectTypeId is remapped to the destination custom object’s ID if it differs.

Deal pipeline stages include a probability value (0 to 100) representing the likelihood of closing. HubSpot’s API returns this as a string, but requires a number on create. JetStack AI automatically handles the string-to-number conversion during deploy.

Probability values are validated to be within the 0-100 range. Stages with isClosed: true should have a probability of either 0 (lost) or 100 (won).

Ticket pipeline stages include a ticketState property that indicates whether the stage represents an open or closed state. Valid values are OPEN and CLOSED. This property is preserved during deploy.

Both deal and ticket stages use the isClosed boolean to indicate terminal stages. JetStack AI preserves this flag and ensures it is correctly set during stage creation.

Pipeline stages can have automation rules that execute when a record enters the stage. JetStack AI captures and remaps:

  • Workflow triggers — workflows that are enrolled when a record enters the stage. The workflow ID is remapped to the destination workflow.
  • Email sends — automated emails sent on stage entry. The email ID is remapped.
  • Owner assignments — automatic owner rotation or assignment rules. Owner IDs are remapped.
  • Property sets — automatic property value changes on stage entry. Property names and values are remapped.

Before creating a new pipeline, JetStack AI checks whether a pipeline with the same label already exists in the destination portal. This comparison is case-insensitive. If a match is found:

  • The existing pipeline is used instead of creating a new one
  • Missing stages are auto-created within the existing pipeline
  • Existing stages with matching labels are mapped and reused
  • Stage metadata (probability, ticketState, isClosed) on existing stages is not overwritten

This behavior prevents duplicate pipelines when deploying to a portal that already has a similar sales or service process configured.

If the destination pipeline exists but is missing stages that are present in the source, JetStack AI automatically creates the missing stages. New stages are created with the correct:

  • Label (from the source stage)
  • Display order (appended after existing stages)
  • Probability and metadata (from the source stage)

Users can explicitly map source pipelines to destination pipelines in the deploy configuration. When a mapping is provided:

  • The mapped destination pipeline is used regardless of label matching
  • Stages are matched by label within the mapped pipeline
  • Unmapped stages are auto-created

See the Pipeline Mapping guide for configuration details.

Pipelines can reference other asset types through stage automation:

  • Workflows — triggered on stage entry
  • Emails — sent on stage entry
  • Owners — assigned on stage entry
  • Properties — set on stage entry

These dependencies are resolved during import and deployed before the pipeline is created or updated.

Deal rotation rules (round-robin owner assignment) associated with pipeline stages are marked as NOT_PORTABLE. HubSpot’s API does not support creating or modifying deal rotation configurations programmatically. These must be manually recreated in the destination portal after deploy.

Custom Object Pipeline objectTypeId Tracking

Section titled “Custom Object Pipeline objectTypeId Tracking”

When deploying pipelines for custom objects, the objectTypeId (e.g., 2-12345) will differ between the source and destination portals. JetStack AI tracks the custom object mapping and remaps the objectTypeId accordingly. If the custom object has not been deployed to the destination portal, the pipeline deploy will fail.

Each object type has exactly one default pipeline in HubSpot. JetStack AI does not attempt to change which pipeline is the default in the destination portal. If the source pipeline is marked as default, it will be created as a non-default pipeline unless it maps to the destination’s existing default.

If a source stage has a probability value outside the 0-100 range (which can occur with legacy data), JetStack AI clamps the value to the valid range during deploy. Stages with isClosed: true have their probability normalized to 0 or 100.

If you see a “pipeline already exists” message, JetStack AI has detected an existing pipeline with a matching label. This is expected behavior. Check the deploy log to verify that stages were correctly mapped or auto-created within the existing pipeline.

If stage automation rules (workflow triggers, email sends) are missing after deploy, verify that the referenced workflows and emails were successfully deployed. Automation references to failed assets are silently skipped.

If a custom object pipeline fails to deploy, ensure the custom object schema has been deployed first. The objectTypeId must resolve to a valid custom object in the destination portal.