# Adjustments examples

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

Guide: Communications

# Adjustments examples

## Example 1: Adjustment flag set to true

**View request**:

In this example, the adjustment flag (`adj`) is set to `true` on all 3 line item included in the invoice, and the charge amounts (`chg`) are positive values. Discount Type (`disc`) is set to`0` for Line Item 001,`1` for Line Item 002, and`5` for Line Item 003.

```
{
  "cmpn": {
    "bscl": 0,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "doc": "ADJUSTMENT FLAG EXAMPLE",
      "cmmt": false,
      "bill": {"cnty": "San Francisco","ctry": "USA","int": true,"geo": false,"city": "San Francisco","st": "CA","zip": "94102"
      },
      "cust": 0,
      "lfln": false,
      "date": "2022-04-01T12:00:00Z",
      "itms": [{  "ref": "Line Item 001 - Adjustment with Discount Type 0",  "chg": 100,  "line": 0,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 6,  "dbt": false,  "adj": true,  "disc": 0},{  "ref": "Line Item 002 - Adjustment with Discount Type 1",  "chg": 0,  "line": 10,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 21,  "dbt": false,  "adj": true,  "disc": 1},{  "ref": "Line Item 003 - Adjustment with Discount Type 5",  "chg": 25,  "line": 0,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 37,  "dbt": false,  "adj": true,  "disc": 5}
      ],
      "invm": true,
      "dtl": true,
      "summ": true
    }
  ]
}
```

**View response**:

Notice the negative exempt sale amounts (`exm`) and tax amounts (`tax`), indicating the credit back to your customer.

```
{
  "inv": [
    {
      "doc": "ADJUSTMENT FLAG EXAMPLE",
      "itms": [{  "ref": "Line Item 001 - Adjustment with Discount Type 0",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Universal Lifeline Telephone Service Charge (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0475,      "sur": true,      "tax": -1.6672499999999997,      "lvl": 1,      "tid": 454    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "CA Teleconnect Fund (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0108,      "sur": true,      "tax": -0.37908,      "lvl": 1,      "tid": 452    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "CA High Cost Fund A (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0035,      "sur": true,      "tax": -0.12284999999999999,      "lvl": 1,      "tid": 450    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "TRS (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.005,      "sur": true,      "tax": -0.17549999999999996,      "lvl": 1,      "tid": 217    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E911 (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0075,      "sur": false,      "tax": -0.26324999999999993,      "lvl": 1,      "tid": 161    },    {      "bill": true,      "cmpl": true,      "tm": 64.9,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "FUSF (VoIP)",      "exm": -35.099999999999994,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.174,      "sur": false,      "tax": -11.2926,      "lvl": 0,      "tid": 162    },    {      "bill": true,      "cmpl": true,      "tm": 64.9,      "calc": 1,      "cat": "REGULATORY CHARGES",      "cid": 6,      "name": "FCC Regulatory Fee (VoIP)",      "exm": -35.099999999999994,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.00302,      "sur": false,      "tax": -0.19599800000000003,      "lvl": 0,      "tid": 226    }  ]},{  "ref": "Line Item 002 - Adjustment with Discount Type 1",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "San Francisco Access line Tax (VoIP)",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 377300,      "rate": 3.27,      "sur": false,      "tax": -32.7,      "lvl": 3,      "tid": 250    }  ]},{  "ref": "Line Item 003 - Adjustment with Discount Type 5"}
      ],
      "summ": [{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "Universal Lifeline Telephone Service Charge (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0475,  "sur": true,  "tax": -1.6672499999999997,  "lvl": 1,  "tid": 454},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "CA Teleconnect Fund (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0108,  "sur": true,  "tax": -0.37908,  "lvl": 1,  "tid": 452},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "CA High Cost Fund A (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0035,  "sur": true,  "tax": -0.12284999999999999,  "lvl": 1,  "tid": 450},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "TRS (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.005,  "sur": true,  "tax": -0.17549999999999996,  "lvl": 1,  "tid": 217},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "E-911 CHARGES",  "cid": 7,  "name": "E911 (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0075,  "sur": false,  "tax": -0.26324999999999993,  "lvl": 1,  "tid": 161},{  "max": 2147483647,  "min": 0,  "tchg": -64.9,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "FUSF (VoIP)",  "exm": -35.099999999999994,  "lns": 0,  "pcd": 0,  "rate": 0.174,  "sur": false,  "tax": -11.2926,  "lvl": 0,  "tid": 162},{  "max": 2147483647,  "min": 0,  "tchg": -64.9,  "calc": 1,  "cat": "REGULATORY CHARGES",  "cid": 6,  "name": "FCC Regulatory Fee (VoIP)",  "exm": -35.099999999999994,  "lns": 0,  "pcd": 0,  "rate": 0.00302,  "sur": false,  "tax": -0.19599800000000003,  "lvl": 0,  "tid": 226},{  "max": 2147483647,  "min": 0,  "tchg": 0,  "calc": 4,  "cat": "E-911 CHARGES",  "cid": 7,  "name": "San Francisco Access line Tax (VoIP)",  "exm": 0,  "lns": -10,  "pcd": 377300,  "rate": 3.27,  "sur": false,  "tax": -32.7,  "lvl": 3,  "tid": 250}
      ]
    }
  ]
}
```

## Example 2: Adjustment flag set to false

**View request**:

In this example, the adjustment flag (`adj`) is set to`false` on all 3 line item included in the invoice, and the charge amounts (`chg`) are set to negative values, indicating the need for an adjustment. Discount Type (`disc`) is set to`0` for Line Item 001,`1` for Line Item 002, and`5` for Line Item 003.

