# Entity use code scenario

Source: https://developer.avalara.com/ecommerce-integration-guide/test-transactions/core-sales/entity-use-code-scenario/

In this scenario, we’ll confirm that an entity use code gets passed to AvaTax in the transaction. We'll also confirm that the tax amount is zero due to the exemption in both our platform and yours. This scenario assumes the following:

-   The `shipFrom` address is anywhere in the US.

-   The `shipTo` address is in Washington DC, so be sure that you configured your company to collect tax in Washington DC.

-   The customer record is set to exempt for reason G - Resale.

-   Line 1 `amount` is $100, and the `taxCode` is `P0000000`.

-   Line 2 `amount` is $75, and the `taxCode` is `P0000000`.

-   Line 3 `amount` is $10, and the `taxCode` is `FR020100`.

Refer to the [Exempt reason matrix for the US and Canada](https://knowledge.avalara.com/bundle/dqa1657870670369_dqa1657870670369/page/Exempt_reason_matrix_for_the_U.S._and_Canada_entity_use_code_list.html) article in the Avalara Knowledge Center.

## Expected result

Verify that AvaTax didn’t calculate tax. In the UI, you should also see that the Entity Use Code is type Resale.

![Sales tax entity use code scenario](https://avalara-devdocs-prod.mcoutput.com/avatax-for-ecom/Content/Resources/Images/DevDot/scenario-entity-use-code_962x441.png)  

## Example

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-ecom/Content/Skins/Default/Stylesheets/Images/transparent.gif)View request](javascript:void\(0\);)

```
{   "lines": [    {      "number":"1",      "quantity":1,      "amount":100,      "taxCode":"P0000000",      "itemCode":"Test SKU",      "description":"Test Item Description",      "discounted": false    },    {      "number":"2",      "quantity":1,      "amount":75,      "taxCode":"P0000000",      "itemCode":"Test SKU",      "description":"Test Item Description",      "discounted": false    },    {      "number":"3",      "quantity":1,      "amount":10,      "taxCode":"FR020100",      "itemCode":"Freight SKU",      "description":"Common Carrier",      "discounted": false    }  ],  "addresses": {    "shipFrom":{      "line1":"100 Ravine Ln NE",      "city":"Bainbridge Island",      "region":"WA",      "country":"US",      "postalCode":"98110-2687"    },    "shipTo":{      "line1":"915 F St Nw",      "city":"Washington",      "region":"DC",      "country":"US",      "postalCode":"20004-1493"    }  },   "code":"Entity use code scenario",  "type":"SalesInvoice",  "companyCode":"ATCWALTERS",  "date":"2024-06-26",  "customerCode":"Test Customer ID",  "commit":true,  "currencyCode":"USD",  "entityUseCode":"G"}
```

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-ecom/Content/Skins/Default/Stylesheets/Images/transparent.gif)View response](javascript:void\(0\);)

```
{  "id": 85059642133189,  "code": "Entity use code scenario",  ...  "customerUsageType": "G",  "entityUseCode": "G",  ...  "totalAmount": 185,  "totalExempt": 185,  "totalDiscount": 0,  "totalTax": 0,  "totalTaxable": 0,  "totalTaxCalculated": 0,  ...}
```