APIs & Integrations

pukkasoft
Member

500 errors trying to update deal pipeline stageId

I'm trying to dig myself out of a hole here... we're creating a new deal pipeline and I wanted to manually set the stageIds for custom integrations. I've done this before on our Default pipeline and it worked great. I ran the code but forgot to update the deal pipeline ID, and I killed all but a single stage of the pipeline, totally wrecking our sales funnel.

Thanks to support, I've been able to identify the deal stages and stageIds I was using before, but I'm getting 500 errors trying to reset the stageIds. In summary:

  • I had a default pipeline with deal stages with a stageId like "more_info"
  • I overwrote all of the deal stages for the default pipeline
  • I have deals still in the "more_info" stage
  • There are no other deal stages in any other pipeline with the "more_info" stageId, I verified.
  • I tried to recreate a "More Info" stage with "more_info" stageId via the api - got a 500 error ({"status":"error","message":"internal error","correlationId":"8e0a7e92-25e6-4fcd-b142-073d11993557","requestId":"b063cf7ba9fbd8a784afad98bfd42258"})
  • I manually created a "More Info" stage in the Web UI, which generated a GUID as the stageId, and then attempted to update just that stageId (as I have in the past) and I also got a 500 ({"status":"error","message":"internal error","correlationId":"84ef1feb-3701-4397-8763-00d3f2420911","requestId":"505c8b712130649d9e7fe36e0abf2dd9"})

I'm confident the JSON formatting is correct because I'm pulling down the JSON of the deal pipeline, modifying the stageId, and sending it back. I'm also confident that works because it's literally what I used to wipe everything out.

Here's the JSON of the pipeline at the moment, after I recreated the 10 stages in the UI:

{"pipelineId":"default","stages":[{"stageId":"1baf89f0-fd71-4f54-b7e6-613a2ebe1536","label":"More Info","probability":0.1,"active":true,"displayOrder":0,"closedWon":false},{"stageId":"70f3373e-9a01-41e5-b0b1-c14e83b76fa0","label":"Sign Up Form","probability":0.1,"active":true,"displayOrder":1,"closedWon":false},{"stageId":"evalulate_fit_call_scheduled","label":"Worksheet Back","probability":0.3,"active":true,"displayOrder":2,"closedWon":false},{"stageId":"ffed664e-5172-4bc8-9cc3-ab5593d93495","label":"Email list requested","probability":0.1,"active":true,"displayOrder":3,"closedWon":false},{"stageId":"bb2831e7-9a95-40a0-baf7-f019213a3625","label":"Working on event setup","probability":0.1,"active":true,"displayOrder":4,"closedWon":false},{"stageId":"d29e8914-0d5d-4aa7-8e25-d4cc96ad64de","label":"Event pending questions","probability":0.1,"active":true,"displayOrder":5,"closedWon":false},{"stageId":"7e896550-c626-40c2-b6b6-f8c7aa0ece08","label":"Event turned over","probability":0.1,"active":true,"displayOrder":6,"closedWon":false},{"stageId":"f33e3b53-a46c-46d0-b0af-96dd67f37ea2","label":"Send email blast","probability":0.1,"active":true,"displayOrder":7,"closedWon":false},{"stageId":"27581897-a5e6-4f20-9275-0a9c5a2579d5","label":"Closed- Won","probability":0.1,"active":true,"displayOrder":8,"closedWon":false},{"stageId":"26e35a55-ecc1-48c2-a72c-e025f0e1502a","label":"Closed- Lost","probability":0.1,"active":true,"displayOrder":9,"closedWon":false}],"label":"North America","active":true,"displayOrder":0,"staticDefault":false}

And here's the JSON I'm trying to send back (note just the more_info stageId changed):

{"pipelineId":"default","staticDefault":false,"active":true,"stages":[{"probability":0.1,"active":true,"closedWon":false,"stageId":"more_info","label":"More Info","displayOrder":0},{"probability":0.1,"active":true,"closedWon":false,"stageId":"70f3373e-9a01-41e5-b0b1-c14e83b76fa0","label":"Sign Up Form","displayOrder":1},{"probability":0.3,"active":true,"closedWon":false,"stageId":"evalulate_fit_call_scheduled","label":"Worksheet Back","displayOrder":2},{"probability":0.1,"active":true,"closedWon":false,"stageId":"ffed664e-5172-4bc8-9cc3-ab5593d93495","label":"Email list requested","displayOrder":3},{"probability":0.1,"active":true,"closedWon":false,"stageId":"bb2831e7-9a95-40a0-baf7-f019213a3625","label":"Working on event setup","displayOrder":4},{"probability":0.1,"active":true,"closedWon":false,"stageId":"d29e8914-0d5d-4aa7-8e25-d4cc96ad64de","label":"Event pending questions","displayOrder":5},{"probability":0.1,"active":true,"closedWon":false,"stageId":"7e896550-c626-40c2-b6b6-f8c7aa0ece08","label":"Event turned over","displayOrder":6},{"probability":0.1,"active":true,"closedWon":false,"stageId":"f33e3b53-a46c-46d0-b0af-96dd67f37ea2","label":"Send email blast","displayOrder":7},{"probability":0.1,"active":true,"closedWon":false,"stageId":"27581897-a5e6-4f20-9275-0a9c5a2579d5","label":"Closed- Won","displayOrder":8},{"probability":0.1,"active":true,"closedWon":false,"stageId":"26e35a55-ecc1-48c2-a72c-e025f0e1502a","label":"Closed- Lost","displayOrder":9}],"label":"North America","displayOrder":0}

Something appears to be going on the Hubspot side with the 500 errors. Hoping someone can take a look and help?

0 Upvotes
1 Reply 1
pukkasoft
Member

500 errors trying to update deal pipeline stageId

I have an update here - I tried using a stageId that was all new - instead of setting the 3rd stage back to "worksheet_back", I tried "worksheet_back2" and it worked. So my theory seems to hold that despite these stages all getting wiped out in the deal pipeline config, they are "still there" in some way which Hubspot is not expecting.

That's why I can't change it and why I'm getting a 500 error. So this appears to be a hubspot bug or unhandled exception that I will need help resolving.

0 Upvotes