APIs & Integrations

yerblich
Member

How to get deals in a specific stage, that is associated to a specific company

SOLVE

hi, with api  what is the easiest way to get all deals from a specific pipeline/stage (and other properties that i will define) that is associated to a company id, is there a hidden property on the deal that i can use to compare with ? i see in the Hubspot GUI in deals view, there is a column called "Associtated with" which displays the company it is associated with but it is not part of the properties in setting and therefore i have no way of getiting the internal id .

i can always get all the deals associated to the and then filter it out with code to find the correct deal stages but this can get complicated if there are alot of deals and will have to deal with multiple requests to to get all the results and then filter 

is there another way to to this?

0 Upvotes
1 Accepted solution
himanshurauthan
Solution
Thought Leader | Elite Partner
Thought Leader | Elite Partner

How to get deals in a specific stage, that is associated to a specific company

SOLVE

Hi @yerblich

 

In this case what you can do is, create a custom property in the company as 'Deal-ID' and create a small deal-based workflow in which you can copy the deal id property to your company's custom property.

 

deal-based-workflow.png

 

After creating the custom property and creation of workflow, fetch the specific company you want with the custom property.

 

Now in this property, you will find a deal id and through this deal, you can use the deal endpoint of HubSpot API to update the deal stage property of this deal id.

 

You can refer to these links:

Best Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology

View solution in original post

0 Upvotes
1 Reply 1
himanshurauthan
Solution
Thought Leader | Elite Partner
Thought Leader | Elite Partner

How to get deals in a specific stage, that is associated to a specific company

SOLVE

Hi @yerblich

 

In this case what you can do is, create a custom property in the company as 'Deal-ID' and create a small deal-based workflow in which you can copy the deal id property to your company's custom property.

 

deal-based-workflow.png

 

After creating the custom property and creation of workflow, fetch the specific company you want with the custom property.

 

Now in this property, you will find a deal id and through this deal, you can use the deal endpoint of HubSpot API to update the deal stage property of this deal id.

 

You can refer to these links:

Best Regards,

Digital Marketing & Inbound Expert In Growth Hacking Technology
0 Upvotes