```
{
  "cmpn": {
    "bscl": 0,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "doc": "NEGATIVE AMOUNTS ADJUSTMENT EXAMPLE",
      "cmmt": false,
      "bill": {"cnty": "San Francisco","ctry": "USA","int": true,"geo": false,"city": "San Francisco","st": "CA","zip": "94102"
      },
      "cust": 0,
      "lfln": false,
      "date": "2022-04-01T12:00:00Z",
      "itms": [{  "ref": "Line Item 001 - Adjustment with Discount Type 0",  "chg": -100,  "line": 0,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 6,  "dbt": false,  "adj": false,  "disc": 0},{  "ref": "Line Item 002 - Adjustment with Discount Type 1",  "chg": 0,  "line": -10,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 21,  "dbt": false,  "adj": false,  "disc": 1},{  "ref": "Line Item 003 - Adjustment with Discount Type 5",  "chg": -25,  "line": 0,  "sale": 1,  "incl": false,  "tran": 19,  "serv": 37,  "dbt": false,  "adj": false,  "disc": 5}
      ],
      "invm": true,
      "dtl": true,
      "summ": true
    }
  ]
}
```

**View response**:

Notice the negative exempt sale amounts (`exm`) and tax amounts (`tax`), indicating the credit back to your customer.

```
{
  "inv": [
    {
      "doc": "NEGATIVE AMOUNTS ADJUSTMENT EXAMPLE",
      "itms": [{  "ref": "Line Item 001 - Adjustment with Discount Type 0",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Universal Lifeline Telephone Service Charge (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0475,      "sur": true,      "tax": -1.6672499999999997,      "lvl": 1,      "tid": 454    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "CA Teleconnect Fund (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0108,      "sur": true,      "tax": -0.37908,      "lvl": 1,      "tid": 452    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "CA High Cost Fund A (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0035,      "sur": true,      "tax": -0.12284999999999999,      "lvl": 1,      "tid": 450    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "TRS (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.005,      "sur": true,      "tax": -0.17549999999999996,      "lvl": 1,      "tid": 217    },    {      "bill": true,      "cmpl": true,      "tm": 35.099999999999994,      "calc": 1,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E911 (VoIP)",      "exm": -64.9,      "lns": 0,      "min": 0,      "pcd": 253500,      "rate": 0.0075,      "sur": false,      "tax": -0.26324999999999993,      "lvl": 1,      "tid": 161    },    {      "bill": true,      "cmpl": true,      "tm": 64.9,      "calc": 1,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "FUSF (VoIP)",      "exm": -35.099999999999994,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.174,      "sur": false,      "tax": -11.2926,      "lvl": 0,      "tid": 162    },    {      "bill": true,      "cmpl": true,      "tm": 64.9,      "calc": 1,      "cat": "REGULATORY CHARGES",      "cid": 6,      "name": "FCC Regulatory Fee (VoIP)",      "exm": -35.099999999999994,      "lns": 0,      "min": 0,      "pcd": 0,      "rate": 0.00302,      "sur": false,      "tax": -0.19599800000000003,      "lvl": 0,      "tid": 226    }  ]},{  "ref": "Line Item 002 - Adjustment with Discount Type 1",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "San Francisco Access line Tax (VoIP)",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 377300,      "rate": 3.27,      "sur": false,      "tax": -32.7,      "lvl": 3,      "tid": 250    }  ]},{  "ref": "Line Item 003 - Adjustment with Discount Type 5"}
      ],
      "summ": [{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "Universal Lifeline Telephone Service Charge (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0475,  "sur": true,  "tax": -1.6672499999999997,  "lvl": 1,  "tid": 454},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "CA Teleconnect Fund (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0108,  "sur": true,  "tax": -0.37908,  "lvl": 1,  "tid": 452},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "CA High Cost Fund A (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0035,  "sur": true,  "tax": -0.12284999999999999,  "lvl": 1,  "tid": 450},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "TRS (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.005,  "sur": true,  "tax": -0.17549999999999996,  "lvl": 1,  "tid": 217},{  "max": 2147483647,  "min": 0,  "tchg": -35.099999999999994,  "calc": 1,  "cat": "E-911 CHARGES",  "cid": 7,  "name": "E911 (VoIP)",  "exm": -64.9,  "lns": 0,  "pcd": 253500,  "rate": 0.0075,  "sur": false,  "tax": -0.26324999999999993,  "lvl": 1,  "tid": 161},{  "max": 2147483647,  "min": 0,  "tchg": -64.9,  "calc": 1,  "cat": "CONNECTIVITY CHARGES",  "cid": 5,  "name": "FUSF (VoIP)",  "exm": -35.099999999999994,  "lns": 0,  "pcd": 0,  "rate": 0.174,  "sur": false,  "tax": -11.2926,  "lvl": 0,  "tid": 162},{  "max": 2147483647,  "min": 0,  "tchg": -64.9,  "calc": 1,  "cat": "REGULATORY CHARGES",  "cid": 6,  "name": "FCC Regulatory Fee (VoIP)",  "exm": -35.099999999999994,  "lns": 0,  "pcd": 0,  "rate": 0.00302,  "sur": false,  "tax": -0.19599800000000003,  "lvl": 0,  "tid": 226},{  "max": 2147483647,  "min": 0,  "tchg": 0,  "calc": 4,  "cat": "E-911 CHARGES",  "cid": 7,  "name": "San Francisco Access line Tax (VoIP)",  "exm": 0,  "lns": -10,  "pcd": 377300,  "rate": 3.27,  "sur": false,  "tax": -32.7,  "lvl": 3,  "tid": 250}
      ]
    }
  ]
}
```