I'd like to export all deals belonging to a specific HubSpot Owner. It seems that the CRM Associations API is what I need, but the response from that API contains IDs rather than actual objects, e.g. if I request all deals associated to an owner ID, I will get a list of the deal IDs.
What I actually need are the actual deal objects with the usual fields (amount, close date etc + history) and I don't see any feasible solution at the moment, other than making an API request to get every single deal by ID — which won't be practical if a user has hundreds or thousands of deals, because of Rate Limiting.
Is there a better way to do this efficiently? Or a hidden Batch API that allows me get a batch of deals by a list of IDs in one go?
Its possible to export only those deals who belongs to a specific deal owners. All that you have to do is under Deals, add a filter and use the property deal owner. Then add filter with the owner name that you want to get. Save filter. And then at near the saved filter you will get an options dropdown and from there you can export those filtered deals either with all properties or selected properties data.
In case you have any doubts, please feel free to write me again.
Thanks for the reply @himanshurauthan. Unfortunately I'm looking for a programmatic solution to automate exports and doing this manually through the UI is not really an option.
Can you please tell which sales plan do you have right now? Purpose of this question is to enure if your HubSpot account supports Deal Based workflows then we can have some workaround for this.
@himanshurauthan Just to give you some more context: I'm a building a HubSpot Integration app for the HubSpot Marketplace. Users should be able to connect their HubSpot instance, which might be on any plan available. Personally I'm using a Developer account.
With that in mind, could you please elaborate about the workaround?
I don't know if it will be of your use or not. The process what I thought of is:
1) Creat a deal based worflow. 2) Start the trigger by checking on deal owner property and comparing for specific deal owner. 3) Trigger a POST webhook to a url with proper endpoint. At that end, we can manage the export of the deals with deal objects that we get in webhook response.