Sales Tax Computation
Sales Tax Computation
Updated on Dec 3, 2024
Published on Sep 23, 2024
5 minute(s) read
Often quotes include a section for tax determination, within which the tax amount (if applicable) is determined and then added to the overall quote amount.
In general, taxes on a quote include VAT, Sales Tax, etc and is influenced by many factors such as products or services sold, location of buyer, tax rate, exemptions, etc.
In addition each state in the USA can have 100s of Sales Tax jurisdictions. In fact, there are about 11,000 different authorities that impose a sales tax in the United States, so it becomes a challenge to keep up to date with various tax levels for each of these authorities. This is where a Tax computation software becomes valuable.
In the CPQ process, Tax computation is typically done after (a) Customer information is populated into the quote: typically from the CRM, (b) Products to be sold have been added to the quote line items table, typically from the Product Catalog (c) Sale/Delivery location has been added (d) Discounts have been provided, either at individual line items level or at the quote level. This ensures that the Tax computation is flexible enough to take each of these parameters into account.
Mobileforce CPQ provides integration with popular tax computation software in order to perform tax computations. Most tax computation software use various attributes relating to the customers, the locations, the products, and the discounts to compute taxes. Mobileforce is able to provide all of these attributes (extracted again via API calls by Mobileforce CPQ from various systems of record) and marshalled to a tax computation software via an API call that the tax computation software supports. Different tax computation software have different APIs with distinct parameters, so Mobileforce CPQ is able to create integrations to each of these tax computation software by providing a mapping from the CPQ parameters to the parameters required by the API.
This section describes such integrations for specific tax computation software.
TaxJar Integration
In order to use TaxJar, for computing Sales Tax, the following parameters need to be specified
Admin specified parameters
All of the following parameters are specified on a one time basis, when configuring Mobileforce CPQ Quote UI to use TaxJar.
- TaxJar token. Specified using the ADL Property Key taxjar-api-token. From your taxjar account, the "API Access" section will provide this information
- Action URL for "Create Action" in CPQ quote UI, to compute Sales Tax.
- TaxJar Input Fields standard mapping
- TaxJar Output Fields standard mapping
- taxjar_map_override any over-ride to standard mapping
TaxJar Field mapping
Note: the input fields are used in computing Sales Tax. These fields are specific to a deal or could also be specific to a line item. That is why these fields have "line_items." qualification.
The output fields are the ones computed by calls to TaxJar API. Some output fields (e.g., _shipping_tax_collectable are specific to the entire quote, whereas others (e.g., line_items.combined_tax_rate are again specific to individual line items).
| Field Type | TaxJar Field | Mobileforce CPQ Field |
|---|---|---|
| input | from_country | company_country |
| input | from_zip | company_zip |
| input | from_state | company_state |
| input | from_city | company_city |
| input | from_street | company_street |
| input | to_country | to_country |
| input | to_zip | to_zip |
| input | to_state | to_state |
| input | to_city | to_city |
| input | to_street | to_street |
| input | amount | line_items_cpq_system_total |
| input | shipping | freight |
| input | line_items.id | line_items.cpq_id |
| input | line_items.product_tax_code | line_items.tax_code |
| input | line_items.quantity | line_items.cpq_quantity |
| input | line_items.unit_price | line_items.list_price |
| input | line_items.discount | line_items.discount_amt |
| output | _shipping_tax_collectable | freight_tax |
| output | _line_items.combined_tax_rate | line_items.tax_percent |
| output | _line_items.tax_collectable | line_items.tax_amt |
How to Override Field Mappings
Sometimes, the field mappings are custom to a specific customer or a workflow. To support a different or a custom field mapping, an override prop key can specified, for example, as follows
Code snippet
<prop key="taxjar_map_override">{"line_items.unit_price": "line_items.net_total_price ","line_items.discount": "" }</prop>
Avalara Integration
Avalara is a cloud-based software that automates various aspects of tax compliance. In the context of Mobileforce CPQ, Avalara's tax calculation (AvaTax) is used to complete a quote by adding tax to the cost of products and services sold. Please note that Avalara also offers other software products such as document management, reporting, and e-invoicing, which are outside the scope of the Mobileforce CPQ integration. Avalara AvaTax platform supports tax types, such as (a) sales tax, (b) VAT, (c) GST, (d) excise, (e) communications, (f) lodging, and (g) customs duties.
Avalara account information
In order to integrate Mobileforce CPQ with Avalara, the following information is needed from an Avalara instance:
- Avalara Account Number: a 10-digit number used to authenticate the API calls
- Avalara License Key: a 13-character or 16-character string used to authenticate the API calls to Avalara.
- Avalara credentials: Username & Password: used to log in to the Avatax Admin Console.
- Company Info: this consists of two parts:
- Company Code (a unique code that identifies your company in the AvaTax account ), and
- Company ID (a unique identifier for your company in the Avalara database, typically a 6-digit number).
To find your Company Code, in your
AvaTax account, click the Settings tab and select Company details.
Note
The Company Code is a required field in order for the Avalara integration to succeed.
To find your Company ID, just look at the URL for your Avalara instance.
Note
If a company has two CRM instances (and hence two CPQ instances) such as a stage and a production instance, then you'd also need two Avalara accounts/instances as well.
Tax Codes
A tax code is a unique label that is used to group Items (products, services) together. Tax codes typically identify categories of similar products, services, or charges, and are used to identify which tax rules and rates to apply to a specific charge.
There is a one-to-many relationship between tax codes and products. For example, the tax code "Apparel" can map to hundreds of product SKUs for clothing in various sizes and colors. For many companies, a single tax code, such as "Internet Service" is applicable to all products sold.
Note
A key to sales tax computation using Avalara is to map each product and service in your Mobileforce Product Catalog to an Avalara Tax Code. This mapping would then be used to compute sales tax for each product and service that is included in the line-items tables of your quotes.
More details about the Avalara Tax Code can be found here
Note
Tax codes are also useful because certain products and services (mapped to specific tax codes) are taxable in certain states and not taxable in others. Tax codes abstract this distinction.
Address for tax computation
In destination-based (or interstate) ecommerce transactions, the shipping address (and not, say, the billing address) is used for tax computation.
However, in Origin-based sales tax computation, the address where the sold items originate is used to compute sales tax.
Since shipping addresses need to be accurate, not just for delivery, but also for tax computation, Avalara provides a mechanism to validate and convert addresses to USPS addresses.