APIs & Integrations

VvE-AVB
Participant

Line Item added through API disappears when publishing quote

SOLVE

Hello, 

 

I am writing a custom integration for our e-commerce platform to handle Request-a-Quote functionality. 

Through the API endpoints I am able to create a Deal, Quote, Contact and Line Item(s) and associate them with each other. A HS User is also assigned as the owner of the Quote.  

A sales rep (i.e. HS User) would next edit and publish the Quote. While testing this I encounter a recurring error: When Publishing the quote an error message appears: "There was a problem saving your quote. Please try again or contact support if the problem persists." Editing the quote again will show that the line item added through the API has been removed. 

QuoteErrorMessage.png

 

As far as I know there is no place to get more insight in the internal error. 

This error occurs regardless of quantity changes and regardless of whether or not any discounts, fees, taxes are applied. 

 

Manually adding the line item to the quote (from the product library) works as expected. I have pulled the quote & line item data through the API for both the manually-created and API-created quotes but I do not see any significant differences. The line item data are identical. The quote data are very similar, with differences only in the following fields: 

 

'hs_all_accessible_team_ids' =>
	API: string(8) "11964019"
	Man: NULL
'hs_all_owner_ids' =>
	API: string(9) "248063897"
	Man: string(0) ""
'hs_all_team_ids' =>
	API: string(8) "11964019"
	Man: NULL
'hs_allowed_payment_methods' =>
	API: NULL
	Man: string(24) "ACH;CREDIT_OR_DEBIT_CARD"
'hs_created_by_user_id' =>
	API: NULL
	Man: string(8) "26422377"
'hs_expiration_template_path' =>
 	API: NULL
 	Man: string(48) "@hubspot/cms-quotes-theme/templates/expired.html"
'hs_locked' =>
 	API: NULL
 	Man: string(4) "true"
'hs_pdf_download_link' =>
	API: NULL
	Man: string(108) "https://api-na1.hubspot.com/inbounddbquotes/v1/public-quotes/a1186af6eaef4a859762cd90388756e1/download/redir"
'hs_public_url_key' =>
 	API: NULL
'hs_status' =>
	API: string(5) "DRAFT"
	Man: string(19) "APPROVAL_NOT_NEEDED"
'hs_user_ids_of_all_owners' =>
	API: string(8) "47723627"
	Man: string(0) ""
'hubspot_owner_assigneddate' =>
	API: string(24) "2022-10-26T15:21:01.572Z"
	Man: string(0) ""
'hubspot_owner_id' =>
	API: string(9) "248063897"
	Man: string(0) ""	
'hubspot_team_id' =>
	API: string(8) "11964019"
	Man: NULL

 

Hopefully something in this data jumps out at a more experienced HubSpot developer. 

Thanks in advance for any feedback. 

 

Best wishes, 

Vincent

0 Upvotes
1 Accepted solution
VvE-AVB
Solution
Participant

Line Item added through API disappears when publishing quote

SOLVE

In case someone runs into the same issue, I wanted to share the solution:

 

It seems that (internally/behind the scenes) it is not possible to associate the same Line Item object to both the Quote and the Deal. To associate a Product to both Quote and Deal objects separate Line Items need to be created and associated with one or the other.

 

Thanks for the reply @MiaSrebrnjak 

View solution in original post

3 Replies 3
VvE-AVB
Solution
Participant

Line Item added through API disappears when publishing quote

SOLVE

In case someone runs into the same issue, I wanted to share the solution:

 

It seems that (internally/behind the scenes) it is not possible to associate the same Line Item object to both the Quote and the Deal. To associate a Product to both Quote and Deal objects separate Line Items need to be created and associated with one or the other.

 

Thanks for the reply @MiaSrebrnjak 

MiaSrebrnjak
Community Manager
Community Manager

Line Item added through API disappears when publishing quote

SOLVE

Thank you so much for coming back and sharing the solution @VvE-AVB! 👍

 

 




Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings


0 Upvotes
MiaSrebrnjak
Community Manager
Community Manager

Line Item added through API disappears when publishing quote

SOLVE

Hi @VvE-AVB,

 

Thank you for reaching out to the Community! 

I wanted to suggest reaching out to our technical support via your account if you haven't already, they should be able to get more information about the error you get when you're creating a quote. 

 

I also wanted to tag a couple of experts to see if they can spot something in your code: 

hi @himanshurauthan@MarkusHue@JBeatty, do you have any advice for @VvE-AVB? Thank you!

 

Cheers
Mia, Community Team  




Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings


0 Upvotes