Updating deal creates new deal record

ZRetterath
Participant

Hello,

 

I am using the CRM API to create and update deal records and am noticing an oddity when updating deals:

 

 

hubspotClient.crm.deals.basicApi.update(dealIdToUpdate, dealPropertiesObject, undefined)

 

 

where 'dealIdToUpdate' is the ID of an existing deal *does* in fact update the deal as I expect, which is great, but it also always creates a new deal with the same properties.

 

I am using a stripe integration and based on certain webhooks calling this update method, which is only firing once, and that leads me to believe there is an issue somewhere in my hubspot code.

 

I am curious if this is a known bug that others have experienced, otherwise how I might go along resolving the issue?

Thank you for any and all guidance/support.

 

Best,

Zach

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hi @ZRetterath ,

 

If you use an API key or a private app you can check the call log to see what is happening at the HubSpot side. 

 API Key logs: https://app.hubspot.com/api-key/<portalId>/call-log 

Private app logs: https://app.hubspot.com/private-apps/<portalId>/<appId>/logs/api

 

That way, you can check if your code is making multiple calls to HubSpot.

I do not see anything wrong with your code, so if possible, please share a bit more.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

4 Replies 4
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hi @ZRetterath ,

 

If you use an API key or a private app you can check the call log to see what is happening at the HubSpot side. 

 API Key logs: https://app.hubspot.com/api-key/<portalId>/call-log 

Private app logs: https://app.hubspot.com/private-apps/<portalId>/<appId>/logs/api

 

That way, you can check if your code is making multiple calls to HubSpot.

I do not see anything wrong with your code, so if possible, please share a bit more.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


ZRetterath
Participant

Thanks, Teun! Following your steps I was able to diagnose and patch the issue.

 

I appreciate the response and assistance!

 

Best,

Zach

0 Upvotes
Teun
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Awesome! Happy I could help!



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
dennisedson
Community Manager
Community Manager

I don't see anything with that line of code that would create a new deal...

Can you add more of your code here?  @Teun , you see anything?


loop Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
Learn More

0 Upvotes