APIs & Integrations

Not applicable

Pipeline Stages + DELETES

I have a few questions about deal pipeline stages and was hoping someone would be able to clarify; I don’t have direct access to the Hubspot account in question or would test myself.

Assuming starting with the response below:

  1. If I were to delete a stage from this pipeline, would the stage remain if I were to fetch the data again, but the active be set to false? or would the stage just not be returned?

  2. What events cause the active field to be set to false?

  3. Could there be stages in different pipelines with the same ID?

Thanks in advance!

https://api.hubapi.com/deals/v1/pipelines?hapikey=demo

Example response:
[
  {
    "active": true,
    "displayOrder": 0,
    "label": "Sales Pipeline",
    "pipelineId": "default",
    "stages": [
      {
        "active": true,
        "closedWon": false,
        "displayOrder": 0,
        "label": "Appointment Scheduled",
        "probability": 0.3,
        "stageId": "appointment_scheduled"
      },
      {
        "active": true,
        "closedWon": false,
        "displayOrder": 1,
        "label": "Decision Maker Bought-In",
        "probability": 0.8,
        "stageId": "decision_maker_bought_in"
      }
  }
]
0 Upvotes
4 Replies 4
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Pipeline Stages + DELETES

Hi @Bistream630,

It’s not currently possible to request deal stages that have been deleted, and I’m not aware of any plans to implement that functionality. Deleting a deal stage that existing deals still have won’t change the deal stage value, but it will appear as invalid in the UI. You might consider storing the historical deal stage values in a separate custom property, or externally.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Pipeline Stages + DELETES

Hi @joeybloggs,

I’ll try to address each of your questions separately, to make sure that my response doesn’t get jumbled. Starting with the first:

  1. If a stage is deleted from a pipeline, it does not appear in the response. Only stages that appear in-app are returned from that endpoint
  2. The active field will always be true for a pipeline in use. You shouldn’t see deal pipelines/stages with an active field equal to anything other than true
  3. A deal stage’s id is globally unique; no two stages will have the same id, even if they are in different pipelines
0 Upvotes
JamiesonC
Participant

Pipeline Stages + DELETES

This poses a problem for us. We need to modify our pipeline to remove some stages that are no longer relevant, but I need to be able to report on historical Deals that used those stages.

How can I retrieve deal stages that have been deleted, i.e. the active field is set to false? Is there (or can there be added) a parameter for https://developers.hubspot.com/docs/methods/deal-pipelines/get-all-deal-pipelines that would allow deleted stages to be included? Or do I need to use a different endpoint altogether?

Please advise. Thanks very much.

Not applicable

Pipeline Stages + DELETES

Thanks, answered all my questions :slight_smile: