APIs & Integrations

latika_karnani
Participant

Return data of modified fields within pipeline

SOLVE

Inside deals, we have sales pipeline. With the API URL https://api.hubapi.com/deals/v1/pipelines,
I just get the structure of the pipeline, i.e. we have Targets, Warm leads, basic subscription, proposals..etc.
But it doesn't return the data of the companies, that are listed within the pipeline.

Precisely I need the names of the companies, when deals were changed.

For example in this month, 5 companies were moved from basic to proposal. I want to get the names of those companies.

How can we do this?

0 Upvotes
1 Accepted solution
latika_karnani
Solution
Participant

Return data of modified fields within pipeline

SOLVE

Got it. Thanks Issac.
If anyone in future reading this,
check this out https://support.klipfolio.com/hc/en-us/articles/216182487-MAP-function

View solution in original post

0 Upvotes
7 Replies 7
latika_karnani
Solution
Participant

Return data of modified fields within pipeline

SOLVE

Got it. Thanks Issac.
If anyone in future reading this,
check this out https://support.klipfolio.com/hc/en-us/articles/216182487-MAP-function

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Return data of modified fields within pipeline

SOLVE

Hi @latika.karnani,

I have only worked with Klipfolio in this limited capacity.

Why don't you believe you can populate timestamps in a request URL and then loop through the results?

Both of these are possible (see this discussion and this thread, for example), so please be specific with the issues you are encountering.

Isaac Takushi

Associate Certification Manager
0 Upvotes
latika_karnani
Participant

Return data of modified fields within pipeline

SOLVE

Hi Isaac,
I understand the process. Have you worked with Klipfolio before?
I don't think we can pass a value in the API URI for since=,
nor can we loop through the results in a variable and assign the value in the URL request for the endpoint.

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Return data of modified fields within pipeline

SOLVE

Hi @latika.karnani,

For your first question, you could calculate that timestamp by using a function like Date.now() and then subtracting 2592000000, which is 30 days in milliseconds. You would then use this resulting timestamp as the value for since.

I'm not sure what you mean by your second question. If you get all the company IDs, you can use a for loop to loop through every ID returned, store the value(s) in a variable and then use that variable to populate the request URL for this endpoint. If the for loop is built correctly, it should call the endpoint for every company ID. Each request will return data for that company record, from which you can retrieve the value of the name property. You can then surface the company name so that users know which companies are associated with a deal.

Isaac Takushi

Associate Certification Manager
0 Upvotes
latika_karnani
Participant

Return data of modified fields within pipeline

SOLVE

Awesome. this gives me a great start. Thank you Issac. I have one question regarding this. If I want https://api.hubapi.com/deals/v1/deal/recent/modified&since=x
where x would be present - 30 days, how do we do this in unix time format here?

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Return data of modified fields within pipeline

SOLVE

Welcome, @latika.karnani,

The Deal Pipelines API is deprecated, so I recommend using the CRM Pipelines API going forward.

That said, neither of these pipeline APIs will return data about companies — they will only return data about pipelines. You must use a couple different APIs because pipelines, companies, and deals are different objects.

The Get recently modified deals endpoint, however, returns associatedCompanyIds. You can then use these companyId values to get the company name property value from this Companies API endpoint.

Isaac Takushi

Associate Certification Manager
0 Upvotes
latika_karnani
Participant

Return data of modified fields within pipeline

SOLVE

Another question,


Even if I am able to extract the associated company IDs of modified deals like this, how will I dynamically put those IDs in the Company API endpoint which goes in data source?

0 Upvotes