# Fact Pattern 4.5 - High capacity PBX trunk phones sold to a commercial customer in San Francisco

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

Guide: Communications

# Fact Pattern 4.5 - High capacity PBX trunk phones sold to a commercial customer in San Francisco

Details about high-capacity PBX trunk phones sold to a commercial customer in San Francisco, including request parameters and example API interactions.

**Request parameters**:

-   Customer type is`1` (Business)
-   Bill-to PCode is`377300`
-   Item 1
    -   Number of lines is `0`
    -   Sale type is `1` (Retail)
    -   T/S pair is `19/6`, (VoIP/Access Charge)
-   Item 2
    -   Number of lines is `1`
    -   Sale type is `1` (Retail)
    -   T/S pair is `19/579` (VoIP/PBX High Capacity)
-   Item 3
    -   Number of lines is `24`
    -   Sale type is `1` (Retail)
    -   T/S pair is `19/582` (VoIP/High Capacity Outbound Channel)
-   Item 4
    -   Number of lines is `65`
    -   Sale type is `1` (Retail)
    -   T/S pair is `19/580` (VoIP/High Capacity Extension)
-   Item 5
    -   Number of lines is `0`
    -   Sale type is `1` (Retail)
    -   T/S pair is `19/43` (VoIP/Invoice)

## Request

**View example**:

```
curl --location --request POST 'https://communicationsua.avalara.net/api/v2/afc/CalcTaxes' \
--header 'Content-Type: application/json' \
--header 'client_id: 787' \
--header 'Authorization: Basic {Base64-encoded credentials}' \
--data-raw '{
    "cfg": {"incrf": true //--Return Reporting Information.
    },
    "cmpn": {"bscl": 1, //--Business Class: Typical value is "1". Is the provider and an Incumbant Local Exchange Carrier ("ILEC",  basically those companies that own the wire, antennas and switches of a network) or not?   0=ILEC, 1=NOT an ILEC (or Competitive Local Exchange Carrier "CLEC")"svcl": 0, //--Service Class:  Is the provider Primarily a local service provider, or long distance?   0=Primary Local; 1=Primary Long Distance. "fclt": false, //--Facilities:  Does the company providing the service have facilities to provide the service?      "frch": false, //--Franchise:  Indicates if the company provides services sold pursuant to a franchise agreement between the carrier and jurisdiction."reg": false, //--Regulated:  Is the Seller is regulated?"idnt": "CertCompany"
    },
    "inv": [{    "doc": "CertTest4_5_PCD_VoIP77aff895-e932-44b4-8225-db5eba97d0a1", //--Document Code:  Required.  A unique value that is used to Commit transactions through the Commit API. Do NOT use InvoiceNumber.  GUID preferable. Every unique call must have a unique "doc".    "cmmt": false, //--Commit:  Required.  The status of transaction for end of period compliance reporting.  Previously CalcTaxes uncommitted transactions can be committed through the Commit API.    "bill": { //--Bill To Object:  Required.  Field usually originating from a customer account profile. The SoldTo address of the transaction.  AFC will return the level of granularity in taxation based on the granularity of the address provided.  This object can be JUST PCode value if you utilize the GEO or PCODE APIs for assigning a PCODE to a location.
"pcd": 377300 //--PCode:  You can pass only this value in the BillTo object.  Preassigned values are handled via the GEO and PCODE APIs.    },    "cust": 1, //--Customer Type: Required.  Field usually originating from a customer account profile. 0=Residential; 1=Business; 2=Senior Citizen; 3=Industrial.  Different customer types could have different tax rules.    "lfln": false, //--Lifeline:  Field usually originating from a customer account profile.  Is the customer a lifeline participants?    "date": "2022-04-13", //--Date:  Effective Tax Rate Date to be applied to the invoice.  Most often Invoice Date generated through SysDate on the bill run.    "itms": [
{
    "ref": "1_CertTest4_5_PCD_BaseMRC", //--Reference Code.  Reference Id for a line item.
      "chg": 700, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "line": 0, //--Lines:  Number of phone lines to be taxed.  Required for certain T/S Pairs.
    "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 19, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 6, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
},
{
    "ref": "1_CertTest4_5_PCD_LineCount", //--Reference Code.  Reference Id for a line item."chg": 0, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "line": 1, //--Lines:  Number of phone lines to be taxed.  Required for certain T/S Pairs.
    "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 19, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 579, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
},
{
    "ref": "1_CertTest4_5_PCD_OutboundChannel", //--Reference Code.  Reference Id for a line item.
      "chg": 0, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "line": 24, //--Lines:  Number of phone lines to be taxed.  Required for certain T/S Pairs.
    "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 19, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 582, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
},
{
    "ref": "1_CertTest4_5_PCD_ExtensionQuantity", //--Reference Code.  Reference Id for a line item."chg": 0, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "line": 65, //--Lines:  Number of phone lines to be taxed.  Required for certain T/S Pairs.
    "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 19, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 580, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
},
{
    "ref": "1_CertTest4_5_PCD_Invoice", //--Reference Code.  Reference Id for a line item.
      "chg": 1, //--Charge:  Required.  Billed pre-tax amount if "incl"=false.  Billed after tax amount if "incl"=true.
      "line": 0, //--Lines:  Number of phone lines to be taxed.  Required for certain T/S Pairs.
    "sale": 1, //--Sale:  Sale Type:  0=Wholesale, 1=Retail, 2=Consumed (Sales and Use Only), 3=Vendor Use. REQUIRED
    "tran": 19, //--Transaction Type: Industry vertical...see mapping guidelines for this. REQUIRED
    "serv": 43, //--Service Type:  Billable services for an industry vertical....see mapping guidelines for this. REQUIRED
    "adj": false //--Adjustment:  True, will negate taxes. False, will return positive taxes.  Default is False.
}    ],    "invm": true,    "dtl": true,    "summ": true,    "acct": "CertCompany",    "custref": "CertTest4_5",    "invn": "CertTest4_5",    "bcyc": "202204",    "bpd": {
"month": 04,
"year": 2022    }}
    ]
}'
```

