Invoice Level Output XML Elements

The following elements are found in the <OUTDATA><INVOICE> structure.

In the table(s) below, dependency is show by indentation. For example:

<PARENT_ELEMENT>

<CHILD_ELEMENT>

<GRANDCHILD_ELEMENT>

Element Name

Type

Aud?

Description

<REQUEST_STATUS>

structural

No

A structure which contains a summary of the status of the entire request, included aggregation of severe errors.

<IS_SUCCESS>

boolean

No

Indicates whether the request was successful.

<IS_PARTIAL_SUCCESS>

boolean

No

Indicates whether the request was partially successful.

For invoices which are processed as a unit (not "line-at-a-time"), this element will always return false.

<ERROR>

structural

No

A structure containing one or more severe errors associated with the request. If no severe errors are encountered, this structure will not be returned.

<CODE>

string

No

The severe error's code.

<DESCRIPTION>

string

No

The severe error's description.

<ERROR_LOCATION_PATH>

string

No

An XML path to the element containing the severe error. The path is composed according the XML Path (XPath) standards and describes an Invoice element, a Line element or a Tax element in the Output XML.

<BASIS_PERCENT>

number

Yes

A percentage of the gross amount of the line used in tax calculation. .5 is equal to 50%, .6 is equal to 60%, and so on.

<CALCULATION_DIRECTION>

varchar2(1)

Yes

There are three calculation directions, each using different XML elements in the calculation:

  • Forward (F): This calculation uses <GROSS_AMOUNT> to determine tax.
  • Reverse-from-tax (R): This calculation uses <TAX_AMOUNT> (and optionally GROSS_AMOUNT) to determine how the tax amount should be distributed across authorities. Determination also computes a calculated gross amount.
  • Reverse-from-total (T): This uses <GROSS_PLUS_TAX> (and optionally GROSS_AMOUNT) to determine the tax amount and how it should be distributed across authorities. Determination also computes a calculated gross amount.

(For more information, see the line-level output element <GROSS_AMOUNT>.

<CALLING_SYSTEM_NUMBER>

varchar2(100)

Yes

A descriptor of the calling system sending the transaction. An invoice uses <HOST_SYSTEM>, <CALLING_SYSTEM_NUMBER> and <UNIQUE_INVOICE_NUMBER> to define its unique identifier if the elements contain values.

<COMPANY_ID>

number

No

The internal Determination ID of the merchant.

<COMPANY_NAME>

number

Yes

The name of the company running the transaction. Determination uses this element to apply the correct company-specific settings for the transaction. Returned if EXTERNAL_COMPANY_ID is not populated.

<COMPANY_ROLE>

varchar2(1)

Yes

The company's role as either a buyer, seller, or middleman for this transaction. Each have different tax and reporting requirements for any transaction.

<CURRENCY_CODE>

varchar2(3)

Yes

The currency used for this invoice. Passed through from the XML input.

<CURRENCY_NAME>

varchar2(100)

Yes

The currency used for this invoice. Looked up from the <CURRENCY_CODE>.

<CUSTOMER_NAME>

varchar2(100)

Yes

The customer's name. This data is used by Determination to search for exemption certificates that are relevant to a transaction, or to auto-create customers or certificates if the system is so configured.

<CUSTOMER_NUMBER>

varchar2(100)

Yes

The customer's number. This data is used by Determination to search for exemption certificates that are relevant to a transaction, or to auto-create customers or certificates if the system is so configured.

<END_USER_NAME>

varchar2(100)

Yes

Identifier of the user who made a change to the invoice in the calling ERP system.

<EXTERNAL_COMPANY_ID>

varchar2(100)

No

The unique identifier used by your business application to indicate which company to use in Determination. This identifier also distinguishes between different calling applications that may be used by your company.

<FISCAL_DATE>

date

Yes

Stores a transaction by a fiscal date in addition to the invoice date. For example, you can use <FISCAL_DATE> to indicate when revenue was recognized.

<HOST_SYSTEM>

varchar2(100)

Yes

The name of the ERP instance sending the transaction. An invoice uses <HOST_SYSTEM>, <CALLING_SYSTEM_NUMBER> and <UNIQUE_INVOICE_NUMBER> to define its unique identifier if the elements contain values.

<INDATA>

structural

N/A

The entire Input XML document for this invoice (not batch). See the Input XML tables for information on the elements found in this structure. Used for debugging purposes.

<INVOICE_DATE>

date

Yes

The date of the invoice.

Audit records are stored by company, invoice number, and invoice date and that an incoming calculation that matches all three fields for a record already in the database will overwrite that record.

<INVOICE_NUMBER>

varchar2(200)

Yes

The invoice number. Passed through from the calling business application, then returned by ONESOURCE Indirect Tax Determination with the tax results.

<IS_AUDIT_UPDATE>

boolean

Yes

Indicates whether the entire invoice was passed or if a line at a time was being taxed

<IS_BUSINESS_SUPPLY>

boolean

Yes

Indicates whether a supply was used for business. For some transaction types, whether a supply is being used for business or not impacts the tax and reporting requirements of the buyer and the seller.

<IS_CREDIT>

boolean

Yes

Indicates whether the returned transaction is a credit transaction as identified by your ERP system. true indicates a credit transaction which includes negative amounts; false (default) indicates that this is not a credit transaction.

<IS_REPORTED>

boolean

Yes

Controls whether the invoice being processed was included in reports. An invoice can be included in the audit tables but restricted from appearing on VAT and other reports if (N)o was passed for this element. The default value is (Y)es.

<LINE ID="N">

structural -

N/A

The <LINE> and </LINE> elements are structural. They serve as the container for an individual line. Each invoice can have multiple lines.

The ID is an attribute of the line and indicates the actual line number.

For more information, see Line and Allocation Line Level Output XML Elements

<MESSAGE>

structural

N/A

A message related to this invoice. There can be multiple MESSAGE elements returned with each invoice.

For a complete description of this structure, see Message Level Output XML Elements.

<MIN_ACCOUNTABLE_UNIT>

number

Yes

The smallest unit of measure used for the transaction currency. From TB_CURRENCIES table.

<NATURE_OF_TRANSACTION_CODE>

varchar2(2)

Yes

Required for Intrastat reports in all countries in the EU.

<ORIGINAL_DOCUMENT_ID>

varchar2(100)

Yes

The original document item as shown on the document in the ERP system. Not used in calculations.

<ORIGINAL_DOCUMENT_ITEM>

varchar2(100)

Yes

The original document item as shown on the document in the ERP system. Not used in calculations.

<ORIGINAL_DOCUMENT_TYPE>

varchar2(100)

Yes

The original document type as shown on the document in the ERP system. Not used in calculations.

<ORIGINAL_INVOICE_DATE>

date

Yes

The date of the original invoice. Used in Date Determination Rules.

<ORIGINAL_INVOICE_NUMBER>

varchar2(200)

Yes

This number enables a credit invoice to be associated with an original invoice in the audit tables for reporting purposes.

<ORIGINAL_MOVEMENT_DATE>

date

Yes

The date of the original movement. Used in Date Determination Rules.

<ROUNDING_PRECISION>

number

Yes

Number of decimal places to round the currency values to. From the TB_CURRENCIES entry.

<ROUNDING_RULE>

varchar2(10)

Yes

The rounding rule from the TB_CURRENCIES entry for the transaction currency.

<STATISTICAL_PROCEDURE>

varchar2(6)

Yes

A statistical indicator used for large shipments. Used for Intrastat filing purposes in the EU.

<TRANSACTION_DATE>

date

Yes

The system date at the time the transaction was processed, GMT.

<TOTAL_TAX_AMOUNT>

number

No

The total tax amount for the invoice.

<UNIQUE_INVOICE_NUMBER>

varchar2(500)

Yes

The unique identifier for this invoice, as assigned by the ERP system. An invoice uses <HOST_SYSTEM>, <CALLING_SYSTEM_NUMBER> and <UNIQUE_INVOICE_NUMBER> to define its unique identifier if the elements contain values.

<USER_ELEMENT>

structural

N/A

A structure that enables companies to submit, and have returned, user-defined elements that are not directly supported in Determination. These elements can be used in conjunction with TransEditors (input filters) to enable custom tax calculations.

<NAME>

varchar2(200)

No

The name of the user element. This was passed into Determination in the Input XML.

<VALUE>

varchar2(200)

Yes

The value to be passed into Determination's audit tables and returned to your business application. This was passed into Determination in the Input XML.

<VENDOR_NAME>

varchar2(100)

Yes

The vendor's name. This data is primarily used to retrieve and reference records from the audit data.

<VENDOR_NUMBER>

varchar2(20)

Yes

The vendor's number. This data is primarily used to retrieve and reference records from the audit data.

<VENDOR_TAX>

number

Yes

The amount of tax charged by the vendor on an Accounts Payable invoice.