# Domain and scope

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/cba3379020388679/

Guide: Communications

# Domain and scope

Understand how to specify domain and scope for exemptions in Avalara's tax automation system.

Before continuing with exemptions, it’s important to understand how to specify a domain and a scope in an exemption.

-   Domains define the circle of associated tax jurisdictions that match what you're trying to exempt.

-   Scope defines the tax levels in which the taxes will be considered as candidates for exemption and determines where the exemption is to be applied.

## Domain

When exempting an invoice, you must specify one or more exemption domains in a single exemption. This is done using the`dom` field in the [TaxExemption](https://developer.avalara.com/api-reference/communications/v2/models/TaxExemption/) model. Available domains include:

-   `0`: Federal

-   `1`: State

-   `2`: County

-   `3`: City

This value defaults to city (`3`), but we recommend that you don’t allow this to have a default value for users.

## Scope

In addition to a domain, when exempting an invoice you must also specify the exemption scope. This is done using the`scp` field in the [TaxExemption](https://developer.avalara.com/api-reference/communications/v2/models/TaxExemption/) model. Available scope options include:

-   `128`: Federal

-   `256`: State

-   `512`: County

-   `1024`: Local

You can combine of one or more of these values by adding the appropriate values together. For example, to exempt all, use`1920` (combination of Federal + State + County + Local).

## **Example**

**View request**:

This example demonstrates the use of domain (`dom`) and scope (`scp`), unique for each exemption.

```
{
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": true,
    "frch": true,
    "reg": false
  },
  "inv": [
    {
      "bill": {"ctry": "USA","st": "PR","city": "Adjuntas","zip": "00601","int": true
      },
      "cust": 1,
      "lfln": false,
      "date": "2018-02-01T12:00:00Z",
      "exms": [{  "loc": {    "pcd": 5116000  },  "tpe": 35,  "dom": 1,  "scp": 256},{  "loc": {    "pcd": 5116000  },  "tpe": 1,  "dom": 3,  "scp": 1792},{  "loc": {    "pcd": 5116000  },  "tpe": 170,  "dom": 0,  "scp": 128},{  "loc": {    "pcd": 2604100  },  "tpe": 232,  "dom": 1,  "scp": 1920}
      ],
      "itms": [{  "ref": "1.03.dom",  "chg": 100,  "line": 0,  "sale": 1,  "incl": false,  "tran": 13,  "serv": 6,  "dbt": false,  "adj": false}
      ],
      "invm": true,
      "dtl": true,
      "summ": false
    }
  ]
}
```

**View response**:

The effects of domain and scope are seen in the tax type (`tid`) and tax level (`lvl`).

```
{
  "inv": [
    {
      "itms": [{  "ref": "1.03.dom",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E911 (Business)",      "exm": 0,      "lns": 0,      "min": 0,      "pcd": 5115900,      "rate": 1,      "sur": false,      "tax": 0,      "lvl": 1,      "tid": 35    },    {      "bill": true,      "cmpl": true,      "tm": 62.9,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "State Universal Service Fund",      "exm": 37.1,      "lns": 0,      "min": 0,      "pcd": 5115900,      "rate": 0.0139,      "sur": false,      "tax": 0.8743099999999999,      "lvl": 1,      "tid": 13    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 1,      "cat": "SALES AND USE TAXES",      "cid": 1,      "name": "Sales Tax",      "exm": 100,      "lns": 0,      "min": 0,      "pcd": 5116000,      "rate": 0.01,      "sur": false,      "tax": 0,      "lvl": 3,      "tid": 1    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 1,      "cat": "SALES AND USE TAXES",      "cid": 1,      "name": "Sales Tax",      "exm": 100,      "lns": 0,      "min": 0,      "pcd": 5116000,      "rate": 0.105,      "sur": false,      "tax": 0,      "lvl": 1,      "tid": 1    },    {      "bill": true,      "cmpl": true,      "tm": 37.1,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Fed USF Cellular",      "exm": 62.9,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.195,      "sur": false,      "tax": 7.234500000000001,      "lvl": 0,      "tid": 55    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 2,      "cat": "REGULATORY CHARGES",      "cid": 6,      "name": "FCC Regulatory Fee (Wireless)",      "exm": 100,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.0175,      "sur": false,      "tax": 0,      "lvl": 0,      "tid": 170    },    {      "bill": false,      "cmpl": true,      "tm": 37.1,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecommunications Relay Surcharge (Cellular)",      "exm": 62.9,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.02289,      "sur": false,      "tax": 0.8492190000000001,      "lvl": 0,      "tid": 232    }  ]}
      ]
    }
  ]
}
```