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.
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
