I am trying to use an external system to post in line items onto a Deal record with tax calculated by a 3rd party tax engine, in this case Avalara.
I don't want to have to create a HubSpot Tax item for every different sales tax % as there are over 11,000 jurisdictions in the US alone. I would like to pass in a tax rate as a % or an amount on the line item.
In the line item properties response ({{base-url}}/crm/v3/properties/line_item/) there is a property for "
hs_auto_tax_amount" with the description "
"The amount of tax automatically calculated for this line item by an external system".
However, it looks like this is a read only field and if I post a line item via API it always remains null.
Has anyone managed to find a way to use a custom/variable tax rate on line items? Or any workarounds?
Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success. Don't miss this opportunity to connect and grow—reserve your spot today!
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !
@Jaycee_Lewis I appreciate the time taken to respond, however, those fields are Read Only fields as specified in the properties response you've shown.
At this stage I believe HubSpot does not handle line item tax via an integrated third party tax engine (Avalara, TaxJar, an ERP) at all. The two practical workarounds I can see are:
1. Use the tax item at quote level to aggregate all tax, this is available via API and can be set to any value
2. Use custom propoerties on the line items and customise the quote template to display appropriately
I'm hopeful that tax handling will mature rapidly in the product to close the gap to other CRM's on the market in the Quote to Cash process.
Hey, @rncmarques👋 Thanks for the great question. Have you looked at using `hs_tax_rate` along with `hs_tax_amount`? Looking at the response from the Properties API for Line Items, I noticed the calculation used for `hs_tax_amount` requires `hs_auto_tax_amount` OR `hs_tax_rate` along with `amount`. And we can set the value for `hs_tax_rate` using the API 😊
Response from Properties API
name": "hs_tax_rate",
"label": "Resolved Tax Rate",
"type": "number",
"fieldType": "number",
"description": "Represents tax rate as percent out of 100. Supports up to 4 decimal places",
"name": "hs_tax_amount",
"label": "Tax Amount",
"type": "number",
"fieldType": "calculation_equation",
"description": "Amount of tax calculated based on tax rate for this line item",
"groupName": "price",
"options": [],
"displayOrder": -1,
"calculated": true,
"externalOptions": false,
"hasUniqueValue": false,
"hidden": false,
"hubspotDefined": true,
"showCurrencySymbol": true,
"modificationMetadata": {
"archivable": true,
"readOnlyDefinition": true,
"readOnlyValue": true
},
"formField": false,
"calculationFormula": "round_nearest(if is_present(hs_auto_tax_amount) then hs_auto_tax_amount\nelseif (is_present(amount) and is_present(hs_tax_rate)) then (hs_tax_rate * 0.01 * if is_present(amount) then amount else 0) endif, if is_present(currency_decimal_places(string(hs_line_item_currency_code))) then currency_decimal_places(string(hs_line_item_currency_code))\nelseif is_present(currency_decimal_places(fetch_single_currency_portal_currency)) then currency_decimal_places(fetch_single_currency_portal_currency) else 2)",
"dataSensitivity": "non_sensitive"
Have fun testing! — Jaycee
Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success. Don't miss this opportunity to connect and grow—reserve your spot today!
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !