APIs & Integrations

Benatt
Participant

Associating product through line item is not updating deal amount

Hello, 

 

I need to add products to deal so first I create a line item with : 

 

v3/objects/line_items/batch/create

var payload = {
    inputs: [
      {"properties": {
      "hs_product_id": productToAdd,
        "quantity": "1",
      }}, 
      {"properties": {
      "hs_product_id": "12345",
        "quantity": "1",
      }}
    ]
  }

 

 Then with the responses I associate those line items through the second end point 

 

/crm/v3/objects/line_items/{lineItemId}/associations/{toObjectType}/{toObjectId}/{associationType}

 

 

Product are added correctly, but the amount of the deal is now in manual mode and equal to 0.. any idea to keep it automatically calulated ?

 

Éditeur de ligne de transaction 2020-10-01 at 11.42.44 PM.png

3 Replies 3
timor
Member

Associating product through line item is not updating deal amount

Is this still an API's limitation? Is this supposed to be addressed at your product's backlog anytime soon?

 

Thanks!

Benatt
Participant

Associating product through line item is not updating deal amount

OK, so for the others, I calculated by myself and updated the property thanks to the API... 🤓

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Associating product through line item is not updating deal amount

Hey @Benatt,

 

Currently, it is not possible to roll up deal amount from line item amounts via the HubSpot APIs.

 

This is only possible through the HubSpot UI in which you would need to check this option when you add a new product:

image.png

 

 

0 Upvotes