Get line items (including discounts and fees) from quotes

hqplus_mathias
Participant

Hello everybody,

 

we're currently building an internal subscription and billing system which connects to HubSpot to pull company and deal information.

HubSpot deals are being persisted in our system along with line items. Mainly we are selling subscription-based (sometimes discounted) products. Occasionally there's a one-time fee attached.

So far the implementation is pretty straight-forward. But we've been hitting a wall when it comes to one-time discounts (usually given with the first invoice).

 

As a GUI user (this is how the information gets entered) we tried the following:

  • Using negative-valued line items in deal products but that throws an error and won't save
    • so we can't pull that information though the API
  • Adding discounts in quotes (step 4) which create other challenges along the way
    • discounts added in quotes don't show up anywhere else in the deal view
    • discounts added in quotes don't change the deal value
    • discounts (and fees and taxes) are not available in the quotes API response
    • hs_quote_amount differs from the deal amount because the discounts, fees and taxes have been applied and additionally there's no way knowing what's what.

We are not sure where to go next. Either it should be possible to get one-time discounts through (deal) line items or make the properties available in the quotes API response. Though we would still have the issue that discounts given in a quote are not reflected in the deal amount.

 

Has anybody an idea how to tackle this problem? Are we missing something obvious?

 

Thanks in advance

Mathias

 

EDIT

We also tried using zero-valued line items with applied item discount. They do persist in HubSpot and show up in quotes. We can also pull them through the API. So, it's basically what we are looking for but it seems to be an odd behaviour to add a product with a value of 0 and then apply the discount.

 

screenshot.png

5 Replies 5
WendyGoh
HubSpot Employee

Hey @hqplus_mathias,

 

Thanks for the detailed use case! Spot on. Currently, there isn't a way to retrieve discount applied on a quote. Your workaround (though not ideal), is probably the best workaround for now. 

 

Moving forward, I can honestly see a use case for this request and if you haven't already, I'd recommend jumping over to the HubSpot Ideas Forum and posting this idea there so that it's visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest.

0 Upvotes
FernandoPin
Participant

Hi Hqplus_mathias,

 

Any progress on this? I have exactly the same problem: Discount is not a property so it is not possible to send it to the ERP via API.  

 

I will try to create a product line with value 0 and with the discount.

0 Upvotes
hqplus_mathias
Participant

As we can't use the discount that could be applied during the creation of a quote we decided to refrain from adding any additional amounts in quotes.

We will only accept objects from the deal (line items).

 

As for the one-time discount, we will take the somewhat awkward way of adding a line item with a price of 0. The BDR then applies the discount resulting in a negative amount.

It's not ideal since the line item is just a line item with a price of 0 and discount rather than a dedicated discount. But this is the only path we could find.

 

Also, be aware that the behavior changes a little when using the new deal product editor (currently in beta). You can not apply a price of 0 and add the discount. You first need to set the price to at least the amount of the discount, then apply the discount, and then set the price to 0.

It's probably due to the fact that the new editor calculates all values on the fly and doesn't allow division by 0 (discount * 100 / price [which would be 0]). I'm not sure if they're going to "fix" this or leave it as is. If they're going to fix we will face another challenge 😉

 

The Infinity is for the calculated percentage.

Bildschirmfoto 2020-07-31 um 09.20.48.png

 

Hope that helps. Let me know what you think

0 Upvotes
hqplus_mathias
Participant

Unfortunately but as expected the workaround has been removed. It is not possible to add a line item with a negative price/amount. The minimum is 0.

0 Upvotes
CMayer
Contributor

@hqplus_mathias as of today this behavior seems to work. I can add a line item with value 0 and discount 100 -> -100

@WendyGoh will this behavior stay or be "fixed" and removed someday? We have the same problem as @hqplus_mathias (well, similar problem) and would build on this behavior for a large sales organization. So it would be good to know if this behavior will stay. Thanks

0 Upvotes