Skip to content
HubSpot quote template showing line item with GST applied conditionally based on custom property.
HubDevJun 25, 2025 1:41:12 AM< 1 min read

Automating Line-Item GST Calculation in HubSpot Quotes

In HubSpot Quotes, accurate tax handling at the line item level is essential—especially when GST needs to be applied selectively. A common use case is applying GST only when a custom dropdown field is marked as "Yes".

With HubL, HubSpot’s templating language, this can be handled directly within the quote template. No external scripts, no workarounds—just smart logic embedded in your layout.

Objective

Show the total price including tax (GST) for each line item only when a custom property like apply_gst equals "Yes".

Implementation

Inside the property_name_amount_span_1 span of your quote template, use the following logic:

{ % set price = property_value|float % }
{ % set tax = line_item.hs_tax_amount|default(0)|float % }
{ % set apply_gst = line_item.properties.apply_gst % }
{ % set total = apply_gst == "Yes" ? price + tax : price % }
{ { total|format_currency_value(locale=locale, currency=currency, maxDecimalDigits=max_decimal_digits)|sanitize_html } }

This snippet does the following:

  • Reads the base price from the line item

  • Adds the tax amount only if the apply_gst property is set to "Yes"

  • Outputs the final value formatted with currency rules

Example Use Case

Suppose your quote includes:

  • Custom Website Build (apply_gst: Yes)

  • #BBD0E0 » 5 the editor
avatar

HubDev

I build flexible, easy-to-use HubSpot themes, templates, and modules that integrate seamlessly with the rest of your HubSpot tools. Let me handle the technical aspects so you can focus on your marketing campaigns.

RELATED ARTICLES