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