## Response

**View example**:

```
{
    "inv": [{    "doc": "CertTest4_5_PCD_VoIP46136ccd-9ef4-4960-bd60-f7d873a42a32",    "itms": [
{
    "ref": "1_CertTest4_5_PCD_BaseMRC",
    "txs": [{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "REGULATORY CHARGES",    "cid": 6,    "name": "P.U.C. Fee (VoIP) NF",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.0052,    "sur": true,    "tax": 1.27764,    "lvl": 1,    "tid": 604},{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "Universal Lifeline Telephone Service Charge (VoIP)",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.0475,    "sur": true,    "tax": 11.67075,    "lvl": 1,    "tid": 454},{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "CASF (VoIP)",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.01019,    "sur": true,    "tax": 2.503683,    "lvl": 1,    "tid": 453},{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "CA Teleconnect Fund (VoIP)",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.0078,    "sur": true,    "tax": 1.91646,    "lvl": 1,    "tid": 452},{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "CA High Cost Fund A (VoIP)",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.007,    "sur": true,    "tax": 1.7199,    "lvl": 1,    "tid": 450},{    "bill": true,    "cmpl": true,    "tm": 831.756303,    "calc": 1,    "cat": "UTILITY USER TAXES",    "cid": 8,    "name": "Utility Users Tax (VoIP)",    "exm": 0.0,    "lns": 0,    "min": 0.0,    "pcd": 377300,    "rate": 0.075,    "sur": false,    "tax": 62.38172272,    "lvl": 3,    "tid": 241},{    "bill": true,    "cmpl": true,    "tm": 245.7,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "TRS (VoIP)",    "exm": 454.3,    "lns": 0,    "min": 0.0,    "pcd": 253500,    "rate": 0.0111,    "sur": true,    "tax": 2.72727,    "lvl": 1,    "tid": 217},{    "bill": true,    "cmpl": true,    "tm": 454.3,    "calc": 1,    "cat": "CONNECTIVITY CHARGES",    "cid": 5,    "name": "FUSF (VoIP)",    "exm": 245.7,    "lns": 0,    "min": 0.0,    "pcd": 0,    "rate": 0.238,    "sur": false,    "tax": 108.1234,    "lvl": 0,    "tid": 162},{    "bill": true,    "cmpl": true,    "tm": 454.3,    "calc": 1,    "cat": "REGULATORY CHARGES",    "cid": 6,    "name": "FCC Regulatory Fee (VoIP)",    "exm": 245.7,    "lns": 0,    "min": 0.0,    "pcd": 0,    "rate": 0.004,    "sur": false,    "tax": 1.8172,    "lvl": 0,    "tid": 226}
    ]
},
{
    "ref": "1_CertTest4_5_PCD_LineCount",
    "txs": [{    "bill": true,    "cmpl": true,    "tm": 0.0,    "calc": 4,    "cat": "E-911 CHARGES",    "cid": 7,    "name": "San Francisco Access Line Tax (High Cap Trunk)",    "exm": 0.0,    "lns": 1,    "min": 0.0,    "pcd": 377300,    "rate": 514.49,    "sur": false,    "tax": 514.49,    "lvl": 3,    "tid": 252}
    ]
},
{
    "ref": "1_CertTest4_5_PCD_OutboundChannel",
    "txs": [{    "bill": true,    "cmpl": true,    "tm": 0.0,    "calc": 4,    "cat": "E-911 CHARGES",    "cid": 7,    "name": "E911 (VoIP)",    "exm": 0.0,    "lns": 24,    "min": 0.0,    "pcd": 253500,    "rate": 0.3,    "sur": false,    "tax": 7.2,    "lvl": 1,    "tid": 161}
    ]
},
{
    "ref": "1_CertTest4_5_PCD_ExtensionQuantity",
    "txs": []
},
{
    "ref": "1_CertTest4_5_PCD_Invoice",
    "txs": []
}    ],    "summ": [
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "REGULATORY CHARGES",
    "cid": 6,
    "name": "P.U.C. Fee (VoIP) NF",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.0052,
    "sur": false,
    "tax": 1.27764,
    "lvl": 1,
    "tid": 604
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "Universal Lifeline Telephone Service Charge (VoIP)",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.0475,
    "sur": false,
    "tax": 11.67075,
    "lvl": 1,
    "tid": 454
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "CASF (VoIP)",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.01019,
    "sur": false,
    "tax": 2.503683,
    "lvl": 1,
    "tid": 453
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "CA Teleconnect Fund (VoIP)",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.0078,
    "sur": false,
    "tax": 1.91646,
    "lvl": 1,
    "tid": 452
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "CA High Cost Fund A (VoIP)",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.007,
    "sur": false,
    "tax": 1.7199,
    "lvl": 1,
    "tid": 450
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 831.756303,
    "calc": 1,
    "cat": "UTILITY USER TAXES",
    "cid": 8,
    "name": "Utility Users Tax (VoIP)",
    "exm": 0.0,
    "lns": 0,
    "pcd": 377300,
    "rate": 0.075,
    "sur": false,
    "tax": 62.38172272,
    "lvl": 3,
    "tid": 241
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 245.7,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "TRS (VoIP)",
    "exm": 454.3,
    "lns": 0,
    "pcd": 253500,
    "rate": 0.0111,
    "sur": false,
    "tax": 2.72727,
    "lvl": 1,
    "tid": 217
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 454.3,
    "calc": 1,
    "cat": "CONNECTIVITY CHARGES",
    "cid": 5,
    "name": "FUSF (VoIP)",
    "exm": 245.7,
    "lns": 0,
    "pcd": 0,
    "rate": 0.238,
    "sur": false,
    "tax": 108.1234,
    "lvl": 0,
    "tid": 162
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 454.3,
    "calc": 1,
    "cat": "REGULATORY CHARGES",
    "cid": 6,
    "name": "FCC Regulatory Fee (VoIP)",
    "exm": 245.7,
    "lns": 0,
    "pcd": 0,
    "rate": 0.004,
    "sur": false,
    "tax": 1.8172,
    "lvl": 0,
    "tid": 226
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 0.0,
    "calc": 4,
    "cat": "E-911 CHARGES",
    "cid": 7,
    "name": "San Francisco Access Line Tax (High Cap Trunk)",
    "exm": 0.0,
    "lns": 1,
    "pcd": 377300,
    "rate": 514.49,
    "sur": false,
    "tax": 514.49,
    "lvl": 3,
    "tid": 252
},
{
    "max": 2147483647.0,
    "min": 0.0,
    "tchg": 0.0,
    "calc": 4,
    "cat": "E-911 CHARGES",
    "cid": 7,
    "name": "E911 (VoIP)",
    "exm": 0.0,
    "lns": 24,
    "pcd": 253500,
    "rate": 0.3,
    "sur": false,
    "tax": 7.2,
    "lvl": 1,
    "tid": 161
}    ],    "incrf": {
"acct": "CertCompany",
"custref": "CertTest4_5",
"invn": "CertTest4_5",
"bcyc": "202204"    }}
    ]
}
```