Document toolboxDocument toolbox

TaxRate Object

The TaxRate object defines tax rates to be used by the mobile application when calculating estimates and invoice totals. TaxRate objects are then associated with a specific zip code. The TaxRate object definition contains tax rates grouped by work order type and then by product item type. This means that for every zip code there can be a unique tax rate for each work order type / product type combination. 

If the TaxRate object does not contain an entry for a specific work order type / product type combination, then the application assumes there is no tax.

Line item type is a synonym for product type. Product type is the internal name as the data resides in the product table while line item type is the term often used when when talking about its use cases. For example, when referring to an invoice you usually think of line items and line type types like parts, labor, and travel. Saying a travel product type does not always make sense.

TaxRate Object Formats

JSON Format
{
	"OrderTypes": [
		{
        	"OrderType": "${WorkOrderType}",
            "ProdTypes": {
                "${ProdType}": 6.0,
                "${ProdType}": 6.0
            }
        }
	]
}

TaxRate Object Properties

(info) Required properties are in bold.

PropertyTypeDescription
OrderTypescollection

A collection of tax definitions grouped by work order type.

PropertyTypeDescription
OrderTypestring

Identifies the specific work order type the tax rates apply to. This must be a valid Work Order Type system category value.

OrderType with "*" value identifies default tax rates. The default tax rate object may appear at any position in the OrderTypes collection. Mobile application will apply default tax rates to the work order in case it is present.

ProductTypescollection

A collection of key/value pairs that define the tax rates for the specific product types.

The key, or left side, must be a valid product type system category code. The value assigned to the key is the tax rate. For example, a value of 6.0 would mean a tax rate of 6%.





Example

In this example the TaxRate object JSON has defined tax rates for two different work order types.

The first tax rate definition is for work orders of type 1001 (Install). This definition includes a tax rate of 6% for products of type 1001 (parts).

The second tax rate definition is for work orders of type 1005 (repair). This definition includes a tax rate of 6% for products of type 1001 (parts), a tax rate of 4% for products of type 1002 (labor), and finally a tax rate of 6% for products of type 1005 (travel).

This TaxRate object definition would then be associated with a specific zip code through the Tax REST API. When a technician visits an customer with the same zip code this table would be used to calculate the taxes.

Example JSON
{
    "OrderTypes": [
        {
            "OrderType": "1001",
            "ProdTypes": {
                "1001": 6
            }
        },
        {
            "OrderType": "1005",
            "ProdTypes": {
                "1001": 6,
                "1002": 4,
                "1005": 6
            }
        }
    ]
}