APIs & Integrations

jagee
Participant

Get Products Associated with Deals via API

We are starting to use the new Products area of the CRM and need to get the products that are associated with a deal via the API. How can we do this?

13 Replies 13
sk0si
Contributor

Get Products Associated with Deals via API

Yes, I also would be happy to get a Product API. 

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get Products Associated with Deals via API

Hi @Juanps,

I wasn't totally clear on how exactly the Deal/Product/Line Items association works. Products are associated to deals through line item objects. Line item objects have the hs_product_id property, which will be the objectId of a product object. The line item object is then associated with a specific deal object. Deals are not directly associated with a Product.

You'll want the deal<->line items association type, which should give you the info you need. Also, here are the docs for the Products API & the Line Items API, for reference:

Not applicable

Get Products Associated with Deals via API

Hi Derek,

I am new to Hubspot API. I was looking for this feature (association of products with deals) and looks like I logged into the forums at the right time :slight_smile:

We are planning to migrate from Pipedrive to Hubspot soon. I had written an automation code so that when a new deal is created in Pipedrive:

  1. An invoice is created in XERO (our accounting software) - with products and other details form the deal.
  2. the invoice is attached to the deal in Pipedrive.
  3. the invoice is emailed to the client (taking the email address from XERO).

When the payment of the invoice is done in XERO, another automation code does:

  1. deal moves to the "paid" stage for further processing.
  2. Employee emailed with info.

Can the above be done using Hubspot API? Please let me know.

Also, I would like to see an example (if there is one) of how to associate the product with the deal using line item and association API.

I went through the links you provided (thanks for that). I did not understand one thing. If the deal is created manually, and the products added manually to the deal? How will we use the line item API/product API/Association API to get all the products in that deal and their quantity, price etc?

Thank you

juanps
Member

Get Products Associated with Deals via API

Ok, but i didnt saw in the assiciation type "Product to Deal"

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get Products Associated with Deals via API

Hi @Juanps,

You'll want to start using the Associations API, which is currently in Developer Preview:

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get Products Associated with Deals via API

Hi @Juanps (and others),

The Products API is now in developer preview:

0 Upvotes
juanps
Member

Get Products Associated with Deals via API

Hi Derek

i saw the api however i didn't see any method to associate a deal an a product.

do you know if there is something to achieve this programatically?

juanps
Member

Get Products Associated with Deals via API

Any update on this topic? i need to associate the product to the deal in order to give better communication on wich product theyre looking for.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get Products Associated with Deals via API

Hi @notanothercliche (and others),

This isn't something that you can do at the moment, but it's definitely something on the team's radar. I don't have any definite timeframes at this stage, but object associations are a much requested feature and product is aware of the current limitations. At the risk of sounding like a broken record, the best thing you folks can do at this stage is to create/upvote posts on the HubSpot Community. While this Developer Forum is more cloesly related to the subject of this request, the Ideas Forum is the place with the highest visibility for both other HubSpot users who might also want this functionality, and the HubSpot product team looking to gauge the desire for a feature/functionality.

0 Upvotes
notanotherclich
Member

Get Products Associated with Deals via API

@Derek_Gervais my favorite go to guy, do you have any idea on this?? My deals all have money value but I don't know how to assign products to them. Please help, as this seems to be a question asked often and I haven't seen any Hubspot replies.

Thank you SO much!!

0 Upvotes
DavidEedle
Participant

Get Products Associated with Deals via API

Ditto. Am trying to import a bunch of data from old CRM to HS - and I want to assign products to deals via the API but cannot see a way to do so.

ronemrick1
Member

Get Products Associated with Deals via API

Agree… we have the same issue and would very much welcome a Product API. Any news that can be shared on an expected timeframe for such an addition to the APIs?

Thanks,
-Ron

MehulDhikonia
Member

Get Products Associated with Deals via API

We have run into exactly the same problem the current APIs do retrieve associatedCompanyIds and associatedVIds but has no mapping to products.