You are on page 1of 212

ONESOURCE

INDIRECT TAX
DETERMINATION

PROGRAMMER GUIDE
VERSION 5.5.1.0

ii

2013 Thomson Reuters/ONESOURCE. All Rights Reserved. Proprietary and confidential information of Thomson Reuters.
Disclosure, use, or reproduction without the written authorization of TR/S is prohibited. In compliance with the license agreements
for the Open Source Libraries leveraged by Thomson Reuters, our customers can obtain copies of these libraries by contacting
Customer Support at https://customer.sabrix.com.
Nadler; Jeffrey Evan (Portland, OR), Barta; James Donovan (Hillsboro, OR), Blotner; Joseph Allen (Portland, OR), Christian; Eric
Thomas (Beaverton, OR), Fong; Carolyn Brauner (Beaverton, OR), Seymour, Jr.; James Madison (Hillsboro, OR), Waterhouse;
Thomas William (Lake Oswego, OR), Woolsey; Gregory Alan (Newberg, OR). Sabrix, Inc. (Lake Oswego, OR). Universal Tax
Engine. US Patent 7,933,803, filed June 15, 2004, and issued April 26, 2011.
Portions of ONESOURCE Indirect Tax Determination include third-party components governed by the following licenses:
Apache License, Version 1.0. Copyright 2000. The Apache Software Foundation. All rights reserved. ONESOURCE Indirect Tax
Determination includes software developed by the Apache Software Foundation (http://www.apache.org/). This software
consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information
on the Apache Software Foundation, please see <http://www.apache.org/>. Portions of this software are based upon public
domain software originally written at the National Center for Supercomputing Applications, University of Illinois, UrbanaChampaign.
Apache License, Version 2.0. Copyright January 2004. ONESOURCE Indirect Tax Determination includes software licensed
under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in
writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under
the License.
Artistic License. This package is provided "as is" and without any express or implied warranties, including, without limitation, the
implied warranties of merchantibility and fitness for a particular purpose.
ASM. Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved. ONESOURCE Indirect Tax Determination includes
software licensed by ASM. Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimer; 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
the following disclaimer in the documentation and/or other materials provided with the distribution; 3. Neither the name of the
copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Common Development and Distribution License (CDDL). Version 1.0.1. Disclaimer of warranty. Covered software is provided
under this license on an as is basis, without warranty of any kind, either expressed or implied, including, without limitation,
warranties that the covered software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk
as to the quality and performance of the covered software is with Thomson Reuters/ONESOURCE. Should any covered software
prove defective in any respect, Thomson Reuters/ONESOURCE (not the initial developer or any other contributor) assumes the
cost of any necessary servicing, repair or correction. This disclaimer of warranty constitutes an essential part of this license. No
use of any covered software is authorized hereunder except under this disclaimer.
Eclipse Public License. Version 1.0. No Warranty: Except as expressly set forth in this agreement, the program is provided on an
"as is" basis, without warranties or conditions of any kind, either express or implied including, without limitation, any warranties or
conditions of title, non-infringement, merchantability or fitness for a particular purpose. Each recipient is solely responsible for
determining the appropriateness of using and distributing the program and assumes all risks associated with its exercise of rights
under this agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage
to or loss of data, programs or equipment, and unavailability or interruption of operations. Disclaimer of Liability: Except as
expressly set forth in this agreement, neither recipient nor any contributors shall have any liability for any direct, indirect, incidental,
special, exemplary, or consequential damages (including without limitation lost profits), however caused and on any theory of
liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use or distribution
of the program or the exercise of any rights granted hereunder, even if advised of the possibility of such damages.
E. Wray Johnson. ODMG license. Copyright 1999. <ejohnson@carolina.rr.com>. All rights reserved. ONESOURCE Indirect Tax
Reporting contains portions of this free software. This software is free and provided "as-is" by the author E. Wray Johnson who
assumes liability to the extent of the amount that is hereby being charged for the software.

iii

GNU Lesser General Public License, Version 2.1. Copyright 1991, 1999, Free Software Foundation, Inc., 51 Franklin Street, Fifth
Floor, Boston, MA 02110-1301 USA.
Indiana University Extreme! Lab. Version 1.1.1 Copyright 2002. All rights reserved.ONESOURCE Indirect Tax Determination
includes software developed by the Indiana University Extreme! Lab. For further information please visit
http://www.extreme.indiana.edu/.
International Business Machines Corporation and others. Copyright 1995-2008. All rights reserved. ONESOURCE Indirect Tax
Determination includes software licensed by IBM. The software is provided "as is", without warranty of any kind, express or
implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and no infringement of third
party rights. In no event shall the copyright holder or holders included in this notice be liable for any claim, or any special indirect or
consequential damages, or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract,
negligence or other tortuous action, arising out of or in connection with the use or performance of this software.
Jason Hunter & Brett McLaughlin. Copyright 2000-2004 . All rights reserved. ONESOURCE Indirect Tax Determination includes
software developed by the JDOM Project (http://www.jdom.org/).
Jaxen License. Copyright 2003-2006. This software is provided by the copyright holders and contributors "as Is" and any express
or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are
disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
JGroups. Portions of the ONESOURCE Indirect Tax Determination were developed using the open source JGroups library
(http://www.jgroups.org/javagroupsnew/docs/index.html). The JGroups library is distributed under the GNU Lesser General
Public License (LGPL). Under the LGPL, you can download the JGroups library separately from the Customer Center
(https://customercenter.sabrix.com/sabrixcc) for viewing or modification. Contact Customer Support for additional details.
MetaStuff, Ltd. Copyright 2001-2005. All Rights Reserved. ONESOURCE Indirect Tax Determination includes software provided
by Metastuff, Ltd. and contributors as is and any expressed or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Metastuff, Ltd. or its contributors
be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to,
procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any
theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of
this software, even if advised of the possibility of such damage.
Mozilla Public License Version 1.1. The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/.
OpenReports licensed by Open Source Software Solutions to Thomson Reuters/ONESOURCE, Inc. under the OpenReports
Commercial License. This license grants the right to use, reproduce, and distribute OpenReports under the terms and conditions
of the Apache License, Version 2.0.
Open Source Libraries. In compliance with the license agreements for the Open Source Libraries leveraged by ONESOURCE
Indirect Tax Determination, our customers can obtain copies of these libraries by contacting Customer Support at (866) 4722749.
OpenSymphony Group. Version 1.1. Copyright 2001-2004. All rights reserved. OSCore software is provided by the copyright
holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable
for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of
substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.
Sun Microsystems, Inc., Java Web Services Developer Pack, Version 1.5. ONESOURCE Indirect Tax Determination includes
software licensed by Sun Microsystems. All classes are released to the public domain and may be used for any purpose
whatsoever without permission or acknowledgment. Portions of the CopyOnWriteArrayList and ConcurrentReaderHashMap
classes are adapted from Sun JDK source code. These are copyright of Sun Microsystems, Inc, and are used with their kind
permission, as described in the license.
The Werken Company. Copyright 2003-2006 All Rights Reserved. ONESOURCE Indirect Tax Determination includes software
licensed by the Werken Company. This software is provided by the copyright holders and contributors "as is" and any express or
implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are
disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
X Fire License. Copyright 2005. Envoi Solutions LLC. Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including

iv

without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions. The copyright notice and this
permission notice shall be included in all copies or substantial portions of the Software. The software is provided "as is", without
warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular
purpose and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability,
whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other
dealings in the software.
January 2013

TABLE OF CONTENTS
Introduction

How The Programmer Topics Are Organized

ONESOURCE Indirect Tax Determination Overview

Calculating Tax

ONESOURCE Indirect Tax Integration Process Flow

Transaction Structure

Input Model
Output Model
Custom Integration Options
Using the Tax Calculation Web Service

7
8
10
10

Generating the Code

10

Mapping Data Elements

10

Setting Determination Configurations

11

Using the ONESOURCE Indirect Tax Integration Java SDK


Testing Custom Integration Transactions

13
14

Third Party SOAP Tools

14

The XML Invoice Tool (xmlinvoice)

15

The XML Invoice Client Tool (xmlInvoiceClient)

16

How It Works

16

Configuring and Executing xmlInvoiceClient

17

Managing Zone Lookup


Zone Structure

19
20

Zone Input Model

20

Zone Output Model

21

Configuration Parameters for Zone Lookup

23

Using the Zone Lookup Web Service

25

Generating the Code

25

Mapping Zone Elements

25

Setting Determination Configurations

26

Using the Zone Lookup Servlet (addressvalidation)

27

Submitting Zone Information Programmatically

27

Manually Inserting Zone XML into a Browser

28

Importing and Exporting Determination Data

29

Using the Tax Configuration Web Services

29

Getting Started with Tax Configuration Web Services

29

Understanding the Logic of Tax Configuration Web Services

35

CompanyService

36

CustomerManagementPortType

38

EstablishmentService

38

ExemptionCertificatePortType

40

ExemptionCertificateService

42

ProductMappingService

45

UserService

47

Using the Import/Export Interface


Using Command-Line Export and Import Tools

49
50

vi

Command Line Exports

50

Command Line Imports

53

Creating CSV Import Files

55

Supported CSV Files

55

CSV File Format

56

Import Hierarchy

57

Naming Conventions

57

Including Extended (UTF-8) Characters in Import Files

57

Best Practices for Importing Data with CSV Files

58

Authority Rate Sets CSV Format

59

Commodity Mappings CSV Format

60

Company CSV Format

62

Customer CSV Format

67

Customer License CSV Format

70

Date Determination Logic CSV Format

72

Date Determination Rule CSV Format

73

Established Zones CSV Format

75

Exchange Rate CSV Format

77

Exemption Certificates CSV Format

78

Exemption Certificate Zones CSV Format

82

Limited Use Exemption Certificates CSV Format

85

License Type CSV Format

89

Material Set CSV Format

90

Product Categories CSV Format

92

Product Mappings CSV Format

94

Product Zones CSV Format

96

Reference Value CSV Format

98

TransEditor Groups CSV Format

100

Zone Alias CSV Format

104

Reviewing Historical Transactions


Getting Ready to Use the Audit Invoice Servlet

107
107

Authentication

107

Database Keys

107

The Audit Invoice User Interface

108

Audit Invoice Servlet Input XML

110

Audit Invoice Servlet Output XML

111

Audit Data Not Returned by Audit Invoice Servlet

111

Additional Data Returned by Audit Invoice Servlet

112

Implementing the External Exchange Rate Finder

113

Setting Up Single Sign-on

115

Creating the Authenticator Class File

115

Inserting the Class File into Determination

116

Modifying Configuration Parameters

116

Configuring Additional Security

116

Tax Calculation XML Elements

117

Element Types

118

XML Elements

119

Batch Level Input XML Elements

120

vii

Invoice Level Input XML Elements

123

Line Level Input XML Elements

146

Address Level Input XML Elements

166

Batch Level Output XML Elements

168

Invoice Level Output XML Elements

170

Line and Allocation Line Level Output XML Elements

176

Message Level Output XML Elements

184

Tax Level Output XML Elements

185

Descriptions

185

Allocation Rollup

197

Zone Lookup XML Elements

199

Zone Lookup Input XML

199

Zone Lookup Output XML

200

<ADDRESS> Elements

200

<MESSAGE> Elements

202

Appendix A: Special Transaction Considerations

203

Using Special Characters

203

Extra White Space

204

viii

Introduction

INTRODUCTION
ONESOURCE Indirect Tax Determination enterprise transaction tax management software is
a highly scalable and reliable service for all business applications that need consolidated tax
determination, calculation and recording. A three-tier application built on industry standard
J2EE technology and state-of-the art object oriented design principles, Determination is
designed to optimize performance, reliability, interoperability, manageability, and security.
For each transaction, the system:
l
l

l
l

Receives transaction information from your business systems, in batch or real-time.


Determines which taxes apply to each transaction, the amount of tax, and to whom it is
owed.
Returns this data back to the calling application.
Stores the data in a centralized database using common elements and definitions. From
this database, you can run standard and customized reports across the enterprise using the
ONESOURCE Indirect Tax Reporting module, resulting in an audit trail that can be easily
maintained.

ONESOURCE Indirect Tax Determination directly supports US Sales and Use tax, as well as
VAT and other taxes in Europe, Canada, Latin America, and many other regions.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Introduction
How The Programmer Topics Are Organized

HOW THE PROGRAMMER TOPICS ARE ORGANIZED


There are many interfaces that you, as a programmer, can leverage to assist tax professionals
with ONESOURCE Indirect Tax Determination. The programmer topics are organized around
these Determination interfaces, and there are also sections describing the XML elements used
in these interfaces:
l

Calculating Tax (page 5)

Managing Zone Lookup (page 19)

Importing and Exporting Determination Data (page 29)

Reviewing Historical Transactions (page 107)

Implementing the External Exchange Rate Finder (page 113)

Setting Up Single Sign-on (page 115)

Tax Calculation XML Elements (page 117)

Zone Lookup XML Elements (page 199)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Introduction

ONESOURCE Indirect Tax Determination Overview

ONESOURCE INDIRECT TAX DETERMINATION OVERVIEW


The Determination Technology Platform consists of these main components:
l

Database Tier: A relational database that stores your transaction tax data and application
metadata (tax data and policy configurations).
Integration Tier: This is either out-of-the-box software or code that you develop to
integrate the financial system with Determination.
Middle Tier: A Java compliant application server that accepts transactions from the
financial system, calculates tax, and returns the results to the Integration Tier. This also
serves up the web pages for the User Tier.
User Tier: Determination is the web-based tool where tax professionals set tax policy
configurations.

The diagram below highlights these tiers:

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Introduction
ONESOURCE Indirect Tax Determination Overview

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

CALCULATING TAX
There are two interfaces you can use to integrate (connect) financial systems with
ONESOURCE Indirect Tax Determination:
l

Tax Calculation Web Service

XML Invoice Servlet

Review the following topics for details about these interfaces:


l

l
l

ONESOURCE Indirect Tax Integration Process Flow (page 6): An overview of the process
for connecting to Determination
Transaction Structure (page 7): The hierarchy of transaction data
Custom Integration Options (page 10): Information specific to the two main calculation
interfaces
Testing Custom Integration Transactions (page 14): Tips for testing your transactions
directly with the Determination interfaces

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax
ONESOURCE Indirect Tax Integration Process Flow

ONESOURCE INDIRECT TAX INTEGRATION PROCESS


FLOW
Regardless of the calling business application, each integration with ONESOURCEIndirect
Tax Determination follows a certain sequence. Consider the following five steps as you develop
an integration to Determination:
1. Triggering Tax: Capture events in the transaction flow of the financial system where tax is
required. These events are provided for in most financial systems and handle most
standard cases.
2. Aggregating Data Elements: Retrieve all data elements required to determine tax. This is
primarily driven by business requirements.
3. Formatting and Transmitting: Construct the XML structure and send to Determination.
This includes mapping to the appropriate XML elements, creating the appropriate HTTP
message for either synchronous (single invoice) or batch transmission, and posting the
message to the correct URL.
4. Receiving and Processing: Retrieve the return XML and process the output. The
message is passed back to financial source system over HTTP and can then be processed
and mapped to the appropriate business application elements.
5. Posting Results: Place the results of the tax calculation back into the financial system.
Steps 1, 2, and 5 are highly dependent on the calling application. For information on steps 3 and
4, see Custom Integration Options (page 10).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

Transaction Structure

TRANSACTION STRUCTURE
This topic describes the hierarchy of the input and output data fields used in tax transactions.
The input fields are sent to Determination by your financial system through your custom
integration software. The output fields are returned to your financial system from Determination
following a tax calculation.
See Appendix A: Special Transaction Considerations (page 203) for additional
tips aboutXML transactions.

Input Model
The input data model has these main levels:
Indata: Data on this level contains detail about transaction batches.
Invoice: Data on this level identifies invoices. Multiple invoices can be present in the
Indata.
Line: Data on this level contains item information. Multiple lines can be present in
each Invoice.
The relationship between these levels is as follows:
Indata
Invoice 1
Line 1
Line 2
Line n
Invoice 2
Line 1
Line 2
Line n
Invoice n
Line 1
Line 2
Line n
Note that some identical elements may appear in both the Input Invoice and the Input Line data
structure. Depending on your tax calculation requirements, both can be used per the following:
l

If a data element value appears at the Input Invoice level, it does not need to be repeated at
the Input Line level.
However, if an element value appears at the Input Invoice level, and is populated differently
at the Input Line level, the Input Line level value overrides that which is at the Input Invoice
level for that line only.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax
Transaction Structure

An example of this is a multi-line invoice where most items are shipped to the address at Input
Invoice level, but one Input Line item may be shipped to a different address. For tax calculations,
this distinction is critical, so the unique address is specified for that Input Line.

Output Model
The output data model has these main levels:
Outdata: Data on this level contains detail about transaction batches.
Invoice: Data on this level identifies invoices. Multiple invoices can be present in the
Outdata.
Line: Data on this level contains item information. Multiple lines can be present in
each Invoice.
Tax: Data on this level identifies taxes for specific lines. Multiple tax blocks can
be present in each Line.
The relationship between these levels is as follows:
Outdata
Invoice 1
Line 1
Tax 1
Tax 2
Tax n
Line 2
Tax 1
Tax 2
Tax n
Line n
Tax 1
Tax 2
Tax n
Invoice n
Line 1
Tax 1
Tax 2
Tax n
Line n
Tax 1
Tax 2
Tax n

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

Transaction Structure

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

10

Calculating Tax
Custom Integration Options

CUSTOM INTEGRATION OPTIONS


There are two approaches for making custom integrations to calculate tax; one relies on web
services and the other is a Java toolkit:
l

Using the Tax Calculation Web Service (page 10)

Using the ONESOURCE Indirect Tax Integration Java SDK (page 13)

Using the Tax Calculation Web Service


This is a SOAP 1.1 web service to create your own integration with Determination. Review the
following sections about getting started with this interface:
l
l
l

Generating the Code (page 10)


Mapping Data Elements (page 10)
Setting Determination Configurations (page 11)

Generating the Code


To create the code automatically in your development framework, point to the WSDL, which
you can find by navigating to the services URL. Ask the application server administrator about
the host, port, and whether HTTP or HTTPS is used in your environment. This is the HTTPS
format:
https://host:port/sabrix/services

In the list of Determination web services, click on the link for TaxCalculationService.

Mapping Data Elements


To map the transaction elements from the financial system to those in Determination, consult
the following:
l

XSD: See the field comments for detailed descriptions. You can find the XSD link in the
WSDL listed above. To view the comments in the most readable format, we recommend
that you open the XSD in a text or XML editor instead of a browser.
Online Help or the Determination User Guide: The Determination User Guide is a PDF
version of the Online Help. These resources contain some business logic behind the XSD
elements. The Determination User Guide is in the documentation directory of the software
distribution.
Tax Calculation XML Elements (page 117): This is a series of lists containing details about
elements. Much of this overlaps with the XSD descriptions.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

11

Custom Integration Options

Setting Determination Configurations


There are several configurations in ONESOURCE Indirect Tax Determination that affect your
implementation of the Tax Calculation Service. Set the following if they apply to your
environment:
XSD Validation
If you want your messages validated against the XSD, set the value of the Configuration
parameter WEB_SERVICE_XSD_VALIDATION to Y. If you disable validation using the value
of N, messages are not validated; however, your messages must still conform to the XSD to be
processed. If you turn on validation, you improve your error messages, but you also generate
some performance overhead.
Authentication
This feature is disabled by default. To enable authentication for the Tax Calculation Service, set
the following Configuration parameters:
l

WSS_AUTHENTICATION_REQUIRED (Controls access to the Tax Calculation Service)


l

Valid values are Y and N (Default is N).

The SOAP header is examined for a valid Determination user name and password .

If enabled, this parameter also depends on the Configuration parameter


SOAP_CALC_AUTHENTICATION_REQUIRED.

SOAP_CALC_AUTHENTICATION_REQUIRED (Allows tax calculations and audit


recording)
l

Valid values are Y and N (Default is Y).

WSS_AUTHENTICATION_REQUIRED must also be enabled.

If you enable authentication, Determination evaluates the user name and password
found on the batch level (IndataType) for each invoice.
l
l

The user must be associated with the company specified on the invoice.
The user must be granted either the Source System role or a custom role with
the Application type of Calculate Tax.
To ensure that the service is never interrupted by an expired password,
exempt the user from password expiration. See the option Password Never
Expires in the Help topic Edit Users. The best practice is to change passwords
periodically to maintain security.
If there are no values for the user name or password on the batch level,
Determination relies on those values in the SOAP header.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

12

Calculating Tax
Custom Integration Options

Logging
There are two Configuration parameters in Determination that control Tax Calculation web
service logging. See the Configuration topic in Help for valid values:
l

LOG_LEVEL (for application-wide logging): This controls logging across the entire
application.
LOG_LEVEL:<package name> (for package-level logging): This controls which packages
(and classes) appear in the logs. For example, if you use LOG_
LEVEL:COM.SABRIX.TAX.CALCINTERFACE, you see log messages for this package
and its classes. To log multiple packages, add separate parameters for each package.
Passwords are not recorded in logs.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

13

Custom Integration Options

Using the ONESOURCE Indirect Tax Integration Java SDK


The alternative to creating an integration with the SOAP Tax Calculation Service is to use the
XML Invoice servlet interface. There is a Java development toolkit called ONESOURCE
Indirect Tax Integration Java SDK to enable you to code your own integration through this
servlet interface.
The toolkit requires a product license. When you have that, you can download the software. The
installation documentation is bundled with the product. Contact Customer Support if you have
questions about your license or about downloading the software from Customer Center.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

14

Calculating Tax
Testing Custom Integration Transactions

TESTING CUSTOM INTEGRATION TRANSACTIONS


In the course of developing a custom integration, whether with the SOAP web service or the
XML Invoice Servlet, you may want to test transactions directly against Determination,
bypassing integrations. There are several tools to test transactions without sending the XML
through integration software:
l

Tax Calculation Service Transactions: Third Party SOAP Tools (page 14)

XML Invoice Servlet Transactions


l
l

The XML Invoice Tool (xmlinvoice) (page 15)


The XML Invoice Client Tool (xmlInvoiceClient) (page 16)

Third Party SOAP Tools


To test your transactions outside of the integration you are developing, use a testing tool that
sends your SOAP XML directly to ONESOURCE Indirect Tax Determination (for example,
soapUI by Smart Bear Software and oXygen XML Editor by Syncro Soft).
Ensure that your SOAP message and XML are well-formed. Follow the instructions provided by
your testing tool vendor.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

15

Testing Custom Integration Transactions

The XML Invoice Tool (xmlinvoice)


Determination's xmlinvoice tool generates a Web page from which you can test your XML code.
You can reach the servlet in a browser by going to the servlet URL. Ask the application server
administrator about the host, port, and whether HTTP or HTTPS is used in your environment.
This is the HTTPS format:
https://host:port/sabrix/xmlinvoice

The host and port are for the application server hosting Determination. Paste your XML directly
into the input area on the Tax Calculator page and click Calculate Tax. The output XML is
generated and displayed in the browser window. If there is an error in the XML, the tool
generates an error message.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

16

Calculating Tax
Testing Custom Integration Transactions

If you do not have readily available test input XML from your business source system, you can
generate it in the Workbench:
1. Log on to Determination.
2. Navigate to Menu > Workbench.
3. Create your transaction scenario.
4. Click Actions > XML Input.
5. In the pop-up window, right click on the XML window and choose View Source.
If you do not use View Source but instead try to paste directly from the
browser into the tool, the extra formatting characters added by the
browser will cause errors.
6. Select the XML from the Edit window and paste it into the tool (if you are simulating a tax
call from a financial system, you may want to remove Workbench-specific elements such as
SCENARIO_NAME).
7. Click Calculate Tax.

The XML Invoice Client Tool (xmlInvoiceClient)


Instead of using the Determination Workbench or xmlinvoice tool to test Determination's
calculations, you can use the program xmlInvoiceClient. This is a command line tool for both
Microsoft Windows and UNIX/Linux that allows you to send XML files containing transactions
directly to Determination. This tool simulates the typical routine of a business accounting system
passing transactions across a network to Determination.
This tool is for testing purposes only and is not intended to be a software integration to your
business accounting systems. Here are some possible uses for xmlInvoiceClient:
l

Analyzing connectivity by sending XML transactions across your network.

Modeling various types of transactions in Determination.

Creating transaction test harnesses for your quality assurance environments.

How It Works
xmlInvoiceClient is a Java program that you copy to the machine from which you want to test
Determination. This machine needs to have network access to Determination via HTTP(S); in
other words, you need to be able to reach your Determination URL from the machine where
you are initiating the test transactions.
Create an XML file containing one or more transactions. To build this file, you can either
compose it in a text or XML editor, or you could use the Workbench to generate a test case. The
Workbench only generates the XML for one transaction at a time; so, if you want multiple
transactions in your test tile, copy and paste the additional transactions into the file.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Calculating Tax

17

Testing Custom Integration Transactions

After you prepare your transaction file, configure either a Microsoft Windows batch file (.bat) or
a shell script (.sh) to execute xmlInvoiceClient (see the instructions below). When you execute
the program from a command line, it sends your transaction file across the network to
Determination and returns the results in the filename you specify. You can then inspect the XML
results manually, or you could write software programs to analyze the results.

Configuring and Executing xmlInvoiceClient


Follow these steps to set up and execute the program:
1. Locate the client directory in the unzipped Determination distribution.
2. Copy the contents of the client directory to a testing directory.
3. Copy your test input XML file into the same directory.
4. Open either xmlInvoiceClient.bat (Microsoft Windows) or xmlInvoiceClient.sh (UNIX/Linux)
in a text editor.
5. Read the descriptions of the three required parameters at the top of the file (--url=, --infile=,
and --outfile=)
6. Navigate to the last line and add the values for those required parameters for your
environment.
7. Save the file.
8. Execute either xmlInvoiceClient.bat or xmlInvoiceClient.sh from a command line.
9. Review the tax results contained in the output file you specified.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

18

Calculating Tax
Testing Custom Integration Transactions

The following example is a Microsoft Windows example of xmlInvoiceClient.bat:


@rem Required Arguments
@rem --url - The fully qualified URL for the Tax Engine
@rem calculation servlet. This is typically something @rem like this
(Do not use quotes):
@rem http://host:port/sabrix/xmlinvoice
@rem --infile - The directory and filename of the input @rem document
to send.
@rem --outfile - The directory and filename to
@rem write the calculation results.
@rem Optional Arguments
@rem --proxyhost - The URL of the proxy server,
@rem if one is required.
@rem --proxyport - The port of the proxy server.
@rem --iterations - The number of times that the input
@rem document (infile) is to be sent;
@rem This must be a positive whole number.
java -classpath .\commons-io-1.3.1.jar;^
.\commons-lang-2.4.jar;^
.\jsap-2.1.jar;^
.\taxengine-client-5.5.0.0.jar ^
com.sabrix.XmlInvoiceClient ^
--url=http://localhost:8080/sabrix/xmlinvoice ^
--infile=myinput.xml ^
--outfile=myoutput.xml

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Managing Zone Lookup

19

MANAGING ZONE LOOKUP


There are two Determination software tools that examine your zone information to ensure you
are submitting accurate data:
l

Zone Lookup Web Service

Zone Lookup XML Servlet (addressvalidation)

While each of these approaches uses different technologies--one uses a SOAP web service
and the other uses a Java servlet--they both compare submitted XML zone elements against
records in the database and return enhanced zone detail if it can be determined.
The following topics describe the structure of zone lookups, Determination parameters affecting
zone lookup, and details about the two zone interfaces:
l

Zone Structure (page 20)

Configuration Parameters for Zone Lookup (page 23)

Using the Zone Lookup Web Service (page 25)

Using the Zone Lookup Servlet (addressvalidation) (page 27)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

20

Managing Zone Lookup


Zone Structure

ZONE STRUCTURE
This topic describes the hierarchy of the input and output data fields used in zone lookup. The
input fields are ones that your financial system sends to Determination through your custom
integration software. The output fields are the ones returned to your financial system from
Determination following a zone lookup.
See Appendix A: Special Transaction Considerations (page 203) for additional
tips aboutXML transactions.

Zone Input Model


The input data model has these main levels:
Address: This is a structural XML element that contains zone fields such as COUNTRY,
PROVINCE, and STATE.
Zone: Each element on this level identifies a zone. For example, FR identifies
<COUNTRY> as France.
Input XML consists of a single <ADDRESS> structure. The minimum required elements to
submit are these:
l

For US addresses: <COUNTRY> + <POSTCODE> or <COUNTRY> + <STATE> +


<CITY>
For non-US addresses: <COUNTRY>

Here is an example of the request structure in plain XML (without a SOAP wrapper).
<ADDRESS>

<COUNTRY>US</COUNTRY>
<STATE>NY</STATE>
<COUNTY>Tompkins</COUNTY>
<CITY>Ithaca</CITY>
<POSTCODE>14850</POSTCODE>
</ADDRESS>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Managing Zone Lookup

21

Zone Structure

Zone Output Model


The output model has these main levels:
Response: Determination returns the lookup results inside a structural XML element.
Address: This is a structural element that contains zone fields such as COUNTRY,
PROVINCE, and STATE.
Zone: Each element on this level identifies a zone. For example, FR identifies
<COUNTRY> as France.
Message: This is a structural element that contains message information such as
SEVERITY, LOCATION, and CATEGORY. There can be multiple messages for each
address.
The output consists of zero to many <ADDRESS> and <MESSAGE> structures within the
response structural element. For example, a US address could appear as the following (if you
were using the Zone Lookup Service, there would be minor variations):
<ADDRESS_VALIDATION_RESPONSE>
<ADDRESS>

<COUNTRY>
<NAME>UNITED STATES</NAME>
<CODE>US</CODE>
<CODE3>USA</CODE3>
<ISOCODE>840</ISOCODE>
</COUNTRY>
<STATE>
<NAME>NEW YORK</NAME>
<CODE>NY</CODE>
</STATE>
<COUNTY>
<NAME>TOMPKINS</NAME>
</COUNTY>
<CITY>
<NAME>ITHACA</NAME>
</CITY>
<POSTCODE>
<NAME>14850</NAME>
</POSTCODE>
</ADDRESS>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

22

Managing Zone Lookup


Zone Structure

<MESSAGE>

<LOCATION>AddressSelector.findSelections</LOCATION>
<CATEGORY>ADDRESS VALIDATION</CATEGORY>
<CODE>AV_SUCCESSFUL_PROCESSING</CODE>
<MESSAGE_TEXT>Successful processing.</MESSAGE_TEXT>
<SEVERITY>0</SEVERITY>
</MESSAGE>
</ADDRESS_VALIDATION_RESPONSE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Managing Zone Lookup

23

Configuration Parameters for Zone Lookup

CONFIGURATION PARAMETERS FOR ZONE LOOKUP


Whether you are using the Zone Lookup web service or Zone Lookup XML Servlet, review the
following Configuration parameters and set them if they are appropriate:
Parameter

Default
Setting

Description

AV_INTL_TAXPROVIDER

Sabrix
INTL Tax
Data

This parameter sets the Determination company


used to look up zones when using the Address
Validation servlet to look up non-US addresses. This
can be any company set up in Determination,
including both custom data provider and tax data
provider companies. If this parameter is not
configured, lookup is performed using INTL Tax
Data.

AV_PARTIAL_MATCH_
STATES

Null (Off)

US Territories and US Armed Forces addresses


include "state" codes such as GU and VI (Guam and
Virgin Islands) and AE, AP, and AA (US Armed
Forces). If this parameter is set, submitting an
address containing these codes can result in a
successful zone tree match.
Set to Code1, Code2, CodeN to enable validation for
those "states". For example, set to AA,AE,AP,GU,
VI. The default is null (off).

AV_PLUS_FOUR_
ALTERNATES_ENABLED

Null (Off)

Specifies whether the alternate +4 ZIP codes should


be included in the return results when no +4 is
supplied with a US address, or the supplied +4 is not
found.
Set to Y to enable the return of alternate +4s. The
default is to not return alternate +4s.

AV_US_TAXPROVIDER

Sabrix US
Tax Data

This parameter sets the Determination company


used to look up zones when using the Address
Validation servlet to look up US addresses. This can
be any company set up in Determination, including
both custom data provider and tax data provider
companies. If this parameter is not configured,
lookup is performed using US Tax Data.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

24

Managing Zone Lookup


Configuration Parameters for Zone Lookup

Parameter
COUNTRIES_USING_
POSTCODE_LOOKUP_
POLICY

Default
Setting
Null
(Off)

Description
Set this parameter if you want Determination to
evaluate postcodes and cities in countries other than
the US. For example, if you are doing transactions in
Puerto Rico and use
<COUNTRY>PR</COUNTRY>, you would insert
PR into this parameter. Note that this value is casesensitive.
If you want several countries to use this lookup
policy, then separate each value with a comma. If
you use both two and three character codes for a
country, include each separated by a comma.
This parameter uses Determination's default logic for
postcodes and cities. For instance, if a city spans
multiple counties, and no Zip +4 is provided,
Determination selects the default city.
Warning: If you decide to use this parameter, be
sure that your source system supplies postcode data
for the selected countries.

SINGLE_ZONE_ALIAS_
ENABLED

Null
(Off)

Set this to the value of Y only if you want to turn off


multiple zone alias processing.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Managing Zone Lookup

25

Using the Zone Lookup Web Service

USING THE ZONE LOOKUP WEB SERVICE


This is a SOAP 1.1 web service that performs a lookup to prepare your transaction zone data.
Review the following sections about getting started with this type of zone lookup:
l

Generating the Code (page 25)

Mapping Zone Elements (page 25)

Setting Determination Configurations (page 26)

Generating the Code


To create the code automatically in your development framework, point to the WSDL, which
you can find by navigating to the services URL. Ask the application server administrator about
the host, port, and whether HTTP or HTTPS is used in your environment. This is the HTTPS
format:
https://host:port/sabrix/services

In the list of Determination web services, click on the link for ZoneLookupService.

Mapping Zone Elements


To map the address elements from your financial system to those in Determination, consult the
following:
l

XSD: See the field comments for detailed descriptions. You can find the XSD link in the
WSDL listed above. To view the comments in the most readable format, we recommend
that you open the XSD in a text or XML editor instead of a browser.
Online Help or the Determination User Guide: The Determination User Guide is a PDF
version of the Online Help. These resources contain some business logic behind the XSD
elements. The Determination User Guide is in the documentation directory of the software
distribution.
XML Elements Reference: This is a series of lists containing details about elements. Much
of this overlaps with the XSD descriptions.
l

Zone Lookup Input XML (page 199)

Zone Lookup Output XML (page 200)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

26

Managing Zone Lookup


Using the Zone Lookup Web Service

Setting Determination Configurations


There are several configurations in ONESOURCE Indirect Tax Determination that affect your
implementation of the Zone Lookup Service. Set the following if they apply to your environment:
XSD Validation
If you want your messages validated against the XSD, set the value of the Configuration
parameter WEB_SERVICE_XSD_VALIDATION to Y. If you disable validation using the value
of N, messages are not validated; however, your messages must still conform to the XSD to be
processed. If you turn on validation, you improve your error messages, but you also generate
some performance overhead.
Authentication
To enable authentication for the Zone Lookup Service, complete the following:
l

Set the Configuration parameter


WSS_AUTHENTICATION_REQUIRED to Y. The SOAP security header is examined
for a valid Determination user name and password.
To ensure that the service is never interrupted by an expired password, exempt the user
from password expiration. See the option Password Never Expires in the Help topic
Edit Users. The best practice is to change passwords periodically to maintain security.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Managing Zone Lookup

27

Using the Zone Lookup Servlet (addressvalidation)

USING THE ZONE LOOKUP SERVLET


(ADDRESSVALIDATION)
There are two methods for using the Zone Lookup Servlet: programmatic and manual. See the
following topics for explanations of each method.
There are several Configuration parameters you can set in Determination that
control your zone processing. If you are not getting the output you want, review
Configuration Parameters for Zone Lookup (page 23).

Submitting Zone Information Programmatically


Use this approach if you are creating a software integration that includes zone processing:
1. Ensure that your source system can produce the required Zone Lookup Input XML (page
199) elements that the servlet needs to validate zones. To map the zone elements in the
financial system to those in Determination, consult the XML Elements Reference topics:
l

Zone Lookup Input XML (page 199)

Zone Lookup Output XML (page 200)

2. Send a POST HTTP message to the addressvalidation servlet.


3. The addressvalidation servlet returns an address structure containing the completed
address and error messages.
This is a simplified procedure and assumes that your source system's API can handle both
generating the required XML and accepting the addresses and messages the servlet returns.
You may find it useful to run the servlet in a Web browser as shown below to generate the
output XML your source system can expect to receive when completing addresses.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

28

Managing Zone Lookup


Using the Zone Lookup Servlet (addressvalidation)

Manually Inserting Zone XML into a Browser


Use this approach if you want to test individual addresses manually (not programmatically):
1. Open a browser and go to the servlet URL. Ask the application server administrator about
the host, port, and whether HTTP or HTTPS is used in your environment. This is the
HTTPS format:
https://host:port/sabrix/addressvalidation

2. Enter address elements, using those found in Zone Lookup Input XML (page 199).

3. If desired, select the checkbox to view address validation results in another window.
4. Click Validate Address to complete the address.
5. The servlet displays the complete address and any associated errors.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

29

Using the Tax Configuration Web Services

IMPORTING AND EXPORTING


DETERMINATION DATA
There are two interfaces for importing and exporting Determination data. See the following
sections about each interface:
l

Using the Tax Configuration Web Services (page 29)

Using the Import/Export Interface (page 49)

USING THE TAX CONFIGURATION WEB SERVICES


There are several SOAP 1.1 web services you can use to query, load, or update data in
Determination. The following sections contain general information about the services as well as
selected implementation details for each service:
l

Getting Started with Tax Configuration Web Services (page 29)

Understanding the Logic of Tax Configuration Web Services (page 35)

Getting Started with Tax Configuration Web Services


Review the following to get started with your Tax Configuration web services:
l
l
l
l

Generating the Code (page 30)


Mapping Data Elements (page 30)
Setting Determination Configurations (page 30)
Reviewing Tax Configuration Web Service Conventions (page 32)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

30

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

Generating the Code


To create the code automatically in your development framework, point to the WSDL, which
you can find by navigating to the services URL. Ask the application server administrator about
the host, port, and whether HTTP or HTTPS is used in your environment. This is the HTTPS
format:
https://host:port/sabrix/services

In the list of Determination web services, click on the WSDL link for the particular service you
want to use.
Mapping Data Elements
To map the tax configuration elements from the financial system to those in Determination,
consult the following:
l

Understanding the Logic of Tax Configuration Web Services (page 35): This topic
contains some basic business logic behind the various web services.
XSD: See the field comments for detailed descriptions. You can find the XSD link in the
WSDL listed above. To view the comments in the most readable format, we recommend
that you open the XSD in a text or XML editor instead of a browser.
Online Help or the Determination User Guide: The Determination User Guide is a PDF
version of the Online Help. These resources contain some business logic behind the XSD
elements. The Determination User Guide is in the documentation directory of the software
distribution.

Setting Determination Configurations


There are several settings in ONESOURCE Indirect Tax Determination that affect your
implementation of the Tax Configuration web services. Set the following if they apply to your
environment:
Password Usage

By default, all the Tax Configuration web service calls require a valid Determination user and
password. If you turn off passwords for the Tax Configuration web services, you must still
include a valid Determination user with appropriate roles for the affected companies.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

31

Using the Tax Configuration Web Services

To turn off the password validation, apply the appropriate parameter and value on the
Configuration page of Determination:
l

SOAP_CONFIG_AUTHENTICATION_REQUIRED: Set this value to N to turn off authentication


for all of these services:
l

CompanyService

EstablishmentService

ExemptionCertificateService

ProductMappingService

UserService

EXEMPTION_CERTIFICATE_MANAGEMENT_SERVICE_AUTHENTICATION_REQUIRED:
Set this to N to turn off authentication for ExemptionCertificatePortType.
CUSTOMER_MANAGEMENT_SERVICE_AUTHENTICATION_REQUIRED: Set this to N to turn
off authentication for CustomerManagementPortType.

Password Expiration

If you are using passwords, exempt the user from password expiration so that the service is
never interrupted by an expired password. See the option Password Never Expires in the
Help topic Edit Users. The best practice is to change passwords periodically to maintain
security.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

32

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

Reviewing Tax Configuration Web Service Conventions


This section contains information about the conventions of the Tax Configuration web services.
This information is designed to supplement the XSD comments:
ReferenceId

This does not apply to CustomerManagementPortType or


ExemptionCertificatePortType.

The ReferenceId is an optional, user-defined ID used primarily to track error messages. Keep
the following in mind when using this:
l

It is populated on the reply only if you supply the ID in the request and there is a failure;
responses for successful calls do not contain these IDs.

This ID is transient and only applies within the context of a web services call.

The behavior of this remains the same on one or more elements.

We recommend that this value remain unique (although this is not a requirement).

Transaction Fast-Fail Behavior

This does not apply to CustomerManagementPortType or


ExemptionCertificatePortType.

This is simplified batch transaction behavior that is designed to help you debug any problems
you encounter with your request:
l

For each request, all entities either succeed or fail with a single error messagethe entire
batch is either committed or rolled back.

The error message refers to the first failed entity only.

Entities are processed in order so the items before the failure are assumed to be correct.

Success/Failure Messages

There is a variety of standard error messages. Each message includes a description: successful
calls have messages stating they were successful, and calls that fail have messages describing
the failures. Review the following table for information about return messages:
End-Point
Type

Number of
Entities

Status

Message

Create

1-N

SUCCESS

Successfully created (1-N) EntityType(s).

Create

1-N

FAILED

Failure creating EntityType NameOfEntity.


Reason(if applicable).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

33

Using the Tax Configuration Web Services

End-Point
Type

Number of
Entities

Status

Message

Find

ENTITY_
FOUND

Successfully found EntityType NameOfEntity.

Find

ENTITY_NOT_
FOUND

Failure finding EntityType NameOfEntity.


Reason(if applicable).

Update

1-N

SUCCESS

Successfully updated (1-N) EntityType(s).

Update

1-N

FAILED

Failure updating EntityType NameOfEntity.


Reason(if applicable).

Modify

SUCCESS

Successfully modified (1) NameOfEntity.

Modify

FAILED

Failure modifying NameOfEntity.

Delete

1-N

SUCCESS

Successfully deleted (1-N) EntityType(s).

Delete

1-N

FAILED

Failure deleting EntityType NameOfEntity.


Reason(if applicable).

Determination Users and Roles

All users are granted access to companies through the assignment of roles. Use the table below
as a guide to roles that are appropriate for Tax Configuration web service users:
Role

Configuration Web Service Operations

Certificate Manager

Users with this role can execute web service operations on customers and
exemption certificates.

Company
Administration

This role has the privileges that allow users to update or delete
Determination companies.

Sabrix System DBA

This role has all privileges for Tax Configuration web services, except for
some operations in the Company service:
l

Source System

This role has all privileges for Tax Configuration web services, except for
some operations in the Company service:
l

<Custom Role>

No Modify privileges to select a different parent company or to rename


a company.
No Delete privileges to remove a company.

No Modify privileges to select a different parent company or to rename


a company.
No Delete privileges to remove a company.

If you want more control over specific web services, create a custom role
and grant specific privileges to Determination applications. For example,
you could create a custom role that limits access to Create, Update and
Find operations, with no access to Modify or Delete operations.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

34

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

Logging

There are two Configuration parameters in Determination that control Tax Configuration web
service logging. See the Configuration topic in Help for valid values:
l

LOG_LEVEL (for application-wide logging): This controls logging across the entire
application.
LOG_LEVEL:<package name> (for package-level logging): This controls which packages
(and classes) appear in the logs and applies to all Tax Configuration web services except
CustomerManagementPortType and ExemptionCertificatePortType. For example, if you
use LOG_LEVEL:ORG.APACHE.CXF.INTERCEPTOR, you see log messages for this
package and its classes. To log multiple packages, add separate parameters for each
package.
Passwords are not recorded in logs.

SequenceId

The SequenceID is also known as the transaction ID and is generated automatically for the first
failed transaction in a request. Like ReferenceID, you can also use this for troubleshooting
transactions:
l

The Sequence ID provides a consistent way for you to identify which entity on the request
caused a particular error. For example, if ten entities were placed in a Create request and
the fifth one failed, then a SequenceID of 5 would be included in the return.

SequenceID is supplied as an output (response) element only, not an input element.

Every service provides a SequenceID, and it appears alongside ReferenceID.

XSD Validation

All Tax Configuration web service calls are validated automatically against the XSD (this cannot
be altered or configured).
Case Sensitivity

The XML validation requires the element names and attributes from the payload to match the
definition. The data passed in the web services is also case sensitive.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

35

Using the Tax Configuration Web Services

Understanding the Logic of Tax Configuration Web Services


Most of the information you need as a developer of Tax Configuration web services is in the
XSD comments; however, there are some special considerations for the various services. The
sections below have discussions about these features that will help you complete your project.
Service Name

Purpose

Version

CompanyService (page 36)

Create, find, modify, or delete


companies

2011-09-01

CustomerManagementPortType (page 38)

Create, find, modify, or delete


customers

2011-05-27

EstablishmentService (page 38)

Set establishments by authority or


zone

2011-09-01

ExemptionCertificatePortType (page 40)

Create, find, and delete exemption


certificates

2011-05-27

ExemptionCertificateService (page 42)

Manage various certificate


attributes

2011-09-01

ProductMappingService (page 45)

Create, find, modify, or delete


product mappings

2011-09-01

UserService (page 47)

Create, find, modify, or delete


users

2011-09-01

Because the various development frameworks may not generate identical


names, we describe most of the Java objects inside web service operations
using natural language labels and refer to them as elements.
Also, see Appendix A: Special Transaction Considerations (page 203) for
additional tips aboutXML transactions.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

36

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

CompanyService
Version:2011-09-01
Operation

Purpose

CreateCompany

Creates new companies

ModifyCompany

Changes parent company, company name, or


external company id of existing companies

UpdateCompany

Changes existing companies

FindCompany

Finds existing companies

DeleteCompany

Removes existing companies

Determination companies exist in a hierarchy so their attributes can be inherited by their


children. When you perform company-related operations, you need to specify the position of
that company in the hierarchy. The highest level is the default system company called
Administration (with an external company id of "-1"). All the companies you create are nested
under Administration. Here is an example of the nesting:
Administration
Acme Parent Company
Acme Child Company
The following sections explain special considerations for the company operations.
CreateCompany
This operation allows you to create one or more companies. If you are making a top-level
company, you must specify that its parent is the default system company, either by including the
name Administration or the External Company ID (-1).
To create multiple companies in a single batch, insert additional Create Company elements for
each new company.
ModifyCompany
This operation helps you change three attributes of companies: the parent, the company name,
or the external company id. You can change all three attributes in a single call if the user has the
appropriate role. See Determination Users and Roles (page 33) for details.
We do not recommend modifying companies in production environments;
however, if you must make changes to companies, use extreme caution
because these changes are irreversible.
This operation is available for individual companiesnot batches of companies. If you change
the parent of a company that has children, these child companies follow the parent that was
moved.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

37

Using the Tax Configuration Web Services

To use this operation, the user needs the appropriate role. See Determination Users and Roles
(page 33) for details.
UpdateCompany
You can change numerous company attributes with this operation; however, you can only
change the parent, company name, or external company id using the ModifyCompany
operation. You can also change multiple companies in a single batch by inserting additional
Update Company elements for each company.
Many of the elements contained in Extended Company Attributes are about configurations for a
particular business function. For example, if you are modifying a child company, you can
configure it so that it uses the TransEditor group of a parent company.
Parent companies cannot use the business functions of child companies; for
example, parents cannot use the TransEditor Groups of their children.
However, child companies can use the business logic of their parents or
grandparents instead of their own.
In the case of a grandchild company that wants to use its grandparent's
business logic, the grandchild company would need to specify this directly and
not go through the parent.
FindCompany
Use this operation to find the attributes of a company. Data is returned only for the requested
companynot for any child companies. You must look up the child companies in separate
requests.
This operation is only available for individual companiesnot batches of companies.
DeleteCompany
You can remove companies at any level below Administration, but note that this deletion
operation also removes all companies nested below the one you are deleting.
We do not recommend deleting companies in production environments;
however, if you must remove companies, use extreme caution because these
changes are irreversible.
This will delete the company, all of its children, and related data. If there are
users that only had access to one of the deleted companies, they will not be able
to log on to Determination. Also, a user cannot delete its default company.
This operation is only available for individual companiesnot batches of companies.
To use this operation, the user needs the appropriate role. See Determination Users and Roles
(page 33) for details.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

38

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

CustomerManagementPortType
Version: 2011-05-27
Operation

Purpose

CreateUpdateCustomer

Creates or changes existing customers

DeleteCustomer

Removes existing customers

CustomerExists

Confirms the existence of customers

Use this service to add one or more Determination customers. If you are adding multiple
customers, insert additional Request elements for each customer.
In the following Customer Management operations, Customer Group
Reference is not used when it is contained in Customer Reference.

CreateUpdateCustomer
Use this operation to create or update one or more Determination customers. You can also
upload multiple customer groups, each with multiple customers. To upload customers for more
than one customer group, insert additional Request elements for each group; then, inside each
Request, insert additional Customer elements for each customer.
In each request, identify the customer by the Customer Number.
DeleteCustomer
Use this operation to remove one or more Determination customers. If you are deleting multiple
customers, insert additional Request elements for each customer.
Identify the customer by the Customer Number.
CustomerExists
Use this operation to confirm the existence of one or more Determination customers. If you are
searching for multiple customers, insert additional Request elements for each customer.
Identify the customer by the Customer Number.

EstablishmentService
Version: 2011-09-01
Operation

Purpose

ModifyEstablishment

Sets establishments by authority

ModifyTopLevelEstablishment

Sets establishments by top-level zone

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

39

Using the Tax Configuration Web Services

Use this service to specify the locations in which your company is established (has a physical
presence). You can set establishments either on the level of the geographic zone or taxing
authority. The zone and authority levels exist in a hierarchy where the zone settings are at the
top. The following shows an example of the city food/beverage authority type in the state of
Alabama (United States):
Alabama (Zone)
AL - MOBILE, CITY FOOD SERVICE ESTABLISHMENT TAX(Authority)
AL - THOMASVILLE POLICE JURISDICTION, CITY FOOD SERVICE ESTABLISHMENT TAX
(Authority)
AL - THOMASVILLE, CITY FOOD SERVICE ESTABLISHMENT TAX (Authority)

The establishments from the zone level are inherited by the child authorities. However, you can
also override these zone-level settings by configuring establishments at the lower, authority
level.
The following sections explain special considerations for the establishment operations.
ModifyTopLevelEstablishment
Use this to set zone-level establishments. Besides indicating whether an entire zone should be
set for the establishment, you are also setting two other fields:
l
l

OverrideTaxType (forces the type of all intrastate transactions to a particular type).


InterstateTaxType (forces the type of all interstate transactions to a particular type and is
only set for US transactions).
You cannot use ModifyTopLevelEstablishment to set the Establishment
information for an entire Tax Data Type. In other words, you can't set all states
in America to a default Establishment of false. You need to set this for each
zone (state).
ModifyTopLevelEstablishment will override any modifications to established
authorities that you have made under a top-level zone.

ModifyEstablishment
Use this to set authority-level establishments. This has no effect on Zone-level establishments,
except that the settings here take precedence over the zone level.
Just like ModifyTopLevelEstablisment, you can set Override Tax Type and Interstate Tax Type
(US transactions only), but you also need to set Authority Name Or Type. This means that you
either supply the exact authority name (for example, AL - MOBILE, CITY FOOD SERVICE
ESTABLISHMENT TAX) or your supply the type of authority, such as City Food/Beverage.
The data for Authority Name Or Type is case sensitive, as it is for all the XML
elements.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

40

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

ModifyEstablishment provides more granular options for setting the location than
ModifyTopLevelEstablishment because you are setting specific authorities. Choose from the
zone-related values to specify the location. See the Zones topic in Help for details about zones.
Ensure that you supply enough address information so that Determination can
make a match; otherwise, you may receive a Partial Zone Tree error.

ExemptionCertificatePortType
Version: 2011-05-27
Operation

Purpose

CreateUpdateExemptionCertificate

Creates or updates exemption certificates

ExemptionCertificateExists

Checks for existing certificates

DeleteExemptionCertificate

Removes existing certificates

Exemption certificates are used to exempt all or part of transactions from tax. They are issued
by taxing authorities and have certain characteristics:
l

Apply to a particular customer. You can manually create or automatically create customers
using exemption certificates as necessary.
Are valid in a particular country or related authority type/authority (US and International) or
state or related authority type/authority (US only).

Are valid for transactions meeting certain criteria, including a particular product or service.

Have an exemption amount or rate associated with the exempted product or service.

Can be valid for one or more transactions.

Certificates always exist in relation to customers and companies, and companies can have
multiple customer groups.
In the following exemption certificate operations, Customer Group Reference is
not used when it is contained in Customer Reference.

CreateUpdateExemptionCertificate
Use this operation to do the following:
l

Create new customers and new exemption certificates.

Create new exemption certificates for existing customers.

Update customer details and associated exemption certificates.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

41

Using the Tax Configuration Web Services

If you are creating or updating multiple customer/certificate combinations, insert additional


Request elements for each combination.
Keep the following in mind when you are using this operation:
l

All actions require you to identify the Company Name and the Customer Group Name.

You can only add customers to existing customer groupsnot create customer groups.

To change both the Customer Number and the Customer Name in the same request, do
the following:
1. Insert the current Customer Number inside the Customer Reference element for
Customer.
2. Insert the new Customer Name and Customer Number inside the Detail element for
Customer.

To change the certificate number at the same time as the Customer Name and/or
Customer Number, do the following:
1. Complete the previous steps for changing the Customer Number and/or Customer
Name.
2. In the same request as above, insert the new Customer Number inside the Customer
Reference element for Exemption Certificate Reference.
3. Insert the existing Certificate Number inside ExemptionCertificate Reference.
4. Include Valid From or Exempt Reason for the existing certificate inside
ExemptionCertificate Reference.
5. Insert the new Certificate Number inside Exemption Certificate Detail.

ExemptionCertificateExists
Use this operation to detect if one or more exemption certificates exists. If you are searching for
multiple exemption certificates, insert additional Request elements for each certificate.This
operation requires the following:
l

Company

Customer Group

Customer Number

Exemption Certificate Number

If you do not know the exemption certificate number, use the


FindExemptCertificatesByCustomer (page 45) operation.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

42

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

DeleteExemptionCertificate
Use this operation to delete one or more exemption certificates. If you are deleting multiple
certificates, insert additional Request elements.
You can select the certificate to delete using up to four parameters which can be placed in any
order in the Exemption Certificate element:
l

Certificate Number (required)

Valid From (required)

Exempt Reason (optional)

Customer Reference (required)

ExemptionCertificateService
Version:2011-09-01
Operation

Purpose

ModifyCertificateAuthority

Change certificate authorities at various authority


levels

ModifyLimitedUseCertificate

Change existing limited use certificates

ModifyTopLevelCertificateAuthority

Change top-level certificate authority only

FindExemptReason

Find existing exempt reasons

ModifyExemptReason

Change existing exempt reasons

DeleteExemptReason

Remove existing exempt reasons

FindExemptCertificatesByCustomer

Find exemption certificates by customer

Although some of the operations of this service overlap with the general operations of
ExemptionCertificatePortType (page 40), this service is designed to help you manage various
certificate attributes:
l

General Attributes:Certificates have many attributes such as dates for which they are
valid, exemption amounts, and customer details.
Limited Use: The default type is a blanket certificate, but you can apply conditions that
make a certificate apply only under certain criteria of use.
Authority Attributes: Certificates are issued by taxing authorities, and you may need to
indicate which level of taxing authority is applicable for each certificate. There are two
separate operations that allow you to control this setting: you can either set the top-level
zone (which sets all child authorities) or you can set child authorities individually.
Exempt Reasons: Some companies want to include codes in certificates indicating the
rationale for the exemption. You can find, add, and modify these company-specific codes.

The following sections explain special considerations for the exemption certificate detail
operations.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

43

Using the Tax Configuration Web Services

ModifyCertificateAuthority
Use this operation to change the authority for a certificate. If you are changing multiple
authorities, add additional Certificate Authority elements for each authority.
Authorities exist in the context of zones (locations). So, to set an authority, you must specify its
zone, along with its name. When you use this operation, you can set any number of authorities
based on your zone settings. For example, you could use this service to set up a certificate to be
exempt in one or two particular authorities in the US state of Illinois (instead of exempting all
transactions in the entire state).
As an example in the United States, if you want to exempt the city of Lombard, Illinois for food
and beverage taxes, do the following:
1. Specify the zone information in the request:
l

country=US

state=IL

county=DuPage

city=Lombard

2. Specify either the AuthorityName (IL - LOMBARD, CITY FOOD AND BEVERAGE TAX)
or the AuthorityType (City Food/Beverage).
The operation then looks through all the locations (zones) you specified for that particular
authority.
ModifyLimitedUseCertificate
Limited use certificates have custom conditions that need to be satisfied for a certificate to apply.
These conditions are composed of an XML element and a value pattern (a literal value or a
regular expression). For example, a limited use certificate could require the data in
INVOICE.INVOICE_NUMBER to equal the regular expression %1234_$.
Use this operation to do the following:
l

Convert blanket certificates, which are the default, to limited use

Delete limited use XML elements and value patterns

Add limited use XML elements and value patterns

Update XML elements and value patterns

This operation requires you to identify an existing certificate that you want to change. It does not
allow you to create a new certificate. Be sure to include the ExemptReason and ValidFrom
values in the request.
To create a new certificate, use the CreateUpdateExemptionCertificate
operation in the ExemptionCertificatePortType service.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

44

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

ModifyTopLevelCertificateAuthority
Use this operation to set all authorities under one or more zones as exempt. If you are changing
multiple zones, insert additional Top Level Certificate Authority elements for each zone to
modify.
In this operation, you specify either the country or state. The operation then sets all authorities
under the country or state as exempt. If the Country is US, then use only the State element. If
the country is anything other than US, use only the Country element.
This operation removes all individual settings under the country or state. Check
with your tax professional before executing this.

FindExemptReason
Use this operation to find the exempt reasons for a particular company and customer group.
Remember that exempt reasons are specific to customer groups, so be sure to specify the
correct company/customer group combination in your search.
The Exempt Reason Long Code and Exempt Reason Short Code are optional elements. If you
do not supply them, you receive a complete listing of the exempt reasons for that combination of
company and customer group.
ModifyExemptReason
Use this operation to change the exempt reasons for a company and customer group.
You must use the exempt reason long code, short code, and the description in this operation,
but long code and short code function as keys, so you cannot change both of these in one
request; otherwise, you will add a new record.
For example, if you want to change a long code and description, you must identify the exempt
reason record by the existing short code. Alternatively, if you want to change the short code and
the description, identify the record by the existing long code.
DeleteExemptReason
Use this operation to delete an exempt reason for a company and customer group. Identify the
exempt reason to delete by the long code, short code, and description.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

45

Using the Tax Configuration Web Services

FindExemptCertificatesByCustomer
Use this operation to find the certificates for particular customers. Supply the customer number,
company name, and customer group name.
This operation returns the following basic information in its confirmation:
l

Customer Number

Customer Group Name

Certificate Number

Exempt Reason Long Code

Valid From

Active

ProductMappingService
Version:2011-09-01
Operation

Purpose

FindProductMapping

Finds existing Product Mappings

UpdateProductMapping

Changes existing Product Codes in Mappings

CreateProductMapping

Creates new Product Mappings

DeleteProductMapping

Removes Product Mappings

Product mappings allow you to associate products in your business system with those that
reside in the Determination software. They consist of both a product code from your financial
system and the related product category in a hierarchical list of products in Determination.
For example, you might have product code from your business system labeled Exer_Course
that you need to map to the product category called Exercise Classes in Determination's
product hierarchy. The product category Exercise Classes is at the bottom of one branch of the
Determination product hierarchy:
91 Personal and Domestic Services
Personal Appearance
Spa and Workout and Rejuvenation Facilities
Exercise Classes

When you make these product code mappings, you do so in the context of a Determination
company. Within a company, these mappings are categorized by product group (for example,
US) and by product mapping groups (collections of similar product mappings).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

46

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

Most of the operations for this web service require you to identify the product mapping either by
the Product Mapping Natural Key or the Product Mapping Id:
l

Product Mapping Natural Key


l

Product Group Name

Product Mapping Group Name

Product Code

Product Mapping Id (determine this by executing the FindProductMapping operation)

The following sections explain special considerations for the product mapping operations.
FindProductMapping
This operation helps you find details about a particular product mapping. This operation returns
the product mapping id that you can use to perform other operations on product mappings, such
as updates.
This operation requires you to identify the product mapping either by the Product Mapping
Natural Key or the Product Mapping Id.
In the response, you are provided a list of products. The sequence of the list items represents
the hierarchy of products. For example, if your financial system product code labeled Exer_
Course is mapped to the Determination product category Exercise Classes, the output of a
FindProductMapping request for Exer_Course would include a list containing these elements:
91 Personal and Domestic Services
Personal Appearance
Spa and Workout and Rejuvenation Facilities
Exercise Classes

This operation is available only for single searchesnot for batch operations.
UpdateProductMapping
Use this operation to change one or more product codes in existing product mappings. For
example, if your financial system product code Exer_Course has changed to Exercise_Course,
you could use this operation to change its mapping to Exercise Classes in Determination.
This operation only updates the product code portion of the product mapping
not the product category in Determination.

If you are changing multiple product mappings, include additional Product Mapping elements for
each mapping.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

47

Using the Tax Configuration Web Services

This operation requires you to identify the product mapping either by the Product Mapping
Natural Key or the Product Mapping Id.
CreateProductMapping
Use this operation to create one or more product mappings. If you are creating multiple product
mappings, insert additional Product Mapping elements for each mapping.
This operation requires you to identify the product mapping by the Product Mapping Natural
Key.
Once you identify the company and product mapping, specify the path to the product category in
Determination. Construct the hierarchy by inserting Path elements for each level of the
hierarchy. For example, if you are mapping to Exercise Classes in the default product tree, you
would include the following:
91 Personal and Domestic Services
Personal Appearance
Spa and Workout and Rejuvenation Facilities
Exercise Classes

If you are mapping to a custom product in the Determination product tree, set Custom Product
to true. This directs the operation to search Determination's custom product tree.
DeleteProductMapping
Use this operation to remove one or more product mappings. If you are removing multiple
product mappings, insert additional Product Mapping blocks for each deletion.
This operation requires you to identify the product mapping either by the Product Mapping
Natural Key or the Product Mapping Id.

UserService
Version:2011-09-01
Operation

Purpose

FindUser

Finds existing users

DeleteUser

Removes existing users

CreateUser

Creates new users

UpdateUser

Changes existing users

Users always exist within the context of a Determination company. Each user is granted a role
or roles that determine what actions they can perform within each company. A single user may
have multiple roles associated with one or more companies. For example, a user may use the
Determination DBA and License Manager roles for one company, and the Certificate Manager
and User Administrator roles for another company.
The following sections explain special considerations for the user operations.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

48

Importing and Exporting Determination Data


Using the Tax Configuration Web Services

FindUser
Use this operation to view details about particular users. You can use this to determine if a user
exists and to see the user's attributes.
This operation is available only for single usersnot for batch operations.
DeleteUser
This operation deletes users based on User Name. To delete multiple users, insert additional
User elements for each user.
This action is a logical deletionnot a physical one. It deactivates the user so it is no longer
visible in the Determination Tax Control Panel. The effect of this is that you cannot create
another user with the same name as any of the deactivated ones.
CreateUser
Use this operation to create one or more new users. To create multiple users, insert additional
User elements for each user.
If you are adding multiple roles for a particular user, insert additional Role elements for each
role.
Although this operation is dependent upon roles, it does not allow you to create a role. You can
create roles through the Determination Tax Control Panel.
UpdateUser
Use this operation to update one or more users. To update multiple users, insert additional User
elements for each user.
If you are adding multiple roles for a particular user, insert additional Role elements for each
additional role.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

49

Using the Import/Export Interface

USING THE IMPORT/EXPORT INTERFACE


This is an interface that allows you to import and export data in the Determination database
tables. Users typically access this through the Tax Control Panel, but you can also use
command-line tools to bypass the graphical user interface. Common uses are to:
l

l
l

Import monthly US and International Content Updates from Thomson Reuters. You can
configure this importation to be wholly or partially automated, or you can download and
install updates manually.
Back up a Determination company.
Move data between instances of the same Determination version (by exporting and reimporting data). The current compatibility version is G, which spans releases from version
5.0.0.0 to the current release.
Create import files so that you can upload data from your financial system to ONESOURCE
Indirect Tax Determination. Data types include exemption certificates, customers, licenses,
materials, products, product mapping files, and others.

The following topics explain two special features of the Import/Export interface:
l

Using Command-Line Export and Import Tools (page 50)

Creating CSV Import Files (page 55)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

50

Importing and Exporting Determination Data


Using the Import/Export Interface

Using Command-Line Export and Import Tools


For information about importing and exporting through Determination, see
those topics in Help.

Determination provides two tools to enable command-line export and import operations. You
can use these tools to transfer various configurations from one installation of ONESOURCE
Indirect Tax Determination to another or to import zipped tax data. While you can perform the
same tasks using Import/Export in Determination, there are two instances when you may prefer
to use these command-line tools:
l

To bypass browser and other memory limitations that can hang exports and imports of large
data files.
To perform batch operations without the need to access the Determination.
The import tool is designed to import zipped XML data--not plain text files such
as comma separated value files (CSV) used in the simple file format imports.

Each tool is a Java program which performs an http (or https) request to a Determination
instance and performs imports or exports according to the parameters provided. You can
execute each tool on the command line, or you can use either the shell script or batch file
provided in the client directory of ONESOURCE Indirect Tax Determination software
distribution: entityExportClient.bat and entityImportClient.bat or entityExportClient.sh and
entityImportClient.sh. You can execute the programs from any environment that has the
following:
l

All the .jar files contained in the client directory of ONESOURCE Indirect Tax Determination
software distribution

Java in the executable path (PATH environment variable)

Access to the desired Determination instance over http or https


If you use these tools to automate batch operations, you either need to follow up
after the export/import to check for errors in the Determination's Import/Export
History page, or you need to add custom code to your batch or shell script that
queries the tax database for errors.

Command Line Exports


See the following for an explanation of the required and optional parameters, as well as an
example of an export.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

51

Using the Import/Export Interface

Usage
java -classpath \
.\commons-io-1.3.1.jar; \
.\commons-lang-2.4.jar; \
.\jsap-2.1.jar; \
.\taxengine-client-5.5.0.0.jar \
com.sabrix.entityconversion.EntityExportClient \
--url=<URL of app server> \ --companyName=<name of company> \
--outfile=<name of file to write data to> \
--exportType=<export type> \
--proxyhost=<Optional: address of proxy server>
--proxyport=<Optional: proxy server port> \
--customerGroupName=<Optional: name of customer group> \
--filterGroupName=<Optional: name of filter/transeditor group> \
--productMappingGroupName=<Optional: name of product mapping group> \
--startDate=<Optional: start date> \
--endDate=<Optional: end date> \
--fileType=<Optional: XML|XMLUNZIPPED>

Parameters
Parameter

Description

Required?

-classpath

A list of the required .jar files.

Yes

--url

http[s]://<server>:<port>/sabrix/export (<server>:<port> is the


server and port on which ONESOURCE Indirect Tax
Determination is running).

Yes

--companyName

ONESOURCE Indirect Tax Determination company for which


you are performing the export.

Yes

--outfile

The name of the .zip file to which you want to write the results.

Yes

--exportType

One of the following:

Yes

l
l
l
l
l
l

company
audit
user
customerGroup
filterGroup
productMappingGroup

--proxyhost

The address of the proxy server.

No

--proxyport

The proxy server port.

No

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

52

Importing and Exporting Determination Data


Using the Import/Export Interface

Parameter

Description

Required?

Export options

If you are exporting customer groups, filter groups, or product


mapping groups, you must include the additional parameters
below. These parameters limit the exported data within the
specified exportType.

Yes

l
l

For customerGroup exports: -customerGroupName=<name>


For filterGroup exports: --filterGroupName=<name>
For productMappingGroup exports: -productMappingGroupName=<name>

--startDate

An optional start date for audit data records (audit export only).

No

--endDate

An optional end date for audit data records (audit export only).

No

--fileType

XML or XMLUNZIPPED: the data type contained in --outfile).

No

If a parameter includes a space, enclose it in double-quotes (for example,


My File.zip).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

53

Using the Import/Export Interface

Example: TransEditor Group Export

java -classpath .\commons-io-1.3.1.jar; \


.\commons-lang-2.4.jar; \
.\jsap-2.1.jar; \
.\taxengine-client-5.5.0.0.jar \
com.sabrix.entityconversion.EntityExportClient \
--url=http://myhost:8080/sabrix/export \
--companyName=sampleParentCo \
--exportType=filterGroup \
--filterGroupName=MyTestFilter \
--outfile=myFilterGroupExport.zip \
--fileType=XML

Command Line Imports


See the following for an explanation of the required and optional parameters, as well as an
example of an import.
Usage

java -classpath .\commons-io-1.3.1.jar; \


.\commons-lang-2.4.jar; \
.\jsap-2.1.jar; \
.\taxengine-client-5.5.0.0.jar; \
.\sabrix-encryption-impl-2.16.0.jar; \
.\sabrix-password-impl-2.16.0.jar; \
.\sabrix-encryption-api-2.16.0.jar \
com.sabrix.entityconversion.EntityImportClient \
--url=<URL of Determination Import/Export> \
--infile=<input file to send to url> \
--username=<valid username> \
--password=<valid password for username> \
--proxyhost=<Add if you are using proxy> \
--proxyport=<Add if you are using proxy>

Parameters
Parameter

Description

Required?

-classpath

A list of the required .jar files.

Yes

--url

http[s]://<server>:<port>/sabrix/import (<server>:<port> is
the server and port on which ONESOURCE Indirect Tax
Determination is running).

Yes

--infile

Name of the input file with the extension to use for the import.

Yes

--username

Valid user name of a Determination administrator.

Yes

--password

Password for user name.

Yes

--proxyhost

Address of proxy server.

No

--proxyport

Proxy server port.

No

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

54

Importing and Exporting Determination Data


Using the Import/Export Interface

If a parameter includes a space, enclose it in double-quotes (for example,


My File.zip).

Example

java -classpath .\commons-io-1.3.1.jar; \


.\commons-lang-2.4.jar; \
.\jsap-2.1.jar; \
.\taxengine-client-5.5.0.0.jar; \
.\sabrix-encryption-impl-2.16.0.jar; \
.\sabrix-password-impl-2.16.0.jar; \
.\sabrix-encryption-api-2.16.0.jar \
com.sabrix.entityconversion.EntityImportClient \
--url=http://myhost:8080/sabrix/import \
--infile=/temp/mySDIfile.zip \
--username=yourUserName \
--password=yourPassword

Concurrent imports may result in data corruption. Always ensure that an import
has completed before beginning the next import and that another user is not
currently running an import on the target Determination instance.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

55

Using the Import/Export Interface

Creating CSV Import Files


Using the simplified CSV file format, you can:
l

Import data from your ERP system.

Create data without using Determination.

Update ONESOURCE Indirect Tax Determination data.

CSV import files are a very powerful tool. Because the imported data replaces existing data,
use caution before you proceed. Please read Best Practices for Importing Data with CSV Files
(page 58) for tips about safely using CSV import files.

Supported CSV Files


The following file types are supported:
l

Authority Rate Sets CSV Format (page 59)

Company CSV Format (page 62)

Commodity Mappings CSV Format (page 60)

Customer CSV Format (page 67)

Customer License CSV Format (page 70)

Date Determination Logic CSV Format (page 72)

Date Determination Rule CSV Format (page 73)

Established Zones CSV Format (page 75)

Exemption Certificates CSV Format (page 78)

Exemption Certificate Zones CSV Format (page 82)

Exchange Rate CSV Format (page 77)

License Type CSV Format (page 89)

Limited Use Exemption Certificates CSV Format (page 85)

Material Set CSV Format (page 90)

Product Categories CSV Format (page 92)

Product Mappings CSV Format (page 94)

Product Zones CSV Format (page 96)

Reference Value CSV Format (page 98)

TransEditor Groups CSV Format (page 100)

Zone Alias CSV Format (page 104)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

56

Importing and Exporting Determination Data


Using the Import/Export Interface

CSV File Format


The simplified CSV file format is a list of comma-separated values corresponding to one of the
supported import types. You can create a CSV import file several ways:
l
l

Copy the code example below into a text editor and replace the values with your own data.
Create the file in a text editor. Make sure to represent each column name in the header and
separate columns from one another by a comma in the data.
Use a spreadsheet to set up the file, using a different column for each value. When you save
the file, select the CSV format to create a comma-delimited file. In CSV files, column
headings and values are separated by commas, even if a column contains no data.
Use a Determination-supplied template. Templates contain only the required fields; if you
have data in optional columns, you must include the column name in the header and a value
for the column.

Each supported import type requires a CSV file. The file contains the import type, all of the
column headers separated by commas, and values for the imported data (also separated by
commas). The following example shows a Product Categories import with 8 products:
sdiType=ProductCategories
ProductPath,Description,CommodityCode
Office Supplies,Office Supplies,OS1111
Office Supplies.Paper,Paper,OS2222
Office Supplies.Paper.Recycled,Recycled Paper,
Office Supplies.Paper.Photo,Photo Paper,
Office Supplies.Paper.Glossy,Glossy Paper,
Office Supplies.Furniture,Office Furniture,OF1234
Office Supplies.Furniture.Desks,Desks
Office Supplies.Furniture.Chairs,Chairs

The first line defines the import type (sdiType=ProductCategories). This line is optional; if you
do not include it, the Import Wizard prompts for the type when you import the data. If you include
it, add trailing commas to represent column separators. In the example above, there are three
column headers (ProductPath, Description, and CommodityCode), so you would add two
commas:
sdiType=ProductCategories,,

The second line defines the columns for this import type (ProductPath, Description,
CommodityCode). Each import type has its own column definition, including required and
optional columns.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

57

Using the Import/Export Interface

In the example, the following eight lines contain the data to import. Each column has its own
requirements for the values you can enter, including data type, size, and order. Click a link in the
Supported CSV Files (page 55) list above to see a table with format requirements for each
import type.
Warning: Blank spaces at the end of lines, as well as blank rows, cause all or part of an import
to fail.

Import Hierarchy
Several of the import types cannot be imported until referenced data is present in the database.
For example, exemption certificates cannot be loaded until the owning customers are present.
l

Exemption Certificates are dependent on Customers.

Exempt Zones are dependent on Exemption Certificates.

Product Mappings and Product Zones are dependent on Product Categories.

TransEditor Groups do not have any dependency on other data.

Naming Conventions
Your import file can use any name, as long as it does not contain the / or \ characters and has
the .csv suffix.

Including Extended (UTF-8) Characters in Import Files


Determination can handle extended (UTF-8) characters, such as accented characters in
languages other than English. To use these characters successfully, you must use a text editor
that can be configured to edit and save files using the UTF-8 character set. Programs known to
support UTF-8 include:
l

Microsoft NotePad, WordPad

Helios Software TextPad

IDM Computer Solutions UltraEdit

Altova XMLSpy

Wattle Software XMLWriter

Review the documentation for your editor to determine how to use the UTF-8 character set.
Throughout the simplified CSV descriptions, column types such as varchar2(100) and varchar2
(50) indicate the number of single-byte characters that can be successfully contained within the
element. If you include multi-byte characters, you need to account for their size when submitting
data. Most Western accented and currency characters are 2 bytes; most Asian characters are 3
bytes.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

58

Importing and Exporting Determination Data


Using the Import/Export Interface

Best Practices for Importing Data with CSV Files


CSV imports are a very powerful tool. Because the imported data replaces existing data, use
caution before you proceed.
Keep these guidelines in mind when importing data with CSV files :
l

Avoid using special characters if your data does not require them (for example, <, >, &, ", ').

Blank spaces at the end of lines, as well as blank rows, cause all or part of an import to fail.

Import data is case-sensitive.

Overlapping records within the same file are not validated (for example, dates and product
mappings).
Dates must be in the MM/DD/YYYY format (for example, 11/30/08 is interpreted as
11/30/0008).
Booleans must be Y or N. If you enter Yes or No, the values default to N (worst case is Yes
= N).
In updated records, if you do not include data in optional columns or fields, the default value
is NULL .
Each import type has its own column definitions, including required columns, optional
columns, and prerequisites.

Checking the Log File for Import Errors


When the import is complete, you can click the History tab to view the import history. In
addition, two types of log data can assist you in troubleshooting an import:
l

An error log lists every error encountered while performing the import.

An info log lists informational messages generated by the import.

To search and view log data, use the menu system to navigate to System > About > Log Search
page.
Using Imports to Add or Modify Data
Typically, simplified CSV imports are used to add new data to ONESOURCE Indirect Tax
Determination and the examples shown in each simplified CSV description describe how to do
so. You can also use imports to modify data that already exists, but modifying only the columns
with data changes. Each import type imposes its own update restrictions as described in the
individual CSV file format topics.
If you import data, you must provide complete data for the imported entity. For
example, if you import an exemption certificate to modify the expiration date,
you must import all fields on the certificate or the existing data is replaced by
blank data.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

59

Using the Import/Export Interface

Authority Rate Sets CSV Format


Before importing rate sets, ensure that referenced Authorities, Material Sets, and Products
exist on the target system.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Authority Rate Sets File Format
SDITYPE=AUTHORITYRATESET-INTL or AUTHORITYRATESET-US
Column Name

Format

Required?

Description

Name

varchar2
(100)

The name of the authority rate set.

AuthorityName

varchar2
(100)

The name of the authority owning the authority


rate set.

CustomAuthority

varchar2(1)

Indicates whether the authority listed above is


(Y) or is not (N) a custom authority.

MaterialSetName

varchar2
(100)

The name of the material set to which this rate


set is associated. This must be a material set
which is associated with the authority indicated
by AuthorityName.

Description

varchar2
(200)

A description for the rate set.

ProcessOrder

number

The process order for the specified rate set rate.

StartDate

mm/dd/yyy- Y
y

The start date for the rate set rate.

EndDate

mm/dd/yyy- N
y

The end date for the rate set rate.

MaterialSetListName

varchar2
(100)

A material list containing products which will


trigger this rate set rate.

ProductPath

varchar2
(100) (see
note)

The full path of the product category in dot


notation (parent.child.grandchild.etc). You must
specify the highest level first, then each level in
succession. See the example below for details.
Note that the length of 100 refers to an individual
level of the path, not the entire path length.

CustomProduct

varchar2(1)

Indicates whether this is (Y) or is not (N) a


product found in the Custom Product Categories
list.

RateCode

varchar2
(50)

A rate code associated with the authority


specified above which will be applied when this
rate set rate is triggered.

ErpTaxCode

varchar2
(200)

An optional tax code which can be used to trigger


this rate set rate.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

60

Importing and Exporting Determination Data


Using the Import/Export Interface

Authority Rate Sets File Example


This file includes a single rate set. Note that the second line wraps so that the entire row is
viewable. In use, the text is all on one line.

For more information about formatting a CSV file, see CSV File Format (page 56).
Updating an Existing Authority Rate Set
You can update an existing rate set record by including data in the AuthorityName,
CustomAuthority, MaterialSetName, and ProcessOrder columns to match a rate set rate; then
modifying additional columns as needed.
Authority Rate Set File Import Prerequisites
You need to create any desired target companies, custom authorities, custom products, and
material sets and lists before importing authority rate sets with the Import/Export Wizard.
Authority Rate Set File Import Options
When importing an authority rate set file, the Import/Export Wizard prompts for:
l

Company Selection. Select the desired company which owns the associated material
sets and lists.
Product Group Selection. Select the product group containing the products listed in the
import file.

Commodity Mappings CSV Format


Using a simplified CSV file format, you can import mappings from your ERP's source codes to
Determination products using Commodity Codes. The Commodity Mappings import file applies
only to existing products - those you created in ONESOURCE Indirect Tax Determination, or
those you uploaded with Import/Export.
Traditionally, a product mapping maps your ERP codes to a product in the Determination
product tree. This requires specifying the entire product path, which is cumbersome and errorprone. If you wish, you can use a commodity code to directly map to a product code.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

61

Using the Import/Export Interface

The commodity code replaces a full product path in a product mapping. The CSV file specifies
the commodity codes to map to a product code and whether it is a custom product. You can use
this alternative method of mapping your source system product codes to either standard
Determination products or to your own custom products as long as these products have a
commodity code.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Example CommodityMappings File Format
SDITYPE=CommodityMappings-US
Column Name

Format

Required?

Description

CommodityCode

varchar2
(100) (See
Description)

The commodity code in ONESOURCE Indirect Tax


Determination. It is related to a product in
ONESOURCE Indirect Tax Determination product
tree.

ProductCode

varchar2
(100) (See
Description)

The source code passed in from your ERP system.

CustomProduct

varchar2
(100) (See
Description)

Indicates whether the Product Mapping data applies


to a Custom Product (Y) or a Tax Data Provider
Product (N).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

62

Importing and Exporting Determination Data


Using the Import/Export Interface

Example Commodity Mappings File


Commodity mappings can be created for both US and INTL commodities. The first line of the
CSV file tells which type. For example, this file example maps three US commodity codes to
three product codes and indicates if it is a custom code:
sdiType=CommodityMappings-US
CommodityCode,ProductCode,CustomProduct
4011724.11,Q45J,N
700000,T567,N
AgProd,FRM-23,Y
You cannot use CSV files to update existing commodity code mappings.

Company CSV Format


Use the Companies CSV format to upload new companies into ONESOURCE Indirect Tax
Determination. Use the following guidelines when creating a Companies import file:
l

The Company CSV can only be used to insert new companies, not to update existing
company records in ONESOURCE Indirect Tax Determination.
If you are adding a new company that has a parent, the parent company must already exist
in ONESOURCE Indirect Tax Determination.
If the company you are adding does not have a parent, then insert Top Level Company in
the ParentCompany field.
Do not insert values for the Provider, Owner, and Group columns if they refer to the
company that you are inserting. For example, if you are importing the Acme company, and
the Acme company will be the TransEditor Group Owner, then leave that owner field
blank and the import process will supply this value for you. However, if your company is a
child, and you are referring to a parent company for a particular Provider, Owner, or Group,
then you must insert the value in the CSV.
If you attempt to create a new Parent company using CSVimport, avoid including default
US Exempt Reason and default INTL Exempt Reasons.The exempt reason elements are
successful only if the following apply:
l
l
l
l

The new company being created is a Child of a Parent company that already exists.
The Parent company already has at least one exempt reason.
The default settings for both US and INTL Exempt Reasons have been established.
The Exempt Certificate Customer Group Owner for the Child company is the Parent
company.

For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

63

Using the Import/Export Interface

Company File Format


SDITYPE=Companies
Column Name

Format

Required?

Description

ParentCompany

varchar2
(100)

Name of parent company.

CompanyName

varchar2
(100)

Name of company

Active

varchar2
(1)

Flag to indicate if the


company is active. Valid
values are Y and N.

Type

varchar2
(1)

Indicates whether
company is internal or
external. Valid values are I
and E.

ShortName

varchar2
(10)

Company Short Name

LegalEntityName

varchar2
(200)

Legal Entity Name

ExternalId

varchar2
(200)

The name by which the


company is referred to in
the calling business
applications.

HomeMenuUrl

varchar2
(200)

Home Page URL

UsesB2b

varchar2
(1)

Flag to indicate if company


uses B2B. Valid values are
Y and N.

B2bAutoCreateCompanies

varchar2
(1)

Indicates if B2B companies


should be automatically
created. Valid values are Y
and N.

B2bAutoCreatedCompanyParent

varchar2
(100)

Parent of B2B Auto


Created Company

B2bUseParentCompanyPreferences

varchar2
(1)

Indicates if B2B parent


company preferences
should be used. Valid
values are Y and N.

If this is a top-level
company and does not
have a parent, enter Top
Level Company (This is
case-sensitive).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

64

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=Companies
Column Name

Format

Required?

Description

UsesExemptionCerts

varchar2
(1)

Indicates if company uses


exemption certificates.
Valid values are Y and N.

EcAutoCreateExemptionCerts

varchar2
(1)

Indicates if exemption
certificates should be
automatically created.
Valid values are Y and N.

EcAutoCreateCustomers

varchar2
(1)

Indicates if customers
should be automatically
created. Valid values are Y
and N.

EcExemptTemporaryCertificateTransactions

varchar2
(1)

Indicates if temporary
certificates are applied to
the affected invoice's tax
calculations. Valid values
are Y and N.

EcActiveExemptCertCustomerGroupOwner

varchar2
(100)

Active Exemption
Certificate Customer
Group Owner

EcActiveExemptCertCustomerGroup

varchar2
(100)

Active Exemption
Certificate Customer
Group

EcDefaultExemptionCertificateStatus

varchar2
(1)

Default Exemption
Certificate Status. Valid
values are A, I, T, or U:
l
l
l
l

A (Approved)
I (In Review)
T (Temporary)
U (Unapproved)

EcDefaultDaysValid

NUMBER

Default number of days an


exemption certificate is
valid.

EcDefaultUsExemptReason

varchar2
(2)

This is the exemption


reason Short Code

EcDefaultIntlExemptReason

varchar2
(2)

This is the exemption


reason Short Code

ProductMappingGroupOwner

varchar2
(100)

Product Mapping Group


Owner

ProductMappingGroup

varchar2
(100)

Product Mapping Group

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

65

Using the Import/Export Interface

SDITYPE=Companies
Column Name

Format

Required?

Description

RegistrationGroupOwner

varchar2
(100)

Registration Group Owner

RegistrationGroup

varchar2
(100)

Registration Group

UsProductGroup

varchar2
(100)

US Product Group

IntlProductGroup

varchar2
(100)

International Product Group

UsTaxDataProvider

varchar2
(100)

US Tax Data Provider

UsCustomDataProvider

varchar2
(100)

US Custom Data Provider

UsEstablishedAuthorityDataProvider

varchar2
(100)

US Established Authority
Data Provider

UsCurrencyExchangeProvider

varchar2
(100)

US Currency Exchange
Provider

IntlTaxDataProvider

varchar2
(100)

International Tax Data


Provider

IntlCustomDataProvider

varchar2
(100)

International Custom Data


Provider

IntlEstablishedAuthorityDataProvider

varchar2
(100)

International Established
Authority Data Provider

IntlCurrencyExchangeProvider

varchar2
(100)

International Currency
Exchange Provider

MessageThresholdPreference

NUMBER

Message threshold
preference. Valid values
are 0, 1, and 2:
l
l
l

0 (Informational)
1 (Warning)
2 (Severe)

XmlOutputGroupOwner

varchar2
(100)

XML Output Group Owner

XmlOutputGroup

varchar2
(100)

XML Output Group

TransEditorGroupOwner

varchar2
(100)

TransEditor Group Owner

TransEditorGroup

varchar2
(100)

TransEditor Group

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

66

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=Companies
Column Name

Format

Required?

Description

AllocationGroupOwner

varchar2
(100)

Allocation Group Owner

AllocationGroup

varchar2
(100)

Allocation Group

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

67

Using the Import/Export Interface

Company CSV File Example


This example specifies one company with its parent.
sdiType=Company
ParentCompany,CompanyName,Active,Type,ShortName,LegalEntityName
MainCo,Acme,Y,I,Acme,Acme

Note that the format of a CSV file is case-specific. For more information about formatting a CSV
file, see Creating CSV Import Files (page 55).
Import/Export Wizard Steps
The following screens appear as you import your company CSV:
l

Import File Information: Click Next if this is your desired file.

Confirm Import: Click Next to begin the import.

Customer CSV Format


You must import customers before you import certificates owned by those customers. Before
importing customers, configure the desired customer groups on the target system.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Since CSV uploads for Exemption Certificates, Exemption Certificate Zones,
and Customers share many columns, you can reduce errors by copying
columns that are common to each of these imports.
Customer File Format
SDITYPE=Customer
Column Name

Format

Required?

Description

CustomerName

varchar2
(100)

Customer name.

CustomerNumber

varchar2
(100)

Customer number.

CustomerComment

varchar2
(2000)

Optional comment.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

68

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=Customer
Column Name

Format

Required?

Description

DbaName

varchar2
(100)

Doing Business As name.

Address1

varchar2
(60)

First address line.

Address2

varchar2
(60)

Second address line.

Address3

varchar2
(60)

Third address line.

Address4

varchar2
(60)

Fourth address line. (Stored in the database but not


displayed on the Customer page in Determination.)

Country

varchar2
(2)

A two-letter, capitalized country code (such as CA).


Leave blank for US (default).

Province

varchar2
(50)

Province.

State

varchar2
(50)

State.

County

varchar2
(50)

County.

City

varchar2
(60)

City.

District

varchar2
(50)

District.

PostCode

varchar2
(50)

ZIP or Postal Code.

BusinessPhone

varchar2
(20)

Business telephone number.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

69

Using the Import/Export Interface

SDITYPE=Customer
Column Name

Format

Required?

Description

ContactName

varchar2
(60)

Contact name.

ContactEmail

varchar2
(60)

Contact E-mail address.

ContactPhone

varchar2
(20)

Contact telephone number.

ContactTitle

varchar2
(100)

Contact job title.

ContactDepartment

varchar2
(100)

Contact department.

ContactFax

varchar2
(20)

Contact FAX number.

FullyExempt

varchar2
(1)

Valid values are Y or N. Defaults to N. Indicates


whether or not the customer is fully exempt from tax.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

70

Importing and Exporting Determination Data


Using the Import/Export Interface

Customer File Example


This file includes two customers.
sdiType=Customers
CustomerName,CustomerNumber,Country,CustomerComment,ContactFax,DbaName
Aurora Forest Products,589247,US,Update,5415554704,Aurora DBA
Sequoia Office Services,649823,US,New Customer,541555266,Sequoia DBA

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Customer
You can update a customer record by including data in the CustomerName and
CustomerNumber columns to match a customer; then modifying additional columns as needed.
Customer File Import Prerequisites
You need to create any desired target companies and customer groups before importing
customers with the Import/Export Wizard.
Customer File Import Options
When importing a customer file, the Import/Export Wizard prompts for:
l
l

Company Selection. Select the desired company.


Customer Group Selection. Select the desired customer group belonging to the
company you selected above.

Customer License CSV Format


Customer licenses are used when ONESOURCE Indirect Tax Determination company
processes a sales transaction in which the buyer maintains an applicable license. Each
Customer Licenses CSV file contains licenses associated with customers in a single customer
group for a single company.
You must import license types before you import licenses that reference the license types.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Customer License File Format
SDITYPE=CustomerLicense
Column Name

Format

Required?

Description

LicenseTypeName

varchar2
(100)

The name of the license type to which this


license is associated. If blank, an error is
reported.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

71

Using the Import/Export Interface

SDITYPE=CustomerLicense
Column Name

Format

Required?

Description

LicenseTypeStartDate

mm/dd/yyy- Y
y

The start date for the license type. Must be the


exact date as the start of the license type. If
blank, an error is reported.

CustomerName

varchar2
(100)

The name of the customer owning the license.


If blank, an error is reported.

CustomerNumber

varchar2
(100)

The customer number associated with the


customer name. If blank, an error is reported.

StartDate

date

The start date for the license. If blank, an error


is reported.

EndDate

date

The end date for the license.

LicenseNumber

varchar2
(100)

A license number associated with this license.

LicenseURL

varchar2
(1000)

A URL where an image of this license may be


viewed.

TemporaryLicenseFlag

varchar2(1)

Indicates whether this license is (Y) or is not


(N) a temporary license.

ExternalId

varchar2
(100)

An external identifier used to uniquely identify


this license in your ERP system.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

72

Importing and Exporting Determination Data


Using the Import/Export Interface

Customer License File Example


This file includes two licenses. Note that the second line wraps so that the entire text is visible. In
use, the text is on one line.

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Customer License
You can update a customer license by including data in the LicenseTypeName,
LicenseTypeStartDate, CustomerName, CustomerNumber, StartDate, and LicenseNumber
columns to match a license and then modifying additional columns as needed.
Customer Licenses File Import Prerequisites
You must create the desired company into which you want to import licenses, as well as the
associated license types, customer groups, and customers, before running the Import/Export
Wizard.
Customer Licenses File Import Options
When importing a customer license file, the Wizard prompts for:
l

Company Selection. Select the desired company.

Customer Group Selection. Select the desired customer group.

Date Determination Logic CSV Format


Each Date Determination Logic CSV file contains one or more logic expressions.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Date Determination Logic File Format
SDITYPE=DateDeterminationLogic
Column Name

Format

Required?

Description

Name

varchar2(100)

A name for the logic expression.

Description

varchar2(2000)

A description of the logic expression.

DateExpression

varchar2(2000)

The actual date expression.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

73

Using the Import/Export Interface

Date Determination Logic File Example


This file includes a single date determination logic record.
sdiType=DateDeterminationLogic
Name,Description,DateExpression
Earlier of Invoice or Movement,Use Whichever is earlier: Invoice Date or
Movement Date,isNull(movementDate) ? invoiceDate : invoiceDate.before
(movementDate) ? invoiceDate : movementDate

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Date Determination Logic Expression
You can update an existing date determination logic expression by including matching data in
the Name column, then entering a new Description and/or Date Expression.
Date Determination Logic File Import Prerequisites
You must create the desired company into which you want to import the Date Determination
Logic records before running the Import/Export Wizard.
Date Determination Logic File Import Options
When importing a Date Determination Logic file, the Import/Export Wizard prompts for
Company Selection. Select the desired company.

Date Determination Rule CSV Format


Each Date Determination Rules CSV file contains rules owned by a single Determination
company for either US or International Tax Data Types.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Date Determination Rule File Format
Note: You cannot currently add a Date Determination Rule that applies to an Authority Type instead of
an Authority. You must configure this type of rule in Determination.

SDITYPE=DateDeterminationRule-US, DateDeterminationRule-INTL
Column Name

Format

Required?

Description

RuleOrder

number

The rule order for this date


determination rule.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

74

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=DateDeterminationRule-US, DateDeterminationRule-INTL
Column Name

Format

Required?

Description

DateType

varchar2
(50)

One of the following date types:


l
l
l

AuthorityName

varchar2
(100)

TDD - Tax Determination Date


TERD - Tax Exchange Rate Date
TPD - Tax Point Date

The authority that will use this date


determination rule.
Note: Either Authority Name or
Authority Type is required, but not both.

AuthorityType

varchar2
(100)

The authority type that will use this date


determination rule.
Note: Either Authority Name or
Authority Type is required, but not both.

CustomAuthority

varchar2(1)

Indicates whether the AuthorityName


on this row is (Y) or is not (N) a custom
authority.

ProductPath

varchar2
(100)

The full path of a product category to


limit rule application in dot notation
(parent.child.grandchild.etc). You must
specify the highest level first, then each
level in succession. See the example
below for details. Note that the length of
100 refers to an individual level of the
path, not the entire path length.

(See
Description)

CustomProduct

varchar2(1)

Indicates whether the Product Category


listed above applies to a Custom
Product (Y) or a Tax Data Provider
Product (N).

DateDeterminationLogicName

varchar2
(100)

A configured Date Determination Logic


expression.

DocumentType

varchar2
(50)

An optional document type to which rule


application is limited.

MovementType

varchar2
(100)

An optional movement type to which


rule application is limited.

StartDate

mm/dd/yyy- Y
y

A start date for this date determination


rule.

EndDate

mm/dd/yyy- N
y

An end date for this date determination


rule.

CustomerName

varchar2
(100)

An optional customer name to which to


limit rule application.

CustomerNumber

varchar2
(100)

An optional customer number to which


to limit rule application.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

75

Using the Import/Export Interface

Date Determination Rules File Example


This file includes two date determination rules.

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Date Determination Rule
You can update an existing date determination rule by submitting RuleOrder, DateType,
AuthorityName, CustomAuthority, and DateDeterminationLogicName columns which match a
rule, then modifying the other columns as desired.
Date Determination Rules File Import Prerequisites
You must create the desired company into which you want to import date determination rules,
as well as any associated date determination logic records, authorities, products, and
customers, before running the Import/Export Wizard.
Date Determination Rules File Import Options
When importing a date determination rules file, the Import/Export Wizard prompts for
Company Selection. Select the desired company.

Established Zones CSV Format


Established zones indicate the locations where your company has a business presence; your
company may be established in an authority, registered with an authority, or a combination.
This CSV import file specifies US or INTL establishments. Establishment records can only
reference zones already in ONESOURCE Indirect Tax Determination Zone Tree.
You can create multiple records for the same international zone so long as they have different
effective dates. Run the Established Zones utility report to view the established settings.
Due to the nature of this CSV import, we recommend that you contact
Customer Support for assistance creating this upload.

For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

76

Importing and Exporting Determination Data


Using the Import/Export Interface

US and Non-US Established Zones Files


The sdiType value changes depending on whether the file contains US establishments or INTL
establishments.
l

Use sdiType=ZoneEstablishments-US for US zones.

Use sdiType=ZoneEstablishments-INTL for non-US zones.

In both cases, the file format is the same; only the sdiType is different (either EstablishmentsUS or Establishments-INTL).
Established Zones Format
SDITYPE=ZoneEstablishments-US or ZoneEstablishments-INTL
Column Name

Format

Required?

Description

StateName or
ZoneName

varchar2
(50)

Use the full name of the state or the full name


of the country, depending on whether you are
creating a US or INTL file.

Established

varchar2
(50)

Y if Established (All); N if Not Established


(None).

EstablishmentStartDate

mm/dd/yyyy

The date the company was established in the


state.
If there is an existing record with the same
start date, the record will be overwritten.

EstablishmentEndDate

mm/dd/yyyy

The date the company ended establishment in


the state. Leave blank if established currently.
If used, the date must be equal to or later than
the establishment start date.

Example Established Zones File


This example file creates an established zone for the state of Montana and includes a start and
end date.
sdiType=ZoneEstablishments-US
StateName,Established,EstablishmentStartDate,
EstablishmentEndDate
Montana,Y,01/01/2000,08/31/2007
The next example file creates an established zone for Belgium and shows an open-ended
establishment (no end date).
sdiType=ZoneEstablishments-INTL
ZoneName,Established,EstablishmentStartDate,
EstablishmentEndDate
EU.Belgium,Y,01/01/2001,

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

77

Using the Import/Export Interface

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Established Zones Import Prerequisites
A company to which you want to import this data must already exist.
Established Zones Import Options
When you import establishment data, the Import/Export Wizard prompts for Company
Selection. Select the desired company to link to the established zone.

Exchange Rate CSV Format


Each Exchange Rates CSV file contains rates associated with a single exchange rate source.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Exchange Rate File Format
SDITYPE=ExchangeRate
Column Name

Format

Required?

Description

FromCurrencyCode

number

The "from" currency for this conversion rate.

ToCurrencyCode

number

The "to" currency for this conversion rate.

StartDate

mm/dd/yyy- Y
y

The start date for the conversion rate.

EndDate

mm/dd/yyy- Y
y

The end date for the conversion rate.

Rate

number

The rate of conversion from the "from" currency to


the "to" currency.

Exchange Rate File Example


This file includes two exchange rates.
sdiType=ExchangeRate
FromCurrencyCode,ToCurrencyCode,StartDate,EndDate,Rate
USD,CAD,10/04/2006,11/04/2006,1.1263
CAD,USD,10/04/2006,11/04/2006,0.8879

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Exchange Rate
You can update an existing exchange rate by including matching data in all columns except
Rate, then entering a new rate in that column.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

78

Importing and Exporting Determination Data


Using the Import/Export Interface

Exchange Rates File Import Prerequisites


You must create the desired company into which you want to import exchange rates, as well as
the associated exchange rate source, before running the Import.Export Wizard.
Exchange Rates File Import Options
When importing an exchange rate file, the Import/Export Wizard prompts for:
l

Company Selection. Select the desired company.

Exchange Rate Source Selection. Select the desired exchange rate source.

Exemption Certificates CSV Format


Before you import exemption certificates, you must import customers, products, and exempt
reasons referenced by the exemption certificate. Customers and Products can be loaded using
the Import/Export Wizard or created within ONESOURCE Indirect Tax Determination; Exempt
Reasons must be configured within ONESOURCE Indirect Tax Determination.
Once you load certificates, you need to also load (or configure) Exemption Certificate Zone data
that indicates in which zones the certificate can apply.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Since CSV uploads for Exemption Certificates, Exemption Certificate Zones,
and Customers share many columns, you can reduce errors by copying
columns that are common to each of these imports.
Exemption Certificates File Format
SDITYPE=ExemptionCertificates
Column Name

Format

Required?

Description

CertificateNumber

varchar2
(100)

Certificate number.

CustomerName

varchar2
(100)

Customer name. Must map to an existing


customer.

CustomerNumber

varchar2
(100)

Customer number. Must map to an existing


customer.

Status

varchar2
(100)

Certificate Status. Valid values are:


l
l
l
l

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

A (Approved)
I (In Review)
T (Temporary)
U (Unapproved)

Importing and Exporting Determination Data

79

Using the Import/Export Interface

SDITYPE=ExemptionCertificates
Column Name

Format

Required?

Description

ExemptReasonCode

varchar2(2)

The exempt reason short code for the


certificate. Must map to an existing exempt
reason.
Always include the ExemptReasonCode
header, even if you do not include a value.

ValidFromDate

mm/dd/yyyy

The first date on which the certificate is


valid.

ExpiresDate

mm/dd/yyy- N
y

An optional expiration date.

Active

varchar2(1)

Indicates whether or not the certificate may


be applied to transactions. Valid values are
Y or N.

FullyExempt

varchar2(1)

Indicates whether or not the certificate


results in full exemption from tax. Valid
values are Y or N.

TaxDataType

varchar2
(50)

The Tax Data Type. Valid values are:


l
l

US
INTL

CertificateImagePath

varchar2
(1000)

A fully-qualified filename for an image of the


physical certificate.

ExemptAmount

NUMBER

The amount to exempt for a transaction to


which this certificate applies.
If you specify an amount, the currency must
match the currency used on a document.

CurrencyCode

varchar2
(50)

Y*

A valid Currency Code. See ONESOURCE


Indirect Tax Determination's Currencies
page for a list of valid codes.
(*) Required if ExemptAmount is included.

BasisPercent

NUMBER

A Basis Percentage to apply to the


transaction. A real number between 0 and 1.
For example, .5 indicates a 50% basis
percentage.

CustomerTaxId

varchar2
(100)

Optional information about the customer, not


used in calculations.

CustomerLicenseNumber

varchar2
(50)

CustomerBusinessType

varchar2
(100)

CustomerComments

varchar2
(2000)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

80

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=ExemptionCertificates
Column Name

Format

Required?

Description

SellerName

varchar2
(100)

Optional information about the seller, not


used in calculation.

SellerNumber

varchar2
(100)

SellerDbaName

varchar2
(100)

SellerTaxId

varchar2
(100)

SellerLicenseNumber

varchar2
(100)

ProductCode

varchar2
(100)

A string (full, or partial with wildcards) that


matches the Input XML element
<INVOICE>.<LINE>.<PRODUCT_
CODE> passed in with a transaction. If a
Product Code is specified, only transactions
containing that product can potentially have
the certificate applied.

Exemption Certificate File Example


This example specifies two certificates. Each is associated with a different customer.
Even if the certificate does not specify an exempt reason, you must still include
the ExemptReasonCode header.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

81

Using the Import/Export Interface

In this case, there is no ExemptReasonCode, so you include the header but leave the value
blank. Note that the second line wraps so that all of the text is visible. In your file, all text for each
row should be on one line.
sdiType=ExemptionCertificates
CertificateNumber,CustomerName,CustomerNumber,Status,ExemptReasonCode,
TaxDataType,ValidFromDate,Active,FullyExempt
199A,Aurora Forest Products,589247,A,,US,03/05/2007,Y,Y
28945,Sequoia Office Services,649823,I,,US,03/04/2007,Y,Y

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Exemption Certificate
You can update an exemption certificate record by including data in the CertificateNumber,
CustomerName, CustomerNumber, ExemptReasonCode, and ValidFromDate columns to
match a certificate and then modifying additional columns as needed.
Note: To perform an update, make sure your CSV file contains values for all the exemption
certificate fields that are populated in Determination; otherwise, the existing data will be
removed. Also, if you are updating an existing certificate, you must include the
ExemptReasonCode header in your CSV file. If you are not using exempt reason codes, simply
include the header ExemptReasonCode and leave its value blank.
Exemption Certificate File Import Prerequisites
Before you import exemption certificates using the CSV import file, you must define the
following:
l

Target company

Customer

Customer group

Zones

Authority type

Authority

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

82

Importing and Exporting Determination Data


Using the Import/Export Interface

Exemption Certificate File Import Options


When importing exemption certificates, the Import/Export Wizard prompts for:
l
l

Company Selection. Select the desired company.


Customer Group Selection. Select the desired customer group belonging to the
company you selected above.

All certificates are imported as blanket use. If you want to create a limited or single-use
certificate, import the certificate, then use ONESOURCE Indirect Tax Determination to add
limited use criteria.

Exemption Certificate Zones CSV Format


This type of import enables you to specify the zones to which your exemption certificates apply.
The Exemption Certificate Zones import file applies only to any existing certificates: those you
created in ONESOURCE Indirect Tax Determination, or those you uploaded with the
Import/Export Wizard. Once you import this data, you can then add authority-level data (if
desired) within ONESOURCE Indirect Tax Determination.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Since CSV uploads for Exemption Certificates, Exemption Certificate Zones,
and Customers share many columns, you can reduce errors by copying
columns that are common to each of these imports.
US and Non-US Exemption Certificate Zones Files
The sdiType value changes depending on whether the file contains US zones or Non-US
zones.
l

For US zones, use sdiType=ExemptionCertificateZones-US.

For non-US zones, use sdiType=ExemptionCertificateZones-INTL.

In both cases, the file format is the same; only the valid values in the ZoneName column are
different.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

83

Using the Import/Export Interface

Exemption Certificate Zones File Format


SDITYPE=ExemptionCertificateZones-US and ExemptionCertificateZones-INTL
Column Name

Format

Required?

Description

ZoneName

varchar2
(100)

A Zone to which the certificate applies.


l

For US imports, a full state name (not an


abbreviation).
For non-US imports, a Country. EU
countries must be prefaced with EU.; for
example, EU.FRANCE.

Multiple zones can be specified by submitting


multiple lines in the input file. See the example
below for more information.
If blank, causes an error.
Exempt

varchar2(1)

The full exempt status in this zone. Overrides the


setting for the certificate in this zone only. Valid
values are Y and N.
If blank, defaults to None.

CustomerName

varchar2
(100)

Customer Name. Must map to an existing


customer. If blank, causes an error.

CustomerNumber

varchar2
(100)

Customer Number. Must map to an existing


customer. If blank, causes an error.

ExemptReasonCode

varchar2(2)

If present on the specified certificate, the exempt


reason short code. Must map to an existing
exempt reason.
Always include the ExemptReasonCode header,
even if you do not include a value.

CertificateNumber

varchar2
(100)

ValidFromDate

mm/dd/yyy- Y
y

Certificate Number. Must map to an existing


certificate. If blank, causes an error.
The first date on which the certificate is valid. If
blank, causes an error.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

84

Importing and Exporting Determination Data


Using the Import/Export Interface

Exemption Certificate Zones File Example


The following example adds zone data to a single certificate in three zones.
Even if the certificate does not specify an exempt reason, you must still include
the ExemptReasonCode header.

You would leave the value blank, as shown in the following lines.

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Exemption Certificate Zone Record
You can update an exemption certificate zone record by including data to match an existing
record in all columns except Exempt. In other words, the only value that can be updated for a
particular record is the Exempt value.
Exemption Certificate Zones Import Prerequisites
In order, you must create in advance: authority types, and authorities.
You also need to create any desired target companies, customer groups, customers,
certificates, and exempt reasons before importing exemption certificates with the Import/Export
Wizard.
Exemption Certificate Zones Import Options
When importing exemption certificate zone data, the Import/Export Wizard prompts for:
l
l

Company Selection. Select the desired company.


Customer Group Selection. Select the desired customer group belonging to the
company you selected above.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

85

Using the Import/Export Interface

Limited Use Exemption Certificates CSV Format


Any customers, products, and exempt reasons referenced by the exemption certificates you
load here must already exist in ONESOURCE Indirect Tax Determination before you perform
the import. Customers and Products can be loaded using the Import/Export Wizard or created
within ONESOURCE Indirect Tax Determination; Exempt Reasons must be configured within
ONESOURCE Indirect Tax Determination.
Once you load certificates, you need to also load (or configure) Exemption Certificate Zone data
that indicates in which zones the certificate can apply.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Limited Use Exemption Certificate File Format
SDITYPE=ExemptionCertificatesLimitedUse
Column Name

Format

Required?

Description

CertificateNumber

varchar2
(100)

Certificate number.

CustomerName

varchar2
(100)

Customer name. Must map to an existing


customer.

CustomerNumber

varchar2
(100)

Customer number. Must map to an


existing customer.

Status

varchar2
(100)

Certificate Status. Valid values are:


l
l
l
l

ExemptReasonCode

varchar2(2)

A (Approved)
I (In Review)
T (Temporary)
U (Unapproved)

The exempt reason short code for the


certificate. Must map to an existing
exempt reason.
Always include the ExemptReasonCode
header, even if you do not include a value.

ValidFromDate

mm/dd/yyyy

The first date on which the certificate is


valid.

ExpiresDate

mm/dd/yyy- N
y

An optional expiration date.

Active

varchar2(1)

Indicates whether or not the certificate


may be applied to transactions. Valid
values are Y or N.

FullyExempt

varchar2(1)

Indicates whether or not the certificate


results in full exemption from tax. Valid
values are Y or N.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

86

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=ExemptionCertificatesLimitedUse
Column Name

Format

Required?

Description

TaxDataType

varchar2
(50)

The Tax Data Type. Valid values are:


l
l

US
INTL

CertificateImagePath

varchar2
(1000)

A fully-qualified filename for an image of


the physical certificate.

ExemptAmount

NUMBER

The amount to exempt for a transaction to


which this certificate applies.
If you specify an amount, the currency
must match the currency used on a
document.

CurrencyCode

varchar2
(50)

Y*

BasisPercent

NUMBER

A Basis Percentage to apply to the


transaction. A real number between 0 and
1. For example, .5 indicates a 50% basis
percentage.

CustomerTaxId

varchar2
(100)

Optional information about the customer,


not used in calculations.

CustomerLicenseNumber

varchar2
(50)

CustomerBusinessType

varchar2
(100)

CustomerComments

varchar2
(2000)

SellerName

varchar2
(100)

SellerNumber

varchar2
(100)

SellerDbaName

varchar2
(100)

SellerTaxId

varchar2
(100)

SellerLicenseNumber

varchar2
(100)

(*) Required if ExemptAmount is included.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

A valid Currency Code such as USD.

Optional information about the seller, not


used in calculation.

Importing and Exporting Determination Data

87

Using the Import/Export Interface

SDITYPE=ExemptionCertificatesLimitedUse
Column Name

Format

Required?

Description

ProductCode

varchar2
(100)

A string (full, or partial with wildcards) that


matches the Input XML element
<INVOICE>.<LINE>.<PRODUCT_
CODE> passed in with a transaction. If a
Product Code is specified, only
transactions containing that product can
potentially have the certificate applied.

XmlElement

varchar2
(100)

This is the XML Element on the


Certificate Use tab. Can be one or more
Custom Attribute elements used to match
this certificate to invoice or line-level
transaction data.
Use the Determination Attribute
designation, not the Custom Attribute
value. For example: If Attribute 1 is
PlantID, the CSV file should use
INVOICE.USER_
ELEMENT.ATTRIBUTE1, not PlantID.

Value

varchar2
(200)

This corresponds to the Value Pattern


column on the Certificate Use tab. The
value of the attribute, for example an
invoice number.
You can enter either:
l

An exact string to match. Bracket


the data you want to match with the
^ and $regular expressions. For
example, to match invoice 1001,
enter ^1001$.
A string that contains no regular
expressions or wildcards. In this
case, the string includes an implied
% wildcard both at the beginning
and end of the string. For example,
entering the string 1234 would
match 1234, 11234, 12345, and
1123456, but would not match
11223344.
A pattern using the following
wildcards in conjunction with the
regular expressions shown above:
% (percent) to match any number of
characters, or _ (underline) to
match any one character. For
example, entering the string
%1234_$would match 12345,
12346, 112345, and 112346, but
would not match 1123456.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

88

Importing and Exporting Determination Data


Using the Import/Export Interface

Limited Use Exemption Certificate File Example


This example specifies two certificates. Each is associated with a different customer.
Even if the certificate does not specify an exempt reason, you must still include
the ExemptReasonCode header. You would leave the value blank in the
following lines.
In the example below, note that the second line wraps so that all of the text is visible. In use, all
text is on one line.

If you want to import more than one Value for an individual certificate, then you must create
additional lines in the same file. These lines will be identical except for the Value field. For
example, if you wanted to add an additional value to certificate 199A, you would add a second
line in the file:
199A,Aurora Forest Products,589247,A,US,03/05/2007,INVOICE.USER_
ELEMENT.ATTRIBUTE2,service

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating an Existing Exemption Certificate
You can update an exemption certificate record by including data in the CertificateNumber,
CustomerName, CustomerNumber, ExemptReasonCode, and ValidFromDate columns to
match a certificate; then modifying additional columns as needed.
Note: To perform an update, make sure your CSV file contains values for all the exemption
certificate fields that are populated in Determination; otherwise, the existing data will be
removed. Also, if you are updating an existing certificate, you must include the
ExemptReasonCode header in your CSV file. If you are not using exempt reason codes, simply
include the header ExemptReasonCode and leave its value blank.
Exemption Certificate File Import Prerequisites
You need to create any desired target companies, customer groups, customers, and exempt
reasons before importing exemption certificates with the Import/Export Wizard.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

89

Using the Import/Export Interface

Exemption Certificate File Import Options


When importing exemption certificates, the Import/Export Wizard prompts for:
l
l

Company Selection. Select the desired company.


Customer Group Selection. Select the desired customer group belonging to the
company you selected above.

License Type CSV Format


You must import license types before you import any licenses which reference those license
types.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
License Type File Format
SDITYPE=LicenseType
Column Name

Format

Required?

Description

LicenseTypeName

varchar2
(100)

The name of the license type.

DefaultTerm

number

The default term for any license not


specifying an end date.

TemporaryDaysValid

number

If temporary licenses are enabled, the


default term for any license not
specifying a validity period.

LicenseMask

varchar2
(100)

The license mask to which licenses


using this license type must conform.

Description

varchar2
(200)

An optional description for the license


type.

EndDateRequiredFlag

varchar2(1)

Indicates whether an associated license


must include an end date (Y) or does not
need to include an end date (N).

LicenseNumberRequiredFlag varchar2(1)

Indicates whether an associated license


does (Y) or does not (N) need to include
a license number.

PhysicalLicenseRequiredFlag

varchar2(1)

Indicates whether a physical copy of a


license must be provided (Y) or does not
need to be provided (N).

StartDate

mm/dd/yyy- Y
y

The start date for the license type.

EndDate

mm/dd/yyy- N
y

The end date for the license type.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

90

Importing and Exporting Determination Data


Using the Import/Export Interface

License Types File Example


This file includes two license types.

Updating an Existing License Type


You can update a license type by including data in the LicenseTypeName and StartDate
columns to match a license type and then modifying additional columns as needed.
License Types File Import Prerequisites
There are no pre-requisites before importing license types with the Import/Export Wizard.
License Types File Import Options
When importing a license type file, the Import/Export Wizard prompts for Company Selection.
Select the desired company.

Material Set CSV Format


Use this file format to import Material Sets, Material Lists, Material List Products, and Authorityto-Material Set associations.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Material Set File Format
SDITYPE=MaterialSet-INTL and MaterialSet-US
Column Name

Format

Required?

Description

MaterialSetName

varchar2
(100)

The name of the material set. If


blank, causes an error.

MaterialSetListDescription

varchar2
(200)

An optional description for the


material set.

MaterialSetListName

varchar2
(100)

Creates a material set and assigns it


to the authority. If blank, causes an
error.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

91

Using the Import/Export Interface

SDITYPE=MaterialSet-INTL and MaterialSet-US


Column Name

Format

Required?

Description

MaterialSetListStartDate

date

The start date for material list


membership in the material set. If
blank, causes an error.

MaterialSetListEndDate

date

The end date for material list


membership in the material set.

AuthorityName

varchar2
(100)

An authority to which to associate


this material set. If not provided, no
authority is assigned.

CustomAuthority

varchar2(1)

Indicates whether the related


AuthorityName is (Y) or is not (N) a
custom authority. If blank, causes an
error.
This field is required even if you are
not including an AuthorityName.

AuthorityMaterialSetStartDate

date

The start date for the relationship of


this material set to the specified
authority.

AuthorityMaterialSetEndDate

date

The end date for the relationship of


this material set to the specified
authority.

ProductPath

varchar2
(100)

The full path of an existing product


exception in dot notation
(parent.child.childs-child). Note that
the length of 100 refers to an
individual level of the path, not the
entire path length. If blank, causes an
error.

CustomProduct

varchar2(1)

Indicates whether the related


ProductPath is (Y) or is not (N) a
custom product. If blank, causes an
error.

MaterialSetListProductStartDate

mm/dd/yyy- Y
y

The start date for the inclusion of this


product in the specified material list.
If blank, causes an error.

MaterialSetListProductEndDate

mm/dd/yyy- N
y

The end date for the inclusion of this


product in the specified material list.

Materials File Examples


In this example, the second line wraps so that all of the text is visible. In use, all text would be on
one line.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

92

Importing and Exporting Determination Data


Using the Import/Export Interface

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating Existing Data
You can update a material set record by including data in the MaterialSetName and
MaterialSetListName columns to match a Material Set and then modifying additional columns
as needed.
Materials File Import Prerequisites
You need to create any desired target companies, authorities, and products before importing
material sets with the Import/Export Wizard.
Materials File Import Options
When importing a materials file, the Import/Export Wizard prompts for Company Selection.
Select the desired company. A second prompt asks for the desired Product Group. Specify
the desired group.

Product Categories CSV Format


Custom product exceptions can be imported into ONESOURCE Indirect Tax Determination
using the Product Categories import file type. Once you import products, you can import product
mappings (to map your source codes to those products) and product zone data (to specify
where the product exceptions apply). You can only set product zones for custom products.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

93

Using the Import/Export Interface

When you import a product categories file, all records in the file are imported into a single
Product Group (such as US or INTL) and placed beneath the parent product category you
specify. Therefore, do not mix products belonging to different product groups and with different
parents in the same file. Instead, create multiple import files. For example:
l

You want to add the same set of products to the US, Canada, and Independent product
groups. In each case, the parent product category is the same. Create a single import file
and import it three times, once for each Product Group.
You want to add a set of products to the US and Canada product groups, and a similar
set to the Independent product group. The parent product category is the same. Create
two import files, one for the US and Canada and one for Independent. Import the files as
appropriate for each Product Group.
You want to add the same set of products to all Product Groups, but in each Product
Group the parent product category differs. Create a single import file, then specify a
different parent product category when you import it for each Product Group.
You want to add different products to each Product Group, and within each group the
parent product category is different. Create multiple import files, one for each unique
Product Group/Parent Product Category combination.

For information about using CSV format files, see Best Practices for Importing Data with
CSV Files (page 58).
Product Categories File Format
SDITYPE=ProductCategories
Column Name

Format

Required?

Description

ProductPath

varchar2
(100)

The full path of the product category in dot notation


(parent.child.grandchild.etc). You must specify the
highest level first, then each level in succession. See
the example below for details. Note that the length of
100 refers to an individual level of the path, not the
entire path length.

(See
Description)
Description

varchar2
(250)

A description of the product category.

CommodityCode

varchar2
(50)

A commodity code associated with the product


category. Commodity codes must be unique within
each product group and company; if they are not, the
import of any duplicate record will fail.

The ProductPath delimiter is a dot (.) by default. This delimiter can be changed to another
supported character by setting the SDI_HIERARCHY_DELIMETER Configuration parameter
using Determination. See the Help or User Guide for more information.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

94

Importing and Exporting Determination Data


Using the Import/Export Interface

Example Product Categories File


This file creates multiple product categories under a primary category: Office Supplies. Note
that all parents are created before their children. Also note that some records contain
commodity codes, while others do not (have blank values for that column):
sdiType=ProductCategories
ProductPath,Description,CommodityCode
Office Supplies,Office Supplies,OS1111
Office Supplies.Paper,Paper,OS2222
Office Supplies.Paper.Recycled,Recycled Paper,
Office Supplies.Paper.Photo,Photo Paper,
Office Supplies.Paper.Glossy,Glossy Paper,
Office Supplies.Furniture,Office Furniture,OF1234
Office Supplies.Furniture.Desks,Desks,
Office Supplies.Furniture.Chairs,Chairs,

Products do not need to be stored in a hierarchy; you can create a single container for all of your
products, or go as many levels deep as necessary based on your business requirements.
For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Updating a Product Category Record
You can update a product category record by including ProductPath data to match an existing
record and then updating the Description and/or CommodityCode columns as desired.
Product Categories Import Options
You need to create any desired parent product categories (the root categories into which you
will import the product data) on the target system before importing data with the Import/Export
Wizard.
Product Categories Import Prerequisites
When importing product categories, the Import/Export Wizard prompts for:
l

Company Selection. Select the desired company.

Product Group Selection. Select the desired Product Group.

Parent Product Category Selection. Select the desired parent product category. All
child product categories, and their children, will be imported relative to this parent product.

Product Mappings CSV Format


Using a simplified CSV format, you can import specified product mappings from your ERP's
source codes to Determination product categories. The Product Mappings import file applies
only to existing products - those you created in ONESOURCE Indirect Tax Determination, or
those you uploaded with Import/Export.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

95

Using the Import/Export Interface

For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Traditionally, a product mapping maps your ERP codes to a product in the Determination
product tree. This requires specifying the entire product path, which is cumbersome and
error-prone. If you wish, you can map a commodity code directly to a product code. See
Commodity Mappings CSV Format (page 60).

US and Non-US Product Mappings Files


The sdiType value depends on whether the file contains US product mappings or Non-US
product mappings.
l

For US zones, use sdiType=ProductMappings-US.

For non-US zones, use sdiType=ProductMappings-INTL.

In both cases, the file format is the same.


Product Mappings File Format
SDITYPE=ProductMappings-US or ProductMappings-INTL
Column
Name

Format

Required?

Description

ProductPath

varchar2
(100) (See
Description)

The full path of an existing product exception in dot


notation (parent.child.childs-child). Note that the length
of 100 refers to an individual level of the path, not the
entire path length.

ProductCode

varchar2
(100)

The source code passed in from your ERP system.

CustomProduct

varchar2(1)

Indicates whether the Product Mapping data applies to


a Custom Product (Y) or a Tax Data Provider Product
(N).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

96

Importing and Exporting Determination Data


Using the Import/Export Interface

Example Product Mappings File


This file creates two product mappings each for two product categories.
sdiType=ProductMappings-US
ProductPath,ProductCode,CustomProduct
Office Supplies.Paper.Recycled,RE500PK12,Y
Office Supplies.Paper.Recycled,RE500PK24,Y
Office Supplies.Furniture.Desks,ZZDSK25A,Y
Office Supplies.Furniture.Desks,ZZDSK30A,Y

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).For
information about formatting a CSV file to map commodity groups, see Commodity Mappings
CSV Format (page 60).
Product Mappings Import Prerequisites
You need to import or create any desired product categories on the target system before
importing product mappings data with the Import Wizard.
Product Mappings Import Options
When importing product mappings, the Import Wizard prompts for:
l

Company Selection. Select the desired company.

Product Group Selection. Select the desired Product Group.

Product Mapping Group Selection. Select the desired Product Mapping Group.

Product Zones CSV Format


This type of import enables you to specify the zones to which your product exceptions apply.
Product Zones import files apply only to existing products: those you created in ONESOURCE
Indirect Tax Determination, or those you uploaded with the Import/Export Wizard.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
US and Non-US Product Zones Files
The sdiType value changes depending on whether the file contains US zones or Non-US
zones.
l

For US zones, use sdiType=ProductZones-US.

For non-US zones, use sdiType=ProductZones-INTL.

In both cases, the file format is the same; only the valid values in the ZoneName column are
different.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

97

Using the Import/Export Interface

Product Zones File Format


SDITYPE=ProductZones-US or ProductZones-INTL
Column
Name

Format

Required?

Description

ProductPath

varchar2
(100) (See
Description)

The full path of an existing product category in dot


notation (parent.child.childs-child). Note that the length
of 100 refers to an individual level of the path, not the
entire path length.

ZoneName

varchar2
(100)

A Zone to which the product exception applies.


l
l

For US imports, a State.


For non-US imports, a Country. EU countries
must be prefaced with EU.; for example,
EU.FRANCE.

Multiple zones can be specified by submitting multiple


lines in the input file. See the example below for more
information.
StartDate

mm/dd/yyy- Y
y

A start date for the exception in this Zone.

EndDate

mm/dd/yyy- N
y

An optional end date for the exception in this Zone.

Exempt

varchar2(1)

If set to Y, indicates exemption in this Zone during the


specified start/end date period. If blank, defaults to N.

OverrideLocals

varchar2(1)

If set to Y, indicates that the Zone level exemption


setting overrides any Authority level exemptions set for
this Product/Zone combination. Authority level
exemptions must be set in ONESOURCE Indirect Tax
Determination.

The ProductPath delimiter is a dot (.) by default. This delimiter can be changed to another
supported character by setting the SDI_HIERARCHY_DELIMETER Configuration parameter
using Determination. See the Help or User's Guide for more information.
Example Product Zones File
This file creates multiple product zone records for a single product category. Note that the
EndDate column is omitted as these product exceptions do not expire.
sdiType=ProductZones-US
ProductPath,ZoneName,StartDate,Exempt,OverrideLocals
Office Supplies.Paper,WASHINGTON,03/05/2005,Y,Y
Office Supplies.Paper,IDAHO,03/05/2005,Y,N
Office Supplies.Paper,CALIFORNIA,03/05/2005,N,N

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

98

Importing and Exporting Determination Data


Using the Import/Export Interface

Updating a Product Zone Record


You can update a product zone record by including ProductPath, ZoneName, CustomProduct,
and StartDate data to match an existing record and then updating the other columns as desired.
Product Zones Import Prerequisites
You need to import or create any desired product categories on the target system before
importing product zone data with the Import/Export Wizard.
Product Zones Import Options
When you import product zone data, the Import/Export Wizard prompts for:
l

Company Selection. Select the desired company.

Product Group Selection. Select the desired Product Group.

Reference Value CSV Format


Use the Reference Value CSV file to import reference values for existing company reference
lists. Reference value files may be used to create new records or update existing records, but
cannot delete records. Imported reference values replace existing values; if you are updating
records, make sure that the import record contains complete information.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
Reference lists must already be created in ONESOURCE Indirect Tax
Determination.

Reference Value File Format


For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
SDITYPE=ReferenceValue
Column Name

Required?

Description

RefListName

The list's name. Reference list names are case-sensitive.

RefListStartDate

The date on which the reference list becomes active. Must be in


MM/DD/YYYY format

Value

The value to include in the selected list. The value is casesensitive.


Note: If you want to use dates in this field, use the YYYY-MM-DD
format.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

99

Using the Import/Export Interface

SDITYPE=ReferenceValue
Column Name

Required?

Description

ValueStartDate

The date (MM/DD/YYYY) on which the value is included on the


reference list. This date should fall in the effective date range for the
list or the value will not be used. See note below.

ValueEndDate

Optional

The date (MM/DD/YYYY) on which the value terminates


membership in the selected list. If blank, the value will remain
effective indefinitely. See note below.

Start and end dates for reference list values do not have to fall within the
reference list start and end dates. For reference lists, values are valid only when
they intersect the list start and end dates.
Example Reference Value File
This code sample uses the list and values from the MyHawaiianList example. Note that only the
dates that fall within the reference list dates are valid.
sdiType=ReferenceValue
RefListName,RefListStartDate,Value,ValueStartDate,
ValueEndDate
MyHawaiianList,08/01/2008,Kapari,07/01/2008,
MyHawaiianList,08/01/2008,Breadfruit,09/01/2008,
MyHawaiianList,08/01/2008,Poi,06/01/2008,08/15/2008

In the MyHawaiianList reference list, the StartDate is 08/01/2008 and the EndDate is
08/31/2008. The values in the code sample are valid in the reference list, with the exceptions
noted:
l

For Value = Kapari, ValueStartDate = 07/01/2008 (Starts before List Start Date. Valid only
08/01/2008 through 08/31/2008).
For Value = Breadfruit, ValueStartDate = 09/01/2008 (Starts after the List End Date. Will
never be a valid value).
For Value = Poi, ValueStartDate = 06/01/2008,ValueEndDate = 08/15/2008 (Starts before
List Start Date and ends before List End Date. Valid only 08/01/2008 through 08/15/2008).

Reference Value Import Prerequisites


l
l

Any company to which you want to import this data must already exist.
The reference list to update with new values must already exist, and your CSV must use the
same start date as this existing list.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

100

Importing and Exporting Determination Data


Using the Import/Export Interface

Reference Value Import Options


When importing reference values, the Import/Export Wizard prompts for:
l

Type, if not provided in the import file header.

Company Name

TransEditor Groups CSV Format


This type of import enables you to quickly load TransEditor Groups. Each group contains
individual TransEditors, which contain Conditions and Actions. It is possible to import blank
TransEditors (with no Conditions or Actions) if you want to quickly create a number of
TransEditors that you can then later modify.
TransEditor Groups are created as Checked Out with a start date of today. Once the group is
imported, you need to view the data in Determination to verify the accuracy of the import, create
the appropriate start and end dates for the group, and check it in.
TransEditor Group imports are intended to import new groups, not modify existing groups. You
cannot, for example, add an editor to a group. You can only import a complete group, then
modify it as desired in Determination.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58)
To specify a reference list in a TransEditor, you must create the TransEditor on the
Conditions tab of TransEditors page. You can include a reference list in the CSV
file so that Determination can identify when a reference list referenced.
In Determination, you specify a reference list on the Conditions tab of the
TransEditor page. Click the Reference List radio button and then select the
reference list you want to use from the drop-down list.
The Operator field automatically switches to EXISTS IN. If you want to exclude the
values in the reference list, select NOT EXISTSIN from the drop-down list.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

101

Using the Import/Export Interface

TransEditor Groups File Format


TransEditors consist of IF/AND/OR statements and parent/child relationships, resulting in
complex logical statements. Restrictions on logic are imposed on the import file. The following
restrictions apply:
l

l
l

The logic statement IF (A or B) AND (C or D) THEN is not valid TransEditor logic. This
statement must be rewritten as: IF (A AND (C OR D)) OR (B AND(C OR D)) THEN.
You cannot nest OR statements within each other. An (OR) cannot contain a second (OR).
The logic must be unambiguous - for example, you cannot list a mix of ANDs and ORs with
no parentheses, and each open parenthesis must have a matching close parenthesis in the
appropriate location.
If you enter a math expression in the Element field, the upload will not validate the
expression. When you view the TransEditor in the UI, you will need to correct any failing
expression before you save the data and leave the page.
SDITYPE=TransEditors

Column
Name

Format

Required?

Description

GroupName

varchar2
(100)

Name of the TransEditor Group.

EditorName

varchar2
(100)

Name of the TransEditor.

ParentName

varchar2
(100)

Name of the Editor's parent. If specified, the editor must


have been listed earlier in this import file. Can be null if the
editor exists at the top level in the group. Note that the
ParentName cannot be the same as the EditorName for this
line.

Condition

varchar2
(5)

Valid values are IF, AND, OR, and THEN. IF starts a


condition. AND and OR are used when there is more than
one condition for an editor.

Open

varchar2

Parentheses. Valid values are zero or more left


parentheses: ('. Each open parenthesis must have a
matching close parenthesis in the file.

Element

varchar2
(250)

Name of an XML element. For example. INVOICE.SHIP_


FROM.COUNTRY or a math expression. For information
about the limitations, see Using ONESOURCE Indirect Tax
Determination TransEditors in Help.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

102

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=TransEditors
Column
Name

Format

Required?

Description

Operator

varchar2
(15)

Valid values are the following:


l
l
l
l
l
l
l
l
l
l
l

=
!=
<
>
>=
<=
IS EU
IS NOT EU
IS NULL
IS NOT NULL
LIKE

THEN conditions can only use the equals symbol (=).


Constant

varchar2
(250)

Y*

A constant value.
l

For IF, AND, and OR conditions, this is a constant to


compare to the Element Field. IF, AND, and OR
conditions with Operator values of IS NULL and IS
NOT NULL are not expected to have these values.
For THEN conditions, this is a constant to set to the
Field.

(*) Use either the Constant or the ValueElement field, but


not both.
ValueElement

varchar2
(250)

Y*

An XML element, or a math expression subject to the


limitations described in the math section of the Help topic
Using ONESOURCE Indirect Tax Determination
TransEditors.
l

For IF, AND, and OR conditions, this is an XML


element to compare to the Element Field. IF, AND, and
OR conditions with Operator values of IS NULL, IS
NOT NULL, IS_EU, and IS_NOT_EU are not
expected to have these values.
For THEN conditions, this is an XML element to set to
the Field.

(*) Use either the Constant or the ValueElement field, but


not both.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

103

Using the Import/Export Interface

SDITYPE=TransEditors
Column
Name

Format

Required?

Description

ReferenceList

varchar2
(250)

Y*

Reference List name.


l

For EXISTS IN and NOT EXISTS IN conditions, this is


a reference list name to compare to the Element Field.
IF, AND, and OR conditions with Operator Values of
IS NULL, IS NOT NULL, IS_EU, and IS_NOT_EU are
not expected to have these values.
For THEN conditions, this is an XML element to set to
the Field.
Only an Active reference list (today's date falls
between the reference list's start and end date) can be
imported.

(*) Use only one of the Constant, ValueElement, or


ReferenceList fields.
Close

varchar2

Close Parentheses. Each Open parenthesis MUST have a


matching Close parenthesis in the file.

Comment

varchar2
(1000)

A comment about the GroupName. Only the first comment


in the group gets imported.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

104

Importing and Exporting Determination Data


Using the Import/Export Interface

Example TransEditor Groups File


This file creates a group containing two editors. The first has a single condition and action. The
second has multiple conditions and a single action:
sdiType=TransEditors
GroupName,EditorName,Condition,Open,Element,Operator,Constant,Close,
Comment
OFCGroup,TE1,IF,,INVOICE.SHIP_TO.STATE,=,CT,,Derive Country from
State/Province
OFCGroup,TE1,THEN,,INVOICE.SHIP_TO.COUNTRY,=,US,,
OFCGroup,TE2,IF,(,INVOICE.SHIP_TO.PROVINCE,=,AB,,
OFCGroup,TE2,OR,,INVOICE.SHIP_TO.PROVINCE,=,BC,,
OFCGroup,TE2,OR,,INVOICE.SHIP_TO.PROVINCE,=,MB,,
OFCGroup,TE2,OR,,INVOICE.SHIP_TO.PROVINCE,=,ON,),
OFCGroup,TE2,THEN,,INVOICE.SHIP_TO.COUNTRY,=,CDN,,

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
TransEditor Groups Import Prerequisites
This type of import imposes no prerequisites before using the Import/Export Wizard.
TransEditor Groups Import Options
When importingTransEditor Groups, the Import/Export Wizard prompts for Company
Selection. Select the desired company.
Once the group is imported, you need to view the data in Determination to verify the accuracy of
the import, create the appropriate start and end dates for the group, and check the group in
before using it.

Zone Alias CSV Format


This type of import enables you to specify aliases to Determination zone names, including
alternate or localized names. Zone Alias records can only alias to zone names already in
ONESOURCE Indirect Tax Determination Zone Tree.
For information about using CSV format files, see Best Practices for Importing Data with CSV
Files (page 58).
US and Non-US Zone Alias Files
The sdiType value changes depending on whether the file contains US zone aliases or Non-US
zone aliases.
l

Use sdiType=ZoneAlias-US for US zone aliases.

Use sdiType=ZoneAlias-INTL for non-US zone aliases.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Importing and Exporting Determination Data

105

Using the Import/Export Interface

In both cases, the file format is the same; only the valid values in the ZoneName and
LevelApplied columns are different.
Zone Alias File Format
SDITYPE=ZoneAlias-US or SDITYPE=ZoneAlias-INTL
Column
Name

Format

Required?

Description

Alias

varchar2
(50)

The text to be aliased, following these guidelines:


l

Aliases must consist of at least two characters. If


aliasing a prefix or suffix such as the N in N ORLEANS,
you must add an underscore character to indicate the
space (N_). In this case, the alias would be from N_ to
NEW_; both the alias and the value need to include the
trailing space.
Leading and trailing spaces are always truncated from
aliases; always use the underscore character as shown
above if leading or trailing space is desired.
Spaces within strings (such as the full alias N
ORLEANS to the value NEW ORLEANS) are
permitted. You can also enter this alias as N_
ORLEANS for consistency.

Country, State, and Province codes can be aliased to full


names only, not to other codes.

Value

varchar2
(50)

The value to which the aliased text will be set; the resulting
name once the alias is applied must be a valid zone name or
the alias will fail.
If an underscore is included in an Alias, in most cases it will
need to be in the Value as well. For example, if you are
matching the prefix alias SO to SOUTH, include the
underscore on both (SO_ and SOUTH_). In this case, SO
BOSTON would be transformed to SOUTH BOSTON.
The exception to this rule is when you want a prefix to be
concatenated to the alias string. For example, if you had an
Alias of FT_ to the Value of FORT, FT DEFIANCE would be
transformed to FORTDEFIANCE.

Type

varchar2
(2)

One of the following:


l

FL (Full Match): the entire string is evaluated. Example:


N ORLEANS to NEW ORLEANS.
PX (Prefix): the first part of a string is evaluated. For
example, FT to FORT in the zone FORT WORTH.
SX (Suffix): the last part of a string is evaluated. For
example, ISLE to ISLAND in the zone PRINCE
EDWARD ISLAND.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

106

Importing and Exporting Determination Data


Using the Import/Export Interface

SDITYPE=ZoneAlias-US or SDITYPE=ZoneAlias-INTL
Column
Name

Format

Required?

Description

ZoneName

varchar2
(50)

The name of the parent zone owning the alias.


For non-US aliases, must be a valid name at this level:
l
l

World
Country

For US aliases, must be a valid name at this level:


l
l
l

LevelApplied

varchar2
(50)

World
Country
State

The level at which the alias is applied.


For non-US aliases, one of the following:
l
l
l
l

Country
Province
County
City

For US aliases, one of the following:


l
l

County
City

Example Zone Alias File


This file creates four zone aliases in the US Zone Tree.
sdiType=ZoneAlias-US
Alias,Value,Type,ZoneName,LevelApplied
FT,Fort,PX,Colorado,City
N_,New,PX,Louisiana,County
_BCH,_BEACH,SX,Florida,City
W_ALLIS,WEST ALLIS,FL,Wisconsin,City

For more information about formatting a CSV file, see Creating CSV Import Files (page 55).
Zone Alias Import Prerequisites
Any company to which you want to import this data must already exist.
Zone Alias Import Options
When you import zone alias data, the Import/Export Wizard prompts for Company Selection.
Select the desired company.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Reviewing Historical Transactions

107

Getting Ready to Use the Audit Invoice Servlet

REVIEWING HISTORICAL
TRANSACTIONS
There is an interface called the Audit Invoice Servlet (auditinvoice) that you can use to re-create
the XML for transactions that have already been processed by ONESOURCE Indirect Tax
Determination. This is a useful tool for troubleshooting particular transactions. See the following
sections for details about this interface:
l

Getting Ready to Use the Audit Invoice Servlet (page 107)

The Audit Invoice User Interface (page 108)

GETTING READY TO USE THE AUDIT INVOICE SERVLET


The auditinvoice servlet enables you to quickly re-create the XML of previously processed
transactions by accepting your search criteria and comparing it with the Audit database.
There are two ways to access the servlet:
l

Browser: By using a supported browser, you can either select parameters or enter the XML
manually. This is the approach most commonly used by tax professionals. See The Audit Invoice
User Interface (page 108) for details.
Programmatically: You can also call the servlet programmatically using its URL. This is usually
used by programmers who are automating the troubleshooting process for tax professionals.

Review the following before getting started with this servlet:

Authentication
If the CALC_AUTHENTICATION_REQUIRED Configuration parameter is set to Y, you will
always need to authenticate your auditinvoice transactions by using the Username and
Password fields/elements described in The Audit Invoice User Interface (page 108). Also, see
the Configuration topic in Help for more information on setting this parameter.
If you are using this servlet programmatically, exempt the user from password expiration. See
the option Password Never Expires in the Help topic Edit Users. The best practice is to
change passwords periodically to maintain security.

Database Keys
Each invoice is stored in the Audit Database using a unique key (or keys). The keys used to
refer to invoices are dependent on both your Configuration settings as well as the capabilities of
your specific ERP system and ONESOURCE Indirect Tax Integration. The keys consist of the
following elements in combination:

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

108

Reviewing Historical Transactions


The Audit Invoice User Interface

HOST_SYSTEM, CALLING_SYSTEM_NUMBER, and UNIQUE_INVOICE_NUMBER

MERCHANT_ID, INVOICE_DATE, and INVOICE_NUM

When performing Audit lookups, Determination may make use of one or both keys depending
on the settings of Configuration parameters and a specific Company Option. For information on
this topic, contact Customer Support.

THE AUDIT INVOICE USER INTERFACE


You can reach the servlet in a browser by going to the servlet URL. Ask the application server
administrator about the host, port, and whether HTTP or HTTPS is used in your environment.
This is the HTTPS format:
https://<app_server>:<port>/sabrix/auditinvoice

The user interface enables you to either select or enter parameters from the list (upper pane) or
enter the input XML directly (lower pane).
If input XML is present on the page, it always takes precedence over any data selected or
entered above, regardless of which Submit button is clicked.
To trigger the servlet, enter or select data and click Submit. The resulting output XML appears
in a new window.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Reviewing Historical Transactions

109

The Audit Invoice User Interface

Field

Description

Detail Level

One of the following:


l
l

Most Recent Invoice

all: The resulting XML includes invoice, line, and tax data. Default.
invoice: The resulting XML includes invoice data with line and tax
data rolled up into the invoice.
line: The resulting XML includes invoice and line data, with tax data
rolled up into the line(s).

A single invoice may have multiple versions stored in audit, due to


reversals or recalculations.
l

Checking Most Recent Invoice returns the most recent version of


an invoice stored in audit.
When this box is unchecked (default), all versions of an invoice
stored in audit are returned in the resulting XML.

External Company ID

A Required external company ID mapping to the Determination company


owning the audit data. Any Username and Password entered below must
also be associated with this company.

Invoice Number

An exact invoice number match. If no data is entered here, the field is


ignored.

Invoice Date From

An invoice date range for the search. See the Note following this table.

Invoice Date To
Fiscal Date From

A fiscal date range for the search. See the Note following this table.

Fiscal Date To
Transaction Date From

A transaction date range for the search. See the Note following this table.

Transaction Date To
Calling System
Number

A unique identifier for your ERP system. The combination of Calling


System Number, Host System, and Unique Invoice Number form a
unique key for an invoice in the Audit Database.

Host System

A unique name for your ERP system. The combination of Calling System
Number, Host System, and Unique Invoice Number form a unique key for
an invoice in the Audit Database.

Unique Invoice Number

A unique invoice number. The combination of Calling System Number,


Host System, and Unique Invoice Number form a unique key for an
invoice in the Audit Database.

Invoice UUID

The unique identifier assigned to the invoice in the database. This data
can only be accessed by this servlet; it is not part of the calculations
output data.

Username Password

If the Configuration parameter CALC_AUTHENTICATION_REQUIRED


is set to Y, you must enter a valid Determination username and password
to use the servlet. See External Company ID above.
If authentication is enabled, the password is subject to expiration. You
can turn off expiration using the option Password Never Expires in the
user setup. See the Help topic Edit Users.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

110

Reviewing Historical Transactions


The Audit Invoice User Interface

Date ranges, which are optional, are specified as follows: A From date alone limits the search to
dates matching the entered date and later. A To date alone limits the search to dates matching
the entered date an earlier. A From and To date pair limits the search to dates between the two,
inclusive of the From and To dates.

Audit Invoice Servlet Input XML


Input XML consists of a single <AUDIT_DETAILS> structure sent to the servlet. The minimum
required elements to submit are these (all other elements are optional):

<?xml version=1.0 encoding=UTF-8"?>


<AUDIT_DETAILS detailLevel="all|invoice|line" mostRecentInvoice="Y|N">

<EXTERNAL_COMPANY_ID> company</EXTERNAL_COMPANY_ID>
</AUDIT_DETAILS>

XML Field Name

Description

<AUDIT_DETAILS>

Structural element containing the request. Includes the following


components:
detailLevel=all|invoice|line
l
l

all: The resulting XML includes invoice, line, and tax data.
invoice: The resulting XML includes invoice data with line and tax
data rolled up into the invoice.
line: The resulting XML includes invoice and line data, with tax data
rolled up into the line(s)

mostRecentInvoice=N|Y
l
l

N: return all versions of the specified invoice(s) (default).


Y: return only the most recent version of the specified invoice(s).

<CALLING_SYSTEM_
NUMBER>

A unique identifier for your ERP system. The combination of Calling


System Number, Host System, and Unique Invoice Number form a
unique key for an invoice in the Audit Database.

<EXTERNAL_
COMPANY_ID>

A required external company ID mapping to the Determination company


owning the audit data. Any Username and Password entered below must
also be associated with this company.

<FISCAL_DATE_
FROM>
<FISCAL_DATE_TO>

A fiscal date range for the search.

<HOST_SYSTEM>

A unique name for your ERP system. The combination of Calling System
Number, Host System, and Unique Invoice Number form a unique key for
an invoice in the Audit Database.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Reviewing Historical Transactions

111

The Audit Invoice User Interface

XML Field Name

Description

<INVOICE_DATE_
FROM>
<INVOICE_DATE_
TO>

An invoice date range for the search.

<INVOICE_
NUMBER>

An invoice number to match exactly in the audit data.

<INVOICE_UUID>

The unique identifier assigned to the invoice in the database.

<PASSWORD>

A password associated with the <USERNAME> provided. Required if


the Configuration parameter CALC_AUTHENTICATION_REQUIRED is
set to Y.
If authentication is enabled, the password is subject to expiration. You
can turn off expiration using the option Password Never Expires in the
user setup. See the Help topic Edit Users.

<TRANSACTION_
DATE_FROM>
<TRANSACTION_
DATE_TO>

A transaction date range for the search.

<UNIQUE_INVOICE_
NUMBER>

A unique invoice number. The combination of Calling System Number,


Host System, and Unique Invoice Number form a unique key for an
invoice in the Audit Database.

<USERNAME>

A Determination user name. Required, along with <PASSWORD>, if the


Configuration parameter CALC_AUTHENTICATION_REQUIRED is set
to Y.
If authentication is enabled, the password is subject to expiration. You
can turn off expiration using the option Password Never Expires in the
user setup. See the Help topic Edit Users.

Date ranges, which are optional, are specified as follows: A From date alone limits the search to
dates matching the entered date and later. A To date alone limits the search to dates matching
the entered date and earlier. A From and To date pair limits the search to dates between the
two, inclusive of the From and To dates.

Audit Invoice Servlet Output XML


Output XML consists of zero to many invoices contained in a single <AUDIT_DETAILS>
structure.
For a description of the Output XML see the Tax Calculation XML Elements (page 117). The
entire output structure is returned for each invoice, subject to the following.

Audit Data Not Returned by Audit Invoice Servlet


<ROUNDING_RULE> and <ROUNDING_PRECISION> are only returned at the Invoice
level-- not at the Tax level.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

112

Reviewing Historical Transactions


The Audit Invoice User Interface

Additional Data Returned by Audit Invoice Servlet


The following data, stored in audit if the associated configuration parameters are set, is returned
by auditinvoice:
l

Determination messages at the Invoice, Line, and Tax level.

TransEditor actions at the Line and Invoice level.

Allocation actions at the Line level.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Implementing the External Exchange Rate Finder

113

IMPLEMENTING THE EXTERNAL


EXCHANGE RATE FINDER
You have two options for setting currency exchange rates in ONESOURCE Indirect Tax
Determination: manually populate the values in your database, or call an external exchange
rate provider.
For information about how to manually add exchange rates to the Determination database, see
the Help topic Exchange Rates. If you prefer to call an external exchange rate provider, see the
example below.
Determination has a Java interface called External Exchange Rate Finder
(IExternalExchangeRateFinder), and you can create your own class to implement this
interface. For details, see the JavaDoc which is located under the directory in which you
unzipped the Determination software (external-api\te-external-api-<the current Determination
version number>-javadoc.jar). Use the model below, following these guidelines:
l

The example contains hard-coded exchange rates that you could use for initial testing;
however, for your implementation, you would replace these examples with code that calls
your external exchange rate provider.
In your implementation, you can pass the exchange rate date (exchangeRateDate) to the
method getExchangeRates() to help you make the correct rate selection.
Determination requires a non-NULL list of rates. Add error handling so that if the External
Exchange Rate Finder causes or receives an error, it returns an empty list to Determination.
When Determination receives an empty list, it returns the application message
EXCHANGE_RATE_NOT_FOUND.
Insert your class file into the classes directory under sabrix in your application server
directory structure.

The following is a code example:


package insert_your_package_name_here;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date; import java.util.List;
import com.sabrix.external.ExternalExchangeRate;
import com.sabrix.external.IExternalExchangeRateFinder;
import com.sabrix.tax.currency.IExchangeRate;
public class MyExchangeRateFinder implements IExternalExchangeRateFinder
{
public List<IExchangeRate> getExchangeRates(Date exchangeRateDate) {
List<IExchangeRate> exchangeRateList = new ArrayList>IExchangeRate>();

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

114

Implementing the External Exchange Rate Finder

// CAN <-> USD


exchangeRateList.add(new MyExchangeRate("USD", "CAD", new BigDecimal
(2/3)));
exchangeRateList.add(new MyExchangeRate("CAD", "USD", new BigDecimal
(1.5)));
// MXN <-> USD
exchangeRateList.add(new MyExchangeRate("MXN", "USD", new BigDecimal
(1)));
exchangeRateList.add(new MyExchangeRate("USD", "MXN", new BigDecimal
(1)));
// GBP <-> EUR
exchangeRateList.add(new MyExchangeRate("GBP", "EUR", new BigDecimal
(1.5)));
exchangeRateList.add(new MyExchangeRate("EUR", "GBP", new BigDecimal
(0.667)));
// USD <-> GBP
exchangeRateList.add(new MyExchangeRate("USD", "GBP", new BigDecimal
(0.667)));
exchangeRateList.add(new MyExchangeRate("GBP", "USD", new BigDecimal
(1.5)));
return exchangeRateList;
}
/**
* private inner class that adds constructor for convenient class
instantiation.
*/
private class MyExchangeRate extends ExternalExchangeRate {
MyExchangeRate(String fromCurrencyCode, String toCurrencyCode,
BigDecimal rate) {
setFromCurrencyCode(fromCurrencyCode);
setToCurrencyCode(toCurrencyCode);
setRate(rate);
}
}
}

Determination does not cache the exchange rate results from the external
provider. Each transaction gathers all exchange rates for all countries, unless you
manage caching.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Setting Up Single Sign-on

115

SETTING UP SINGLE SIGN-ON


To allow ONESOURCE Indirect Tax Determination users login access using security
credentials from another application, create your own Java class to implement the
IAuthenticator interface. Complete the following to configure single sign-on:

Creating the Authenticator Class File


For details about the class, see the JavaDoc which is located under the directory in which you
unzipped the Determination software (external-api\te-external-api-<the current Determination
version number>-javadoc.jar). Using the sample below as a guide, create your own
Authenticator class file:
/*
* Copyright 2012 Thomson Reuters/ONESOURCE. All rights reserved.
*/
package com.sabrix.uicontroller;
import com.sabrix.error.SabrixException;
public final class SimpleAuthenticator implements IAuthenticator
{
/**
* Request parameter that contains the name of the user to be
authenticated.
*/
public static final String PARAMETER_USER_NAME = "username";
/**
* Simply returns the name of the user supplied in the
* session in the parameters to a request to the
* Determination action servlet. Ideally, this would be
* a POST instead of a GET, but the servlet will
* accept either.<p/>
*
* <pre>
* The structure of the Tax Engine request URL is:
* https://host:port/sabrix/action
*
* The parameters required for authentication request are:
* sabrixActionName=Authenticate
* username=SingleSignOnUserName
* </pre>
*

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

116

Setting Up Single Sign-on

* The SingleSignOnUserName should be replaced with the desired


username.
*/
public String authenticate(final ISabrixUiSession session) throws
SabrixException
{
final String username = session.getRequestParameterMap().getString
(PARAMETER_USER_NAME);
System.out.println(String.format("%s-%s", getClass(), username));
return username;
}
}

Note that the line above that begins http://host:port/sabrix/action is shown on


two lines. In practice, the code is all on one line.

Inserting the Class File into Determination


Place your authenticator class file into the base directory. For a default installation, this is
located in the current working directory of your application server. Within the base directory you
need to place your class file in the classes directory. The structure will look similar to this:
<SABRIX_BASE_DIRECTORY>/classes/com/sabrix/authenticator/SSOAuthenticator.class.

Modifying Configuration Parameters


In Determination, add or modify the following Configuration parameters. See the Configuration
topic in Help for details:
l
l
l
l

AUTHENTICATOR_CLASS: Insert fully qualified authenticator class name.


PASSWORD_EXPIRATION_ENABLED: Set to N.
PASSWORD_FORCED_CHANGE_DISABLED: Set to Y.
REDIRECT_URL_EXTERNAL_LOGIN: Insert URL for when the user is not in the
system or there is a timeout.
REDIRECT_URL_ON_FAILED_AUTHENTICATION_CONFIG: Insert URL for
failed authentication.

Configuring Additional Security


Because unwanted users could bypass the single sign-on feature by supplying a username and
password directly in the URL, it is important that you control the network traffic making requests
to this URL.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

117

TAX CALCULATION XML ELEMENTS


ONESOURCE Indirect Tax Determination uses the following XML Input and XML Output
elements. The following topics have tables describing individual elements.
l

Batch Level Input XML Elements (page 120)

Invoice Level Input XML Elements (page 123)

Line Level Input XML Elements (page 146)

Address Level Input XML Elements (page 166)

Batch Level Output XML Elements (page 168)

Invoice Level Output XML Elements (page 170)

Line and Allocation Line Level Output XML Elements (page 176)

Tax Level Output XML Elements (page 185)

Batch-level elements set the defaults for all invoices in the batch. They can be overridden by
invoice-level elements of the same name.
If the element type is structural, the elements in the structure are listed immediately following,
and are indented and italicized for easy scanning.
For XML Output Elements, an additional column describes if the element is saved to the audit
tables.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

118

Tax Calculation XML Elements


Element Types

ELEMENT TYPES
Each element is one of the following types:
l

Structural: Contains sub-elements.

Number: A number.

Varchar2(x): A string of x characters. See the Warning below.

Date: A date in YYYY-MM-DD format (ISO 8601). The representation in your database is
dependent on your database configuration settings. The Output XML always returns the
format shown above.
Boolean: The Output XML always returns true or false. In the Input XML, you can also
specify Y or N as a convenience to enable backwards compatibility.
Throughout this reference, elements listed as types such as varchar2(100) and
varchar2(50) indicate the number of single-byte characters that can be
successfully contained within the element. If you include multi-byte characters,
you need to account for their size when submitting data. Most Western
currencies and accented characters are 2 bytes; most Asian characters are 3
bytes; depending on your database character set setting, multi-byte characters
may require more than 2 or 3 bytes of storage space.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

119

XML Elements

XML ELEMENTS
Menu Path: Menu > System > XML Elements

On this page you can view all ONESOURCE Indirect Tax Determination XML elements.

If desired, use the Show list to select only the attribute types in which you are interested: Filter,
Input, Output or Tax Code Qualifier.

You can view the attributes of the XML elements:


l

Leaf indicates whether the element is at the end of a branch.

Data Type shows the kind of data that is passed.

Until indicates whether an element has been deprecated (retired).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

120

Tax Calculation XML Elements


Batch Level Input XML Elements

BATCH LEVEL INPUT XML ELEMENTS


The following elements are found in the <INDATA> structure.
The <INDATA> element is defined as <INDATA version="X">, where X indicates the current
compatibility version.
Element Name
<CALLING_SYSTEM_
NUMBER>

Type
varchar2
(100)

Req?
No

Description
A pass-through element that contains a
descriptor of the calling system sending the
transaction.
Note: ONESOURCE Indirect Tax
Determination supports two audit keys to
enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

<COMPANY_ID>

number

No

The internal Determination ID of the merchant.

<COMPANY_NAME>

varchar2
(100)

Yes*

The name of the company running the


transaction. ONESOURCE Indirect Tax
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(20)

Yes

The role the company plays in a given


transaction: Buyer (B), Middleman (M), or Seller
(S). Each role results in different transaction tax
and reporting requirements.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

121

Batch Level Input XML Elements

Element Name
<EXTERNAL_
COMPANY_ID>

Type

Req?

Description

varchar2
(100)

Yes*

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. This element may be
passed at the batch level or with each invoice,
and is passed through to the Determination
output and the audit tables.
(*) Required if COMPANY_NAME is not
populated.

<HOST_REQUEST_
INFO>

structural

No

Contains pass-through elements used to


identify the originating request from the ERP
source.

<HOST_REQUEST_
ID>

varchar2
(100)

No

A pass-through element used to identify the


document with the originating request from the
ERP source.

<HOST_REQUEST_
LOG_ENTRY_ID>

varchar2
(100)

No

A pass-through element used to identify the


originating request from the ERP source in log
files.

varchar2
(100)

No

The name of the ERP instance sending the


transaction.

<HOST_SYSTEM>

Note: Determination supports two audit keys to


enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.
<PASSWORD>

varchar2(16)

Yes*

Database user password used to validate the


transaction submitter.
(*) Required if the CALC_AUTHENTICATION_
REQUIRED Configuration parameter is set to Y
and a custom authentication scheme has not
been implemented.
If authentication is enabled, the password is
subject to expiration. You can turn off expiration
using the option Password Never Expires in
the user setup. See the Help topic Edit Users.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

122

Tax Calculation XML Elements


Batch Level Input XML Elements

Element Name

Type

Req?

Description

<SCENARIO_ID>

number(10)

No

This is an internal ID generated by


Determination for Workbench scenarios.

<SCENARIO_NAME>

varchar2
(100)

No

This is the name of the Determination


Workbench scenario.

<USERNAME>

varchar2(60)

Yes*

Database user name used to validate


transaction submitter.
(*) Required if the CALC_AUTHENTICATION_
REQUIRED Configuration parameter is set to Y
and a custom authentication scheme has not
been implemented.

<XML_GROUP_NAME>

varchar2(30)

No

The XML Group you want to use for the


transaction. XML Groups determine those
elements that Determination passes back to the
calling application. If the XML group specified
here is invalid (owned by the wrong company)
for an invoice contained in the current XML
transaction, the XML group specified for the
company on that invoice is used instead.

<XML_GROUP_OWNER>

varchar2
(100)

No

The company name associated with the XML


group being used. This must be an ancestor of
the submitting company or the company itself.
Do not use slashes or characters in company
names.

<INVOICE>

structural

Yes

The INVOICE and /INVOICE elements are


structural. They serve as the container for an
individual invoice. Each batch can contain
multiple invoices.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

123

Invoice Level Input XML Elements

INVOICE LEVEL INPUT XML ELEMENTS


The following elements are found in the <INDATA><INVOICE> structure.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
To enable compatibility with previous releases, all elements that require true or
false also support Y and N. The XML Output will always return true or false,
regardless of whether the new- or old-style contents are passed in.
Element Name

Type

Req?

Description

<ALLOCATION_
GROUP_NAME>

varchar2
(100)

No

Name of the Allocation Group to use for this


transaction. Named Allocations will be looked
up in this group.

<ALLOCATION_
GROUP_OWNER>

varchar2
(100)

No

Name of the Company owning the Allocation


Group to use for this transaction. The named
Allocation Group will be looked up in this
company's data.

<ALLOCATION_NAME>

varchar2
(100)

No

Name of the Allocation to use for this


transaction. Named Allocations will be looked
up in the specified group owned by the
specified company - see above. Company
default owner and group will be used if not
specified in the transaction. Allocations are
dated, so the named version active as of the
<INVOICE_DATE> will be used. If none
match, a message will be added to output
indicating an active named Allocation was not
found.
Note: Allocation processing can be
overridden at the line level. See <LINE>.<IS_
ALLOCATABLE>.

<AUDIT_MESSAGE_
THRESHOLD>

varchar2(1)

No

This element has been deprecated in favor of


audit-related Configuration parameters.

<AUTO_CREATE_
CERTIFICATES>

boolean

No

Indicates whether or not to create exemption


certificates automatically. Automatic creation
occurs when an exemption is forced by the
elements being passed into the system, but
no existing certificate is on file. This element
overrides Company Preferences that
determine whether or not exemption
certificates are created automatically.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

124

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<AUTO_CREATE_
CUSTOMERS>

boolean

No

Indicates whether or not customers are


created automatically when transactions are
entered into the system. Exemption
certificates can then be associated with these
customers. This element overrides Company
Preferences that determine whether or not
customers are created automatically.

<BASIS_PERCENT>

number

No

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.
If this element is provided, it overrides any
data found on a tax rule or exemption
certificate applied to this transaction.

<BILL_TO>

structural

No

The Bill To address. This address is used for


certain transaction types in several countries
to determine tax and reporting requirements.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<BUYER_PRIMARY>

structural

No

The buyer company's home or primary


address.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<CALCULATION_
DIRECTION>

varchar2(1)

No

There are three calculation directions, each


using different XML elements in the
calculation:
l

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
<TAX_PLUS_GROSS> (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>.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

125

Invoice Level Input XML Elements

Element Name
<CALLING_SYSTEM_
NUMBER>

Type
varchar2
(100)

Req?
No

Description
A descriptor of the calling system sending the
transaction.
Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

<COMPANY_ID>

number

No

The internal Determination ID of the


merchant.

<COMPANY_NAME>

varchar2
(100)

Yes*

The identifier used by companies when


calling Determination. This element tells
Determination which company is calling it,
allowing Determination to use the right
company-specific settings.
(*) It is Required if <EXTERNAL_
COMPANY_ID> is not populated.
Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

<COMPANY_ROLE>

varchar2(20)

Yes

The role the company plays in a given


transaction: Buyer (B), Middleman (M) or
Seller (S). Each role results in different
transaction tax and reporting requirements.

<COUNTRY_OF_
ORIGIN>

varchar2
(100)

No

The country where the goods were


manufactured. Used in Intrastat reporting.

<CURRENCY_CODE>

varchar2(3)

Yes

The currency associated with a transaction.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

126

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<CUSTOMER_GROUP_
NAME>

Type
varchar2
(100)

Req?
No

Description
Name of the Customer Group to use for this
transaction. Customers will be looked up in
this group, overriding the settings of the
transacting company's Company
Preferences.
Note: The list of valid groups for this element
consists of Customer Groups owned by the
transacting company and its ancestors.

<CUSTOMER_GROUP_
OWNER>

varchar2
(100)

No

Name of the Company owning the Customer


Group to use for this transaction. This
company must be a parent or grandparent of
the transacting company.

<CUSTOMER_NAME>

varchar2
(100)

No

The customer's name. Used in both VAT


Registration Group member and Exemption
Certificate Customer/License Customer
matching:
For VAT Registration Group members, this
element is used as a fall-back if a match
cannot be made using <EXTERNAL_
COMPANY_ID> or <CUSTOMER_
NUMBER>.
For Exemption Certificate and License
customer lookups, this element is no longer
used by default; use <CUSTOMER_
NUMBER> instead. To use <CUSTOMER_
NAME> as well, set the Configuration
parameter STRICT_CUSTOMER_LOOKUP
to N.

<CUSTOMER_NUMBER>

varchar2
(100)

No

The customer's number as passed in by the


ERP system.
This element's value is used by
Determination when searching for exemption
certificates or licenses that are relevant to a
transaction, or to auto-create a customer or
an associated certificate if the system is so
configured.
This element's value can also be used to
match VAT Registration Group members if no
match is found using <EXTERNAL_
COMPANY_ID>.

<DELIVERY_TERMS>

varchar2
(100)

No

Indicates how goods were shipped and where


title was transferred. Valid values include
Incoterms 2000 codes and any other
customer-defined codes.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

127

Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<DEPT_OF_CONSIGN>

varchar2
(100)

No

Department of consignment. Used in Intrastat


reporting.

<DOCUMENT_TYPE>

varchar2(50)

No

Document Type references either a virtual or


a physical document created and managed by
the ERP system. Examples include invoice,
order, or credit memo.
The document type represents the type of
transaction to be processed, including
defining the types of entities in the
transaction. For example, a sales quote will
have different attributes than an invoice for
purchased goods.

<END_USE>

varchar2
(100)

No

End use of the product. Intended to govern


the applicability of a rule.

<END_USER_NAME>

varchar2
(100)

No

Identifier of the user who made a change to


the invoice in the calling ERP system.

<ESTABLISHMENTS>

structural

No

List of established locations.

structural

No

List of buyer's established locations.

boolean

No

Establishment for this location type (true or


false).

structural

No

List of middleman's established locations.

<BUYER_ROLE>

<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<MIDDLEMAN_
ROLE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

128

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<SELLER_ROLE>

<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<EXEMPT_AMOUNT>

Type

Req?

Description

boolean

No

Establishment for this location type (true or


false).

structural

No

List of seller's established locations.

boolean

No

Establishment for this location type (true or


false).

structural

No

Forces an exempt amount for a transaction in


one or more specified zone levels.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

129

Invoice Level Input XML Elements

Element Name
<COUNTRY>

Type

Req?

Description

number

No

Amount for this zone level.

structural

No

The exemption certificate number, which is


used to look up the specific exemption
certificate for this invoice. This element can
also be used in certificate auto-creation.

varchar2
(100)

No

Number at this zone level.

structural

No

Limits the search for an applicable certificate


to ones with this exempt reason (either short
code or long code). Also, if no certificate is
found and auto-create certificates is turned
on, the transaction must have either a valid
exempt reason or certificate number at the
address level at which a given authority is
trying to apply tax.

varchar2(20)

No

Reason for this zone level.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>
<EXEMPT_
CERTIFICATE>

<COUNTRY>
<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>
<EXEMPT_REASON>

<COUNTRY>
<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

130

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<EXTERNAL_
COMPANY_ID>

Type
varchar2
(100)

Req?
Yes*

Description
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.
This element may be passed at the batch
level or with each invoice, and is passed
through to the Determination output and the
audit tables.
(*) This element is Required if <COMPANY_
NAME> is not populated.

<FILTER_GROUP_
NAME>

varchar2
(100)

No

The name of the TransEditor Group to be


applied, if different than the company default.

<FILTER_GROUP_
OWNER>

varchar2(30)

No

The name of the company owning the


TransEditor Group specified in <FILTER_
GROUP_NAME>, if different than the
transacting company.

<FISCAL_DATE>

date

No

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)

No

The name of the ERP instance sending the


transaction.
Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

<INCLUSIVE_TAX_
INDICATORS>

structural

No

Contains information on whether to treat


some or all authority taxes for this invoice as
inclusive, regardless of the selected rule.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

131

Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<AUTHORITY_
TYPE>

varchar2
(100)

No

If the authority selected for a transaction


matches the type indicated here, all taxes for
that authority are considered as inclusive.
You can have multiple <AUTHORITY_
TYPE> elements in an <INCLUSIVE_TAX_
INDICATORS> structure.

<FULLY_
INCLUSIVE>

boolean

No

If set to true, indicates that all authorities that


Determination will select for taxing will be
considered as Inclusive Tax. This element
overrides the calculation method set for the
selected rule by forcing inclusive tax.

varchar2(50)

No

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.

<INPUT_RECOVERY_
TYPE>

See <INPUT_RECOVERY_
AMOUNT/PERCENT> for more information.
<INVOICE_DATE>

date

Yes

The date of the invoice. Required.


Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

132

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<INVOICE_NUMBER>

Type
varchar2
(200)

Req?
Yes*

Description
This number is passed through to the audit
tables and acts as a reference in the audit
tables as well as for credit transactions.
(*) Required if <IS_AUDITED> is true.
Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.

<IS_AUDITED>

boolean

No

The audit status; indicates whether a


transaction should be saved to the audit
tables. To avoid having records accidentally
added to the audit record, the default is false.
Valid values are true and false.

<IS_AUDIT_UPDATE>

boolean

No

Indicates whether or not to permit audit table


update instead of overwrite.Updates provide
for "Line at a Time" invoice submissions. The
effect is that a duplicate invoice submission
updates the invoice level record and replaces
any matching line and tax level as determined
by the <LINE_NUMBER>. Any new line
numbers that are submitted will be added to
the existing invoice in the audit tables. Valid
values are true and false.

<IS_AUDITING_
MESSAGES>

boolean

No

This element has been deprecated in favor of


audit-related Configuration parameters.

<IS_BUSINESS_
SUPPLY>

boolean

No

Indicates whether a supply is being used for


business. In Brazilian ICMS and IPI
transactions, whether a supply is being used
for business or not impacts the tax and
reporting requirements of the buyer and the
seller. Valid values are true and false.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

133

Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<IS_CREDIT>

boolean

No

Indicates whether the current transaction is a


credit transaction as identified by your ERP
system. true indicates a credit transaction for
both auditing and reporting purposes. When
set to true, any amounts on the transaction
should be passed in as negative values. Valid
values are true and false.

<IS_EXEMPT>

structural

No

Forces exemption from tax for a line in the


specified jurisdictions. Exemption is different
from zero tax for VAT authorities, as
exemption completely excludes the
transaction from VAT accounting. In the case
of a sale, VAT paid to make the supply cannot
be recovered if the supply is exempt. In Sales
Tax countries such as the US, the exempt
indicator prevents tax from being charged. If
false is explicitly passed the exemption
certificate lookup is suppressed; tax will be
charged even though an apparently valid
certificate may exist in Determination.

<ALL>

boolean

No

Exempt for all locations.

<COUNTRY>

boolean

No

Exempt status at this zone level.

structural

No

Forces no tax for a particular invoice in the


specified jurisdictions. To select all
jurisdictions, set ALL to true. The default is
behavior is (null) which is the same as
explicitly specifying false.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>
<IS_NO_TAX>

Note: If <IS_NO_TAX> is set for a given


level, and an <OVERRIDE_RATE> or
<OVERRIDE_AMOUNT> are specified at
that level, the <IS_NO_TAX> setting is
ignored.
<ALL>

boolean

No

No tax on all lines and jurisdictions on this


invoice.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

134

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<COUNTRY>

Type

Req?

Description

boolean

No

No tax at this zone level.

<GEOCODE>
<IS_REPORTED>

boolean

No

Controls whether the invoice being processed


should be included in reports. An invoice can
be included in the audit tables but restricted
from appearing on VAT and other reports by
passing in (N)o for this element. The default
value is (Y)es.

<IS_REVERSED>

boolean

No

Indicates whether the current transaction is


part of an ERP-initiated reversal process.
Valid values are (Y)es and (N)o.

<IS_ROUNDING>

boolean

No

Indicates that the calling application requires


Determination to return rounded amounts in
the Output XML and save rounded amounts to
the Audit Database. Rounding is performed
within Determination based on the currency
rules or specs applied to the transaction. See
the topic Working with Currencies in Help.
Valid values are false (return un-rounded
amounts) and true (return rounded amounts).
The default is true.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>

Note: Determination always returns unrounded amounts in the


<*_AMOUNT>.<UNROUNDED_*_
AMOUNT> output XML elements. This
element only modifies the behavior of the <*_
AMOUNT> <*_AMOUNT> output XML
elements. For example, <TAX_
AMOUNT>.<UNROUNDED_DOCUMENT_
AMOUNT> will always contain an un-rounded
amount, while <TAX_
AMOUNT>.<DOCUMENT_AMOUNT> will
contain a rounded amount if this parameter is
true and an un-rounded amount if this
parameter is false.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

135

Invoice Level Input XML Elements

Element Name
<IS_
SIMPLIFICATION>

Type
boolean

Req?
No

Description
Indicates an override to any triangulation
simplification determinations. Valid values
are true and false.
If set to true, you must pass registrations in
for the Buyer, Seller, and Middleman in the
transaction or a warning message will be
returned.

<LICENSES>

structural

No

Contains data for one or more licenses


applying to the document.

structural

No

Contains data pertaining to a single license,


consisting of a number-type pair.

<NUMBER>

varchar2
(100)

No

The number of the license to be created.

<TYPE>

varchar2
(100)

No

The type of license to be created.

<NUMBER_
TYPE>

not
applicable

No

A pseudo-tag which enables the getting and


setting a number and type pair within
TransEditors. The format consists of
Name|Type, with the pipe character
separating the license number from license
type.

structural

Yes

The <LINE> and </LINE> elements are


structural. They serve as the container for an
individual line. Each invoice can have multiple
lines.

<CUSTOMER_
LICENSE>

<LINE ID="N">

The ID is an attribute of a line and indicates


the actual line number.
<LOCATION>

structural

No

Specifies a location that you pre-configured


on the Locations page. The seven available
location types are listed below.
Note: Addresses specified in the transaction
override Locations, and Locations specified
override Location Sets.

<BILL_TO>

varchar2(30)

No

Bill To location.

<MIDDLEMAN>

varchar2(30)

No

Middleman location.

<ORDER_
ACCEPTANCE>
<ORDER_ORIGIN>

varchar2(30)

No

Order Acceptance location.

varchar2(30)

No

Order Origin location.

<SHIP_FROM>

varchar2(30)

Ship
From
location.

No

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

136

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name

Type

Req?

<SHIP_TO>

Description

varchar2(30)

Ship To
location.

No

<SUPPLY>

varchar2(30)

No

Supply location.

<LOCATION_SET>

varchar2(60)

No

A named set of pre-defined locations defined


by the <LOCATION> element. Instead of
specifying several locations using the
<LOCATION> element, you can specify all
the locations in a transaction using a single
<LOCATION_SET> element.

<MIDDLEMAN>

structural

No

The Middleman address. The presence of


middleman address data can trigger
triangulation processing in the EU.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<MODE_OF_
TRANSPORT>

varchar2(50)

No

The method of transport. Used for Intrastat


reporting in the EU.

<MOVEMENT_DATE>

date

No

Indicates the date of a movement of goods,


such as via a pipeline, or the data of issue.
Used in rule qualifiers and in date
determination rules.

<MOVEMENT_TYPE>

varchar2
(100)

No

Indicates the type of movement, such as a


pipeline. Used in rule qualifiers and in date
determination rules.

<NATURE_OF_
TRANSACTION_CODE>

varchar2(2)

No

Used in Intrastat reports in all countries in the


EU.

<ORDER_
ACCEPTANCE>

structural

No

The Order Acceptance address.

<ORDER_ORIGIN>

structural

See Address Level Input XML Elements


(page 166) for a description of the individual
elements in this structure.
No

The Order Origin address.


See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<ORIGINAL_
DOCUMENT_ID>

varchar2
(100)

No

The original document id as shown on the


document in the ERP system. Not used in
calculations.

<ORIGINAL_
DOCUMENT_ITEM>

varchar2
(100)

No

The original document item as shown on the


document in the ERP system. Not used in
calculations.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

137

Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<ORIGINAL_
DOCUMENT_TYPE>

varchar2
(100)

No

The original document type as shown on the


document in the ERP system. Not used in
calculations.

<ORIGINAL_
INVOICE_DATE>

date

No

The date of the original invoice. Used in Date


Determination Rules.

<ORIGINAL_
INVOICE_NUMBER>

varchar2
(200)

No

This number enables a credit invoice to be


associated with an original invoice in the audit
tables for reporting purposes.

<ORIGINAL_
MOVEMENT_DATE>

date

No

The date of the original movement. Used in


Date Determination Rules.

<OVERRIDE_AMOUNT>

structural

No

Override Amount allows you to specify an


amount that Determination will use to override
the tax result. The override amount is applied
to a specific authority level such as Country,
State or City. Determination will identify
none, one, or more authorities at the specified
level (effective zone level in XML or effective
tax level in Determination). The specified
amount will apply to all authorities returned
with the transaction. Allocation that may
occur for amount is an override for all
authorities. If no authority is returned, the
override amount is not applied to the
transaction or recorded for the specified
authority level. This same behavior applies
when Override Rate is used.
Note: As a best practice, you must first
calculate normally and then use the returned
authority levels when using the overrides.

<COUNTRY>

number

No

Amount at this zone level.

structural

No

Forces the rate of tax assessed for a


particular invoice for a particular authority.
The override value must be positive.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>
<OVERRIDE_RATE>

Note: <OVERRIDE_AMOUNT>s take


precedence over any configured override
rates.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

138

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<COUNTRY>

Type

Req?

Description

number

No

Rate at this zone level.

varchar2(1)

No

The Point of Title Transfer location. Valid


values are (D)estination, (O)rigin, or (I)n
transit. If no <POINT_OF_TITLE_
TRANSFER> or <DELIVERY_TERMS>
element is passed in at either the Invoice or
Line level, the default for the Invoice is set to
In Transit.

<PORT_OF_ENTRY>

varchar2
(100)

No

The Port of Entry, used for Intrastat reporting


in the EU.

<PORT_OF_LOADING>

varchar2(5)

No

The Port or Airport of Departure; used for


Intrastat reporting in the EU.

<PRODUCT_MAPPING_
GROUP_NAME>

varchar2
(100)

No

The name of the Product Mapping Group that


owns the product cross-reference.

<PRODUCT_MAPPING_
GROUP_OWNER>

varchar2
(100)

No

The company owning the Product Mapping


Group.

<REGIME>

varchar2
(100)

No

The Regime, used for French Intrastat


reports.

<REGISTRATIONS>

structural

No

List of registrations for role.

varchar2(25)

No

Buyer role registrations. Audited if used in


calculation.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>
<POINT_OF_TITLE_
TRANSFER>

<BUYER_ROLE>

Note: When a buyer passes a registration in


the Input XML, other configured registrations
for the company are ignored.
<MIDDLEMAN_
ROLE>

varchar2(25)

No

Middleman role registrations. Audited if used


in calculation.

<SELLER_ROLE>

varchar2(25)

No

Seller role registrations. Audited if used in


calculation.
Note: When a seller passes a registration in
the Input XML, other configured registrations
for the company are ignored.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

139

Invoice Level Input XML Elements

Element Name
<SELLER_PRIMARY>

Type
structural

Req?
No

Description
The seller company's home or primary
address.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<SHIP_FROM>

structural

No

The Ship From address. This address is used


for certain transaction types in several
countries to determine tax and reporting
requirements.
SeeAddress Level Input XML Elements (page
166) for a description of the individual
elements in this structure.

<SHIP_TO>

structural

No

The Ship To address. This address is used for


certain transaction types in several countries
to determine tax and reporting requirements.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<STATISTICAL_
PROCEDURE>

varchar2(6)

No

A statistical indicator used for large


shipments. Used for Intrastat filing purposes
in the EU.

<SUPPLY>

structural

No

The Supply address. Most tax authorities


around the world, including many in the
United States, rely on the supply location as
the central address in determining tax liability
for services transactions.
See Address Level Input XML Elements
(page 166) for a description of the individual
elements in this structure.

<SUPPLY_EXEMPT_
PERCENT>

structural

No

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.
See <INPUT_RECOVERY_
AMOUNT/PERCENT>.

<COUNTRY>

number

No

See above.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

140

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name

Type

Req?

Description

<TAX_CODE>

varchar2(50)

No

An optional code which can be specified in


the transaction to match a Tax Code
specified on a Rule.

<TAX_
DETERMINATION_
DATE>

date

No

The date used in selecting all applicable


system configuration including tax rates and
rules. Overrides any system-determined date.

<TAX_EXCHANGE_
RATE_DATE>

date

No

The date used in selecting currency


conversion data. Overrides any systemdetermined date.

<TAX_POINT_DATE>

date

No

The date the signifies when the liability for tax


arises. Overrides any system-determined
date.

<TAX_TREATMENT>

varchar2
(100)

No

The flag that indicates alternative tax


treatment after Determination performs its
calculation:
l
l
l

D (Deferred).
DI (Deferred Invoice).
DP (Deferred Payment).

For more information, see Deferred Taxes in


Help.
<TITLE_TRANSFER_
LOCATION>

varchar2
(100)

No

A pass-through element indicating where the


location where title transferred for the
associated delivery term.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

141

Invoice Level Input XML Elements

Element Name
<TRANSACTION_
TYPE>

Type
varchar2(2)

Req?
Yes*

Description
The transaction type, which is required to
apply the correct type of taxes to the
transaction. In many countries, there are two
transaction types: Goods and Services. In
EU and other countries, additional transaction
types apply.
Valid types are:
AT - Ancillary Transport Services
CL - Customer Location Services
DS - Default Services
ES - Electronic Services
GS - Goods
IN - Installation Services
IS - Intermediary Service
MV - Movement for Excise
PC - Prime Contracting
PP - Physical Performance
RR - Rental
SI - Supplied and Installed Goods
T1 - Chain Transaction 1
T2 - Chain Transaction 2
TS- Transport Services
WG - Work on Goods
For a complete description of these
transaction types, see Transaction Types in
Help.
(*) This is required on the invoice level only if
it is not specified on the line level.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

142

Tax Calculation XML Elements


Invoice Level Input XML Elements

Element Name
<UNIQUE_INVOICE_
NUMBER>

Type
varchar2
(500)

Req?
No

Description
The unique identifier for this invoice, as
assigned by the ERP system.
Note: Determination supports two audit keys
to enable the lookup of audit records. The two
combinations are as follows:
HOST_SYSTEM
CALLING_SYSTEM_NUMBER
UNIQUE_INVOICE_NUMBER
or
MERCHANT_ID
INVOICE_NUM
INVOICE_DATE
Configuration parameters can modify which
keys are used and in which order.
Note: Unique Invoice Numbers must be
unique within an individual batch of invoices.
To re-process an invoice, include it in another
batch.

<USER_ELEMENT>

structural

No

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, and are
stored in the audit table for reporting
purposes. Each <USER_ELEMENT>
structure contains a single
<NAME>/<VALUE> pair.

<NAME>

varchar2
(200)

No

The name of the user element. Currently


restricted to the values ATTRIBUTE1 through
ATTRIBUTE50.

<VALUE>

varchar2
(200)

No

The value to be passed into Determination's


audit tables and returned to your business
application.

<VAT_GROUP_
REGISTRATION>

varchar2(25)

No

The value of the VAT Group registration


number for the invoice. Used as the primary
way of looking up VAT Registration Groups
during calculation.

<VENDOR_NAME>

varchar2
(100)

No

The vendor's name. If this is a B2B


transaction and the Company is the buyer,
the Company becomes the Customer and the
Vendor becomes the Company for the
transaction.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

143

Invoice Level Input XML Elements

Element Name

Type

<VENDOR_NUMBER>

varchar2
(100)

Req?
No

Description
The vendor's number. If this is a B2B
transaction and the Company is the buyer,
the Company becomes the Customer and the
Vendor becomes the Company for the
transaction.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

144

Tax Calculation XML Elements


Invoice Level Input XML Elements

Tax Type elements and related sub-elements are described separately in this table:
Element Name

Format

Req?

Description

<TAX_TYPE>

structural

No

An override tax type. Tax Type is determined


when the Jurisdiction Location is determined.
Use only to override the automatic tax type for a
transaction:
AC - Acquisition

RS - Rental Sales

CA - Custom Authority
(see Note 1 below)

RU - Rental Use

CA1 - Custom
Authority 1
(see Note 1 below)

SA - Sales

CU - Consumer Use

SI - Standard
Interstate

DS - Distance Sale

SN - Special Rate
(see Note 2 below)

EC - European
Community Sales

STK - Stock

ER -Intra EU Reverse
Charge

TR - Triangulation

ES - Exported Service
EXC - Excise
IC - Intra-Company
IM - Import
IR - International
Reverse Charge
(supplier outside the
EU)
IS - Imported Services
MA - Markup
Adjustment
MP - Markup
Percentage
MVT - Movement
NL - Not Liable
RC - Reverse Charge
or Rental Consumer's
Use

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

S - Standard

TE - Taxable Export
UN - Unregistered
Seller
US - Use
VG - VAT Group
ZC - Zero-rated
Intra-Community
Dispatches within the
European Union (EU)
ZE - Zero-rated
Exports leaving the
EU, or Zero-rated
Exports from non-EU
countries
ZR - Zero-rated Item
(rule specifies rate of
zero)

Tax Calculation XML Elements

145

Invoice Level Input XML Elements

Element Name

Format

Req?

Description

<TAX_TYPE>
continued

structural

No

Some Tax Types are specific to only US or


International transactions. US-only Tax Types
are RC (Rental Consumer's Use) RS and RU.
International-only Tax Types are AC, DS, ES,
IM, IS, RC (Reverse Charge), SN, TE, TR, ZC,
ZE, and ZR.
Note 1: Use CA for most Custom Authority
transactions. If a transaction has two different
Custom Authorities for the Ship From and Ship
To locations, use CA for the Ship From authority
and CA1 for the Ship To authority.
Note 2: Use SN for Brazilian Provincial Special
Rates and Indian Provincial Rates for
unregistered buyers.
For a complete description of tax types, see the
Help topic Tax Types Quick Reference.

<ALL>

varchar2(20)

No

Value for all jurisdictions on this invoice.

<COUNTRY>

varchar2(20)

No

Tax Type at this zone level.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<DISTRICT>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

146

Tax Calculation XML Elements


Line Level Input XML Elements

LINE LEVEL INPUT XML ELEMENTS


The following elements are found in the <INDATA><INVOICE><LINE> structure.
To enable compatibility with previous releases, all elements that require true or
false also support Y and N. The XML Output will always return true or false,
regardless of whether the new- or old-style contents are passed in.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
Element Name

Type

Req?

Description

<ACCOUNTING_CODE>

varchar2
(100)

No

The Accounting Code (or GL Code) passed in


by the ERP system.

<ALLOCATION_
GROUP_NAME>

varchar2
(100)

No

Name of the Allocation Group to use for this


line. Named Allocations will be looked up in
this group.

<ALLOCATION_
GROUP_OWNER>

varchar2
(100)

No

Name of the Company owning the Allocation


Group to use for this line. The named Allocation
Group will be looked up in this company's data.

<ALLOCATION_NAME>

varchar2
(100)

No

Name of the Allocation to use for this line.


Named Allocations will be looked up in the
specified group owned by the specified
company - see above. Company default owner
and group will be used if not specified in the
transaction. Allocations are dated, so the
named version active as of the <INVOICE_
DATE> will be used. If none match, a message
will be added to output indicating an active
named Allocation was not found.
Note: Allocation processing can be overridden
at the line level. See <LINE>.<IS_
ALLOCATABLE> .

<BASIS_PERCENT>

number

No

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.
If this element is provided, it overrides any data
found on a tax rule or exemption certificate
applied to this transaction.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

147

Line Level Input XML Elements

Element Name
<BILL_TO>

Type
structural

Req?
No

Description
The Bill To address.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<BUYER_PRIMARY>

structural

No

The buyer company's home or primary


address.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<CALCULATED_UNIT_
AMOUNT>

number

No

NOTE: This element is typically calculated by


Determination; it should not be populated
except under the circumstances listed in the
description below:
This value is calculated by Determination, and
the element populated, when a rate tier
includes a graduated rate. The calculated
amount is the item value divided by quantity, or
gross amount divided by quantity if item value
does not exist.
For example, an item value of 2400 and a
quantity of 3 would result in a calculated unit
amount of 800. Item value always takes
precedence over gross amount if both are
present in the transaction.
This element should never be populated in the
Input XML. It can be populated by a
TransEditor when one of the following
scenarios is true:
l

The calculation direction is reverse-fromtotal. In this case, the calculated unit


amount is always zero. If a non-zero
value is desired, use a TransEditor to set
the desired value.
The calculation direction is reverse-fromtax and the gross amount is not present.
In this case, the calculated unit amount is
always zero. If a non-zero value is
desired, use a TransEditor to set the
desired value.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

148

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<COMMODITY_CODE>

Type
varchar2(50)

Req?
No

Description
A code that can be assigned to a product by a
particular authority. In the EU, many member
states have moved to using Harmonized
Codes (similar to Commodity Codes) which
can also be stored in this element. Commodity
Codes provide an alternate way (in addition to
product mappings) to match ONESOURCE
Indirect Tax Determination products.
Note: When commodity codes are evaluated
by the calculation engine, it first attempts to
match the full code, and then strips off
characters from the end of the code, one at a
time, until a match is made or no code remains.

<COUNTRY_OF_
ORIGIN>

varchar2
(100)

No

The country where the goods were


manufactured. Used in Intrastat reporting.

<CUSTOMER_GROUP_
NAME>

varchar2
(100)

No

Name of the Customer Group to use for this


transaction. Customers will be looked up in this
group, overriding the settings of the transacting
company's Company Preferences. Note that
the list of valid groups for this element consists
of Customer Groups owned by the transacting
company and its ancestors.

<CUSTOMER_GROUP_
OWNER>

varchar2
(100)

No

Name of the Company owning the Customer


Group to use for this transaction. This
company must be a parent or grandparent of
the transacting company.

<CUSTOMER_NAME>

varchar2
(100)

No

See <INVOICE>.<CUSTOMER_NAME> for


details.

<CUSTOMER_NUMBER>

varchar2
(100)

No

See <INVOICE>.<CUSTOMER_NUMBER>
for details.

<DELIVERY_TERMS>

varchar2
(100)

No

Indicates how goods were shipped and where


title was transferred. Valid values include
Incoterms 2000 codes and any other customerdefined codes.

<DEPT_OF_CONSIGN>

varchar2
(100)

No

Department of consignment. Used in Intrastat


reporting.

<DESCRIPTION>

varchar2
(200)

No

A description of a particular product. This data


is primarily used to retrieve and reference
records from the audit data.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

149

Line Level Input XML Elements

Element Name

Type

Req?

Description

<DISCOUNT_AMOUNT>

number

No

In some situations volume or other discounts


must be taken into account when calculating
tax. For these situations, <DISCOUNT_
AMOUNT> can be used to indicate how much
the <GROSS_AMOUNT> has been
discounted by.

<END_USE>

varchar2
(100)

No

End use of the product. Intended for use by


Rule Qualifiers to govern the applicability of a
rule.

<ESTABLISHMENTS>

structural

No

List of established locations.

structural

No

List of buyer's established locations.

boolean

No

Establishment status for the indicated location


type: true or false.

structural

No

List of middleman's established locations.

<BUYER_ROLE>

<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<MIDDLEMAN_
ROLE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

150

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<SELLER_ROLE>

<BILL_TO>
<BUYER_
PRIMARY>
<MIDDLEMAN>
<ORDER_
ACCEPTANCE>
<ORDER_
ORIGIN>
<SELLER_
PRIMARY>
<SHIP_
FROM>
<SHIP_TO>
<SUPPLY>
<EXEMPT_AMOUNT>

Type

Req?

Description

boolean

No

Establishment for the location type: true or


false.

structural

No

List of seller's established locations.

boolean

No

Establishment for the location type: true or


false.

structural

No

Forces an exempt amount for a transaction in


one or more specified jurisdictions.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

151

Line Level Input XML Elements

Element Name
<COUNTRY>

Type

Req?

Description

number

No

Amount at this zone level.

structural

No

The exemption certificate number, which is


used to look up the specific exemption
certificate for this line.

varchar2
(100)

No

Certificate number at this zone level.

structural

No

Limits the search for an applicable certificate to


ones with this exempt reason (either short code
or long code). Also, if no certificate is found and
auto-create certificates is turned on, the
transaction must have either a valid exempt
reason or certificate number at the address
level at which a given authority is trying to
apply tax.

varchar2(20)

No

Exempt reason at this zone level.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>
<EXEMPT_
CERTIFICATE>
<COUNTRY>
<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>
<EXEMPT_REASON>

<COUNTRY>
<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

152

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<GROSS_AMOUNT>

Type
number

Req?
Yes*

Description
This is the amount that is required to compute
tax in forward calculations (see the invoicelevel input element <CALCULATION_
DIRECTION>).
When you execute reverse calculations, the
value of GROSS_AMOUNT is affected by the
values of two Configuration parameters:
l

Reverse-from-tax: USE_CALC_
GROSS_AMT_AS_GROSS_AMT_
CALC_DIR_R
Reverse-from-total: USE_CALC_
GROSS_AMT_AS_GROSS_AMT_
CALC_DIR_T

If you set the value for these parameters to Y,


Determination inserts the calculated gross
amount into the gross amount XML output
element. For example, if there is no gross
amount in the XML input, the gross amount in
the XML output contains the calculated gross
amount value. If there is a gross amount in the
XML input, then it is replaced by the value of
calculated gross amount in the XML output.
If you accept the default and do not set these
parameters (or set them to N), the gross
amount in the XML output is the value you
provided in the input.
For information about gross amounts
containing non-taxable amounts such as fees,
see the description for <ITEM_VALUE>.
(*) Gross amount is required in forward
calculations, as well as in reverse-from-tax
transactions using tiered rates.
<GROSS_PLUS_TAX>

number

No

This element is used in reverse-from-total


calculations instead of <GROSS_AMOUNT>
and <TAX_AMOUNT> in cases where only the
sum of the two is known. Determination
calculates which portion of the total is tax and
which part is gross, and then distributes the
calculated tax amounts to the appropriate
authorities. See
<INVOICE>.<CALCULATION_
DIRECTION>.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

153

Line Level Input XML Elements

Element Name

Type

<INCLUSIVE_TAX_
INDICATORS>

structural

Req?
No

Description
Contains information on whether to treat some
or all authority taxes for this invoice as
inclusive, regardless of the selected rule.
For more information, see the Inclusive Taxes
topic in Help.

<AUTHORITY_
TYPE>

varchar2
(100)

No

If the authority selected for a transaction


matches the type indicated here, all taxes for
that authority are considered as inclusive. You
can have multiple <AUTHORITY_TYPE>
elements in an <INCLUSIVE_TAX_
INDICATORS> structure.

<FULLY_
INCLUSIVE>

boolean

No

If set to true, indicates that all authorities that


Determination will select for taxing will be
considered as Inclusive Tax. This element
overrides the calculation method set for the
selected rule by forcing inclusive tax.

<INPUT_RECOVERY_
AMOUNT>

number

No

Overrides any Input Recovery Amount


specified by the transaction's rule.

<INPUT_RECOVERY_
PERCENT>

number

No

Overrides the Input Recovery Percentage


specified by the transaction's rule.

<INPUT_RECOVERY_
TYPE>

varchar2(50)

No

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.
See <INPUT_RECOVERY_
AMOUNT/PERCENT> .

<INVOICE_DATE>

date

No

The date of the invoice as stored on this line.

<IS_ALLOCATABLE>

boolean

No

If set to false, no allocation will be applied to


the line, even if one is specified by name for the
Line or at the Invoice level. The default
behavior (null) is true.

<IS_BUSINESS_
SUPPLY>

boolean

No

Indicates whether a supply is being 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. Valid values are true
and false.

<IS_CREDIT>

boolean

No

Indicates whether the current line is a credit as


identified by your ERP system. true indicates
a credit for both auditing and reporting
purposes. When set to true, any amount on the
line should be passed in as a negative value.
Valid values are true and false.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

154

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<IS_EXEMPT>

Type

Req?

Description

structural

No

Forces exemption from tax for a line in the


specified jurisdictions. Exemption is different
from zero tax for VAT authorities, as exemption
completely excludes the transaction from VAT
accounting. In the case of a sale, VAT paid to
make the supply cannot be recovered if the
supply is exempt. In Sales Tax countries such
as the US, the exempt indicator prevents tax
from being charged. If false is explicitly passed
the exemption certificate lookup is suppressed;
tax will be charged even though an apparently
valid certificate may exist in Determination.

<ALL>

boolean

No

Forces exemption from tax for all jurisdictions.

<COUNTRY>

boolean

No

Exemption status at this zone level.

<GEOCODE>
<IS_
MANUFACTURING>

boolean

No

Indicates that the goods or services are for


manufacturing purposes.

<IS_NO_TAX>

structural

No

Forces no tax for a particular invoice in the


specified jurisdictions. To select all
jurisdictions, set ALL to true. The default is
behavior is (null) which is the same as
explicitly specifying false.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>

Note: If <IS_NO_TAX> is set for a given level,


and an <OVERRIDE_RATE> or
<OVERRIDE_AMOUNT> are specified at that
level, the <IS_NO_TAX> setting is ignored.
<ALL>

boolean

No

No tax in all jurisdictions for this line.

<COUNTRY>

boolean

No

No tax at this zone level.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

155

Line Level Input XML Elements

Element Name
<IS_
SIMPLIFICATION>

Type
boolean

Req?
No

Description
Indicates an override to any triangulation
simplification determinations. Valid values are
true and false.
If set to true, you must pass registrations in for
the Buyer, Seller, and Middleman in the
transaction or a warning message will be
returned.

<ITEM_VALUE>

number

No

The total value of all items on this line. This is


distinct from the gross amount because it does
not contain costs such as landed costs,
insurance, freight and other associated costs
that gross amount does contain.
If an item value is present in a transaction, it is
used instead of taxable basis. Item value is
used in many VAT and EU Intrastat reports.

<LICENSES>

structural

No

Contains data for one or more licenses


applying to the document.

<CUSTOMER_
LICENSE>

structural

No

Contains data pertaining to a single license,


consisting of a number-type pair.

<NUMBER>

varchar2
(100)

No

The number of the license to be created.

<TYPE>

varchar2
(100)

No

The type of license to be created.

<NUMBER_TYPE>

not
applicable

No

A pseudo-element which enables the getting


and setting a number and type pair within
TransEditors and Rule Qualifiers. The format is
Name|Type, with the pipe character separating
the license number from license type.

<LINE_NUMBER>

number

Yes

<LINE_NUMBER> is a required element for


each line. Used in combination with
<INVOICE_NUMBER>, it is used to specify
and reference a particular line on a particular
invoice.

<LOCATION>

structural

No

Specifies a location that you pre-configured on


the Locations page. The seven available
location types are listed below. Note:
addresses specified in the transaction override
Locations, and Locations specified override
Location Sets.

<BILL_TO>

varchar2(30)

No

Bill To location.

<MIDDLEMAN>

varchar2(30)

No

Middleman location.

<ORDER_
ACCEPTANCE>

varchar2(30)

No

Order Acceptance location.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

156

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name

Type

Req?

Description

<ORDER_ORIGIN>

varchar2(30)

No

Order Origin location.

MIDDLEMAN_
MARKUP_AMOUNT

number(31,
5)

No

This is a pass-through element either from the


financial system or Determination
TransEditors. It is not used in Determination,
but it is audited and can be used in Reporting.
Set this value to indicate the amount of markup
applied, or should be applied, to the item or line
amount. If you use Allocations, this value is
adjusted per the allocation configuration. This
value can be returned in output XML.

MIDDLEMAN_
MARKUP_RATE

number
(31,10)

No

This is the corresponding rate for the


MIDDLEMAN_MARKUP_AMOUNT (See the
explanation above).

<SHIP_FROM>

varchar2(30)

No

Ship From location.

<SHIP_TO>

varchar2(30)

No

Ship To location.

<SUPPLY>

varchar2(30)

No

Supply location.

<LOCATION_SET>

varchar2(60)

No

A named set of pre-defined locations defined


by the <LOCATION> element. Instead of
specifying several locations using the
<LOCATION> element, you can specify all the
locations in a transaction using a single
<LOCATION_SET> element.

<MASS>

number

No

The Mass of a supply. Used for Intrastat


reporting purposes in the EU.

<MIDDLEMAN>

structural

No

The Middleman address. The presence of


middleman address data can trigger
triangulation processing in the EU.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<MODE_OF_
TRANSPORT>

varchar2(50)

No

The method of transport. Used for Intrastat


reporting in the EU.

<MOVEMENT_DATE>

date

No

Indicates the date of a movement of goods,


such as via a pipeline, or the data of issue.
Used in rule qualifiers and in date determination
rules.

<MOVEMENT_TYPE>

varchar2
(100)

No

Indicates the type of movement, such as a


pipeline. Used in rule qualifiers and in date
determination rules.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

157

Line Level Input XML Elements

Element Name

Type

<ORDER_
ACCEPTANCE>

structural

<ORDER_ORIGIN>

structural

Req?
No

Description
The Order Acceptance address.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

No

The Order Origin address.


See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<ORIGINAL_
DOCUMENT_ID>

varchar2
(100)

No

The original document id as shown on the


document in the ERP system. Not used in
calculations.

<ORIGINAL_
DOCUMENT_ITEM>

varchar2
(100)

No

The original document item as shown on the


document in the ERP system. Not used in
calculations.

<ORIGINAL_
DOCUMENT_TYPE>

varchar2
(100)

No

The original document type as shown on the


document in the ERP system. Not used in
calculations.

<ORIGINAL_
INVOICE_DATE>

date

No

The date of the original invoice. Used in Date


Determination Rules.

<ORIGINAL_
MOVEMENT_DATE>

date

No

The date of the original movement. Used in


Date Determination Rules.

<OVERRIDE_AMOUNT>

structural

No

Override Amount allows you to specify an


amount that Determination will use to override
the tax result. The override amount is applied to
a specific authority level such as Country,
State or City. Determination will identify none,
one, or more authorities at the specified level
(effective zone level in XML or effective tax
level in Determination). The specified amount
will apply to all authorities returned with the
transaction. Allocation that may occur for
amount is an override for all authorities. If no
authority is returned, the override amount is not
applied to the transaction or recorded for the
specified authority level. This same behavior
applies when Override Rate is used.
Note: As a best practice, you must first
calculate normally and then use the returned
authority levels when using the overrides.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

158

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<COUNTRY>

Type

Req?

Description

number

No

Amount at this zone level.

structural

No

Forces the rate of tax assessed for a particular


invoice for a particular authority. The override
value must be positive. Note: <OVERRIDE_
AMOUNT>s take precedence over any
configured override rates.

number

No

Rate at this zone level.

varchar2
(100)

No

The part number used by your ERP system.


This element is stored in the audit tables and
does not affect calculation.

<POINT_OF_TITLE_
TRANSFER>

varchar2(1)

No

The Point of Title Transfer location. Valid


values are (D) - Destination, (O) - Origin, or (I) In transit. If no <POINT_OF_TITLE_
TRANSFER> or <DELIVERY_TERMS>
element is passed in at either the Invoice or
Line level, the default for the Invoice is set to In
Transit.

<PORT_OF_ENTRY>

varchar2
(100)

No

The Port of Entry, used for Intrastat reporting in


the EU.

<PORT_OF_LOADING>

varchar2(5)

No

The Port or Airport of Departure; used for


Intrastat reporting in the EU.

<PRODUCT_CODE>

varchar2
(100)

No

Your ERP system's product code for the


product on this line. Product Codes are
mapped to the Product Tree using Product
Mappings.

<QUANTITIES>

structural

No

Contains a list of analogous quantities differing


in their units of measure.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>
<OVERRIDE_RATE>

<COUNTRY>
<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>
<PART_NUMBER>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

159

Line Level Input XML Elements

Element Name
<QUANTITY>

Type

Req?

Description

structural

No

An individual quantity consisting of an amount


(such as 50) and a unit of measure such as L
(Liters).

<AMOUNT>

number

No

The number of the quantity (for example, 50 for


50 L).

<UOM>

varchar2(25)

No

The unit of measure for the quantity (for


example, KG for 50 L).

<DEFAULT>

boolean

No

Indicates that this quantity should be used as


the default quantity in the transaction when
multiple quantities are specified.

<AMOUNT_
UOM>

not
applicable

No

A pseudo-element which enables the getting


and setting an Amount and Unit of Measure
pair within TransEditors and Rule Qualifiers.
The format consists of AMOUNT|UOM, with
the pipe character separating the amount from
the unit of measure.

<AMOUNT_
UOM_
DEFAULT>

not
applicable

No

A pseudo-element which enables the getting


and setting an Amount, Unit of Measure, and
Default triplet within TransEditors and Rule
Qualifiers. The format consists of
AMOUNT|UOM|DEFAULT, with the pipe
character separating the elements DEFAULT
is either true or false.

<REGIME>

varchar2
(100)

No

The Regime, used for French Intrastat reports.

<REGISTRATIONS>

structural

No

List of registrations for role.

varchar2(25)

No

Buyer role registrations. Audited if used in


calculation.

<BUYER_ROLE>

Note: When a buyer passes a registration in


the Input XML, other configured registrations
for the company are ignored.
<MIDDLEMAN_
ROLE>

varchar2(25)

No

Middleman role registrations. Audited if used in


calculation. For an explanation of this
treatment, see the Registration Numbers in
XML Input topic in Help.

<SELLER_ROLE>

varchar2(25)

No

Seller role registrations. Audited if used in


calculation.
Note: When a seller passes a registration in
the Input XML, other configured registrations
for the company are ignored.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

160

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<SELLER_PRIMARY>

Type
structural

Req?
No

Description
The seller company's home or primary
address.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<RELATED_LINE_
NUMBER>

number

No

Identifies that this line should have the same


tax treatment as the product on the related line.

<SHIP_FROM>

structural

No

The Ship From address.


See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<SHIP_TO>

structural

No

The Ship To address.


See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<SUPPLEMENTARY_
UNIT>

varchar2(5)

No

The size of a supply. For Intrastat reports in the


EU, some commodities require an additional
measuring unit other than or in addition to mass
for reporting purposes. EU rules determine the
unit to be used for various supplies.

<SUPPLY>

structural

No

The Supply address. Most tax authorities


around the world, including many in the United
States, rely on the supply location as the
central address in determining tax liability for
services transactions.
See Address Level Input XML Elements (page
166) for a description of the individual elements
in this structure.

<SUPPLY_EXEMPT_
PERCENT>

structural

No

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.
See <INPUT_RECOVERY_
AMOUNT/PERCENT>for more information.

<COUNTRY>

number

No

See above.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

161

Line Level Input XML Elements

Element Name

Type

Req?

Description

<TAX_AMOUNT>

number

No

When reverse-from-tax calculations are run,


you provide this amount so Determination can
determine how to spread the tax amounts
across the authorities. Also, it computes a
calculated gross amount. See the invoice-level
input element <CALCULATION_
DIRECTION>.

<TAX_CODE>

varchar2(50)

No

An optional code which can be specified in the


transaction to match a Tax Code specified on a
Rule.

<TAX_
DETERMINATION_
DATE>

date

No

The date used in selecting all applicable


system configuration including tax rates and
rules. Overrides any Determination-calculated
date.

<TAX_EXCHANGE_
RATE_DATE>

date

No

The date used in selecting currency conversion


data. Overrides Determination-calculated date.

<TAX_POINT_DATE>

date

No

The date the signifies when the liability for tax


arises. Overrides any Determination-calculated
date.

<TAX_TREATMENT>

varchar2
(100)

No

The flag that indicates alternative tax treatment


after Determination performs its calculation:
l
l
l

D (Deferred).
DI (Deferred Invoice).
DP (Deferred Payment).

For more information, see Deferred Taxes in


Help.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

162

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<TAX_TYPE>

Type
structural

Req?
No

Description
An override tax type. Tax Type is determined
when the Jurisdiction Location is determined.
Use only to override the automatic tax type for
a transaction:
AC - Acquisition

RS - Rental Sales

CA - Custom Authority
(see Note 1 below)

RU - Rental Use

CA1 - Custom
Authority 1
(see Note 1 below)

SA - Sales

CU - Consumer Use

SI - Standard
Interstate

DS - Distance Sale

SN - Special Rate
(see Note 2 below)

EC - European
Community Sales

STK - Stock

ER -Intra EU Reverse
Charge
ES - Exported Service

TE - Taxable
Export
TR - Triangulation

EXC - Excise

UN - Unregistered
Seller

IC - Intra-Company

US - Use

IM - Import

VG - VAT Group

IR - International
Reverse Charge
(supplier outside the
EU)

ZC - Zero-rated
Intra-Community
Dispatches within
the European
Union (EU)

IS - Imported Services
MA - Markup
Adjustment
MP - Markup
Percentage
MVT - Movement
NL - Not Liable
RC - Reverse Charge
or Rental Consumer's
Use

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

S - Standard

ZE - Zero-rated
Exports leaving the
EU, or Zero-rated
Exports from nonEU countries
ZR - Zero-rated
Item (rule specifies
rate of zero)

Tax Calculation XML Elements

163

Line Level Input XML Elements

Element Name
<TAX_TYPE>
continued

Type
structural

Req?
No

Description
Some Tax Types are specific to only US or
International transactions. US-only Tax Types
are RC (Rental Consumer's Use) RS and RU.
International-only Tax Types are AC, DS, ES,
IM, IS, RC (Reverse Charge), SN, TE, TR,
ZC, ZE, and ZR.
Note 1: Use CA for most Custom Authority
transactions. If a transaction has two different
Custom Authorities for the Ship From and Ship
To locations, use CA for the Ship From
authority and CA1 for the Ship To authority.
Note 2: Use SN for Brazilian Provincial
Special Rates and Indian Provincial Rates for
unregistered buyers.
For a complete description of tax types, see
the Help topic Tax Types Quick Reference.

<ALL>

varchar2(20)

No

Sets tax type on all jurisdictions for this line.

<COUNTRY>

varchar2(20)

No

Tax type at this zone level.

varchar2(1)

No

A pass-through element used in conjunction


with the <DELIVERY_TERMS> element to
enable meeting the "named place" requirement
for the point of title transfer as defined by ICC
Incoterms.

<PROVINCE>
<STATE>
<COUNTY>
<CITY>
<POSTCODE>
<GEOCODE>
<TITLE_TRANSFER_
LOCATION>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

164

Tax Calculation XML Elements


Line Level Input XML Elements

Element Name
<TRANSACTION_
TYPE>

Type
varchar2(2)

Req?
Yes*

Description
The transaction type, which is required to apply
the correct type of taxes to the transaction. In
many countries, there are two transaction
types: Goods and Services. In EU and other
countries, additional transaction types apply.
Valid types are:
AT - Ancillary Transport Services
CL - Customer Location Services
DS - Default Services
ES - Electronic Services
GS - Goods
IN - Installation Services
IS - Intermediary Service
MV - Movement for Excise
PC - Prime Contracting
PP - Physical Performance
RR - Rental
SI - Supplied and Installed Goods
T1 - Chain Transaction 1
T2 - Chain Transaction 2
TS- Transport Services
WG - Work on Goods
For a complete description of these transaction
types, see the Help topic Transaction Types.
(*) This is required on the line level only if it is
not specified on the invoice level.

<UNIQUE_LINE_
NUMBER>

varchar2
(100)

No

The ERP system's primary key for this line


number.

<UNIT_OF_MEASURE>

varchar2(25)

No

A description of the unit of measure used to


match a Rule's specified Unit of Measure.
Note: The ampersand character (&) cannot be
used in a unit of measure.
Warning: To take advantage of
Determination's built-in Units of Measures and
Conversion Factors, use the <QUANTITIES>
structure instead.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

165

Line Level Input XML Elements

Element Name
<USER_ELEMENT>

Type

Req?

Description

structural

No

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
TransEditors to enable custom tax
calculations. Each <USER_ELEMENT>
structure contains a single
<NAME>/<VALUE> pair.

<NAME>

varchar2
(200)

No

The name of the user element. Currently


restricted to the values ATTRIBUTE1 through
ATTRIBUTE50.

<VALUE>

varchar2
(200)

No

The value to be passed into Determination's


audit tables and returned to your business
application.

<VAT_GROUP_
REGISTRATION>

varchar2(25)

No

The value of the VAT Group registration


number for the line. Used as the primary way of
looking up VAT Registration Groups during
calculation.

<VENDOR_NAME>

varchar2
(100)

No

The vendor's name. If this is a B2B transaction


and the Company is the buyer, the Company
becomes the Customer and the Vendor
becomes the Company for the transaction.

<VENDOR_NUMBER>

varchar2(20)

No

The vendor's number. If this is a B2B


transaction and the Company is the buyer, the
Company becomes the Customer and the
Vendor becomes the Company for the
transaction.

<VENDOR_TAX>

number

No

The amount of tax charged by the Vendor on an


Accounts Payable invoice.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

166

Tax Calculation XML Elements


Address Level Input XML Elements

ADDRESS LEVEL INPUT XML ELEMENTS


The following elements are contained in the Invoice and Line level address structures for the
nine location types supported by ONESOURCE Indirect Tax Determination (Bill To, Buyer
Primary, Middleman, Order Acceptance, Order Origin, Seller Primary, Ship From, Ship To, and
Supply).
For all levels other than Geocode and Branch ID, you can submit either a full name or a valid
ISO, 2 Character, or 3 Character code that is associated with a valid Zone name in
ONESOURCE Indirect Tax Determination. These codes can be viewed on the Zones Edit page
for the associated Zone.
For Geocode and Branch ID you must submit the full name.
Element
Name
<COUNTRY>

Type

Description

varchar2
(50)

Country

<PROVINCE>

varchar2
(50)

Province, or non-US state.

<STATE>

varchar2
(50)

State

<COUNTY>

varchar2
(50)

County

<CITY>

varchar2
(50)

City

<DISTRICT>

varchar2
(50)

District

<POSTCODE>

varchar2
(50)

The Postal or Zip Code For US ZIP Codes, the first 5 digits.

<GEOCODE>

varchar2
(50)

Geocode (the most granular geographic division) For US ZIP Codes, the
+4 portion of the code.

<IS_
BONDED>

varchar2
(1)

If set to (Y)es, indicates that this is a Bonded Warehouse. This status


can then be used as a rule qualifier during rule selection.

Defaults to US if the US_DEFAULT_COUNTRY configuration


parameter is set to Y on the page. Otherwise, COUNTRY is a
REQUIRED element in the address block. Accepts full country names
up to 50 characters.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

167

Address Level Input XML Elements

Element
Name

Type

Description

<LOCATION_
TAX_
CATEGORY>

varchar2
(100)

Indicates the type of location for this address; for example, Refinery.
This value can then be used as a rule qualifier during rule selection.

<COMPANY_
BRANCH_ID>

varchar2
(25)

The branch ID of a company, passed with registration numbers for VAT


Returns in several countries. For example, in the UK, companies must
file their VAT Returns with Branch ID information included.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

168

Tax Calculation XML Elements


Batch Level Output XML Elements

BATCH LEVEL OUTPUT XML ELEMENTS


The following elements are found in the <OUTDATA> structure.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
Element Name
<REQUEST_STATUS>

Type

Audited?

Description

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. All invoices must process
successfully for this tag to be set to true.

<IS_PARTIAL_
SUCCESS>

boolean

No

Indicates whether the request was partially


successful. At least one invoice, but not
all, must process successfully for this tag
to be set to true.

<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.

string

No

The severe error's code.

string

No

The severe error's description.

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.

<COMPANY_ID>

number

No

The internal Determination ID of the


merchant.

<COMPANY_NAME>

varchar2
(100)

Yes

The name of the company running the


transaction. ONESOURCE Indirect Tax
Determination uses this element to apply
the correct company-specific settings for
the transaction. Returned if EXTERNAL_
COMPANY_ID is not populated.

<CODE>
<DESCRIPTION>
<ERROR_
LOCATION_
PATH>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

169

Batch Level Output XML Elements

Element Name

Type

Audited?

Description

<COMPANY_ROLE>

varchar2(1)

Yes

The company's role as a buyer, seller, or


middleman for this transaction. Each have
different tax and reporting requirements for
any transaction.

<EXTERNAL_
COMPANY_ID>

varchar2
(100)

No

The unique identifier used by your


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

<HOST_REQUEST_
INFO>

structural

No

Contains pass-through elements used to


identify the originating request from the
ERP source.

varchar2
(100)

No

A pass-through element used to identify


the document with the originating request
from the ERP source.

structural

N/A

A message related to this batch. There can


be multiple MESSAGE elements returned
with each batch.

<HOST_REQUEST_
ID>
<MESSAGE>

For a complete description of this


structure, see Message Level Output XML
Elements (page 184).
<SCENARIO_NAME>

varchar2
(100)

No

This is the name of the Determination


Workbench scenario.

<INVOICE>

structural See the


Invoice
Elements
table.

N/A

The INVOICE and /INVOICE elements are


structural. They serve as the container for
an individual invoice. Each batch can
contain multiple invoices.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

170

Tax Calculation XML Elements


Invoice Level Output XML Elements

INVOICE LEVEL OUTPUT XML ELEMENTS


The following elements are found in the <OUTDATA><INVOICE> structure.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
Element Name
<REQUEST_STATUS>

Type

Audited?

Description

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.
Note: For invoices which are processed as
a unit (not "line-at-a-time", this element will
always return false.

<ERROR>

<CODE>
<DESCRIPTION>
<ERROR_
LOCATION_
PATH>

<BASIS_PERCENT>

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.

string

No

The severe error's code.

string

No

The severe error's description.

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.

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.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

171

Invoice Level Output XML Elements

Element Name
<CALCULATION_
DIRECTION>

Type
varchar2(1)

Audited?
Yes

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

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. ONESOURCE Indirect
Tax Determination also computes a
calculated gross amount.
Reverse-from-total (T): This uses
<TAX_PLUS_GROSS> (and
optionally GROSS_AMOUNT) to
determine the tax amount and how it
should be distributed across
authorities. ONESOURCE Indirect
Tax 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. ONESOURCE Indirect Tax
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.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

172

Tax Calculation XML Elements


Invoice Level Output XML Elements

Element Name

Type

Audited?

Description

<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


ONESOURCE Indirect Tax Determination
to search for exemption certificates that
are relevant to a transaction, or to autocreate customers or certificates if the
system is so configured.

<CUSTOMER_NUMBER>

varchar2
(100)

Yes

The customer's number. This data is used


by ONESOURCE Indirect Tax
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 ONESOURCE Indirect
Tax 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.


Warning: 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.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

173

Invoice Level Output XML Elements

Element Name

Type

Audited?

Description

<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 (page 176)

<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 (page 184).

<MIN_ACCOUNTABLE_
UNIT>

number

Yes

The smallest unit of measure used for the


transaction currency. From TB_
CURRENCIES table.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

174

Tax Calculation XML Elements


Invoice Level Output XML Elements

Element Name

Type

Audited?

Description

<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>
<UNIQUE_INVOICE_
NUMBER>

number

No

The total tax amount for the invoice.

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.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

175

Invoice Level Output XML Elements

Element Name
<USER_ELEMENT>

Type

Audited?

Description

structural

N/A

A structure that enables companies to


submit, and have returned, user-defined
elements that are not directly supported in
ONESOURCE Indirect Tax
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 ONESOURCE Indirect Tax
Determination in the Input XML.

<VALUE>

varchar2
(200)

Yes

The value to be passed into


ONESOURCE Indirect Tax
Determination's audit tables and returned
to your business application. This was
passed into ONESOURCE Indirect Tax
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.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

176

Tax Calculation XML Elements


Line and Allocation Line Level Output XML Elements

LINE AND ALLOCATION LINE LEVEL OUTPUT XML


ELEMENTS
The following elements are found in the <OUTDATA><INVOICE><LINE> and
<OUTDATA><INVOICE><LINE><ALLOCATION_LINE> structures.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
Element Name

Type

Audited?

Description

<ALLOCATION_LINE_
ID="N">

structural includes all


line-level
elements as
shown in this
section

Yes

The ALLOCATION_LINE and


/ALLOCATION_LINE elements are
structural. They serve as the container for
an individual allocation line. Each invoice
can have multiple lines. The ID indicates the
actual allocation line number. Note that each
allocation line contains elements as shown
in the rest of this section.

<ALLOCATION_NAME>

varchar2
(100)

Yes

Name of the Allocation used in this


transaction.

<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.

<BILL_TO_BRANCH_
ID>

varchar2(25)

Yes

Line or invoice bill-to branch ID if either is


not empty.

<COMMODITY_CODE>

varchar2(50)

Yes

A number or string that can be assigned to a


product by a particular authority. In the EU,
many member states have moved to using
Harmonized Codes (similar to Commodity
Codes) which can also be stored in this
element.

<COUNTRY_OF_
ORIGIN>

varchar2
(100)

Yes

The country where the goods were


manufactured. Used in Intrastat reporting.

<CUSTOMER_NAME>

varchar2
(100)

Yes

The customer name associated with this


line.

<CUSTOMER_NUMBER>

varchar2
(100)

Yes

The customer number associated with this


line.

<DELIVERY_TERMS>

varchar2
(100)

Yes

Indicates how goods were shipped and


when title was transferred.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

177

Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<DEPT_OF_CONSIGN>

varchar2
(100)

Yes

Department of consignment. Used in


Intrastat reporting.

<DESCRIPTION>

varchar2
(200)

Yes

A description of a particular product. This


data is primarily used to retrieve and
reference records from the audit data.

<DISCOUNT_AMOUNT>

number

Yes

In some situations volume or other


discounts must be taken into account when
calculating tax. For these situations,
<DISCOUNT_AMOUNT> can be used to
indicate how much the <GROSS_
AMOUNT> has been discounted by.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

178

Tax Calculation XML Elements


Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<GROSS_AMOUNT>

number

No

This is the amount that is required to


compute tax in forward calculations (see the
invoice-level input element
<CALCULATION_DIRECTION>).
When you execute reverse calculations, the
value of GROSS_AMOUNT is affected by
the values of two Configuration parameters:
l

Reverse-from-tax: USE_CALC_
GROSS_AMT_AS_GROSS_AMT_
CALC_DIR_R
Reverse-from-total: USE_CALC_
GROSS_AMT_AS_GROSS_AMT_
CALC_DIR_T

If you set the value for these parameters to


Y, ONESOURCE Indirect Tax
Determination inserts the calculated gross
amount into the gross amount XML output
element. For example, if there is no gross
amount in the XML input, the gross amount
in the XML output contains the calculated
gross amount value. If there is a gross
amount in the XML input, then it is replaced
by the value of calculated gross amount in
the XML output.
If you accept the default and do not set
these parameters (or set them to N), the
gross amount in the XML output is the value
you provided in the input.
NOTE: Gross amount is required in forward
calculations, as well as in reverse-from-tax
transactions using tiered rates.
For information about gross amounts
containing non-taxable amounts such as
fees, see the description for <ITEM_
VALUE>.
<INPUT_RECOVERY_
TYPE>

varchar2(2)

Yes

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.
See <INPUT_RECOVERY_
AMOUNT/PERCENT> for more
information.

<INVOICE_DATE>

date

Yes

The invoice date related to this individual


line.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

179

Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<IS_BUSINESS_
SUPPLY>

boolean

Yes

Indicates whether a supply is being 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.

<ITEM_VALUE>

number

Yes

The value of an item. This is distinct from


the gross amount because it does not
contain costs such as landed costs,
insurance, freight and other associated
costs that gross amount contains. Item
value is used in many VAT and EU Intrastat
reports.

<LINE_NUMBER>

number

Yes

The line number for the current line in the


output. It correlates to a line number that
was passed into ONESOURCE Indirect
Tax Determination.

<MASS>

number

Yes

The Mass of a supply. Used for Intrastat


reporting purposes in the EU.

<MESSAGE>

structural

No

A message related to this line. There can be


multiple <MESSAGE> elements returned
with each line.

<MIDDLEMAN_
BRANCH_ID>

varchar2(25)

Yes

Line or invoice middleman branch ID if either


is not empty.

<MODE_OF_
TRANSPORT>

varchar2(50)

Yes

The method of transport. Used for Intrastat


reporting 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 original document date as shown on the


document in the ERP system. Not used in
calculations.

<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 original movement date as shown on


the document in the ERP system. Not used
in calculations.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

180

Tax Calculation XML Elements


Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<PART_NUMBER>

varchar2
(100)

Yes

The part number used by the referring


application. This element is stored in the
audit tables and does not affect calculation.

<POINT_OF_TITLE_
TRANSFER>

varchar2(3)

Yes

The Point of Title Transfer location passed


through from the Input XML.

<PORT_OF_ENTRY>

varchar2
(100)

Yes

The port of entry. Used for Intrastat reporting


in the EU.

<PORT_OF_LOADING>

varchar2(5)

Yes

The Port or Airport of Departure; used for


Intrastat reporting in the EU.

<REGIME>

varchar2
(100)

Yes

The Regime, used for French Intrastat


reports.

<RELATED_LINE_
NUMBER>
<SHIP_FROM_
BRANCH_ID>

number

No

The related line number from the Input XML.

varchar2(25)

Yes

Line or invoice ship from branch ID if either


is not empty.

<SHIP_FROM_
COUNTRY>

varchar2
(100)

Yes

Line or invoice ship from country if either is


not empty.

<SHIP_TO_BRANCH_
ID>

varchar2(25)

Yes

Line or invoice ship to branch ID if either is


not empty.

<SHIP_TO_COUNTRY>

varchar2
(100)

Yes

Line or invoice ship to country if either is not


empty.

<SUPPLEMENTARY_
UNIT>

varchar2(5)

Yes

The size of a supply. For Intrastat reports in


the EU, some commodities require an
additional measuring unit other than or in
addition to mass for reporting purposes. EU
rules determine the unit to be used for
various supplies.

<SUPPLY_BRANCH_
ID>

varchar2(25)

Yes

Line or invoice supply branch ID if either is


not empty.

<TAX>

structural

No

A single tax that applies to this line item.


There can be multiple <TAX> structures for
each line.
Note: <TAX> structures are only returned
for a given Authority if a Tax Rule for that
Authority was used when tax was
calculated.

<TAX_CODE>

varchar2(50)

Yes

The tax code is optionally passed in the


Input XML or may have been set by a
TransEditor.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

181

Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<TAX_SUMMARY>

structural

Yes

A summary of tax amounts and warnings.


The tax summary is passed in the Input
XML and includes line-level data elements:
<TAXABLE_BASIS>
<NON_TAXABLE_BASIS>
<EXEMPT_AMOUNT>
<TAX_RATE>
<EFFECTIVE_TAX_RATE>
<ADVISORIES>

<TAXABLE_
BASIS>

number
(converted
currency)

Yes

Contains the maximum taxable basis from


the amount on the authority tax lines. If an
authority tax line is a tier, all tiers for the
authority have their tax basis summed and
treated like a single tax line for purposes of
determining the maximum taxable basis.
If the total exceeds gross amount, the
taxable basis is set to the gross amount.
If no tax results, the value is zero.

<NON_TAXABLE_
BASIS>

number
(converted
currency)

Yes

Contains the maximum non-taxable basis


from the tax results. No special process
occurs for tiered results. If no tax results,
the value is zero.

<EXEMPT_
AMOUNT>

number

Yes

Contains the maximum exempt amount


from the tax results. If no tax, the value is
zero.

<TAX_RATE>

number

Yes

Sum of all taxes. No distinction is made for


rates from tiers. If all taxes are fees, the
value is zero.

<EFFECTIVE_
TAX_RATE>

number

Yes

Total taxes on the line divided by the


maximum taxable basis.

<ADVISORIES>

structural

Yes

Notify you of special summary conditions


that may produce unexpected results. List of
flagged conditions you may want to be
aware, including:
l
l
l
l
l
l

<TOTAL_TAX_
AMOUNT>

number

No

Allocations
Custom Authorities
Fees
Tiers
Variable Exempt Amounts
Tax Treatment

The total tax amount for this line item.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

182

Tax Calculation XML Elements


Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<TITLE_TRANSFER_
LOCATION>

varchar2(1)

No

A pass-through element used in conjunction


with the <DELIVERY_TERMS> element to
enable meeting the "named place"
requirement for the point of title transfer as
defined by ICC Incoterms.

<TRANSACTION_
TYPE>

varchar2(2)

Yes

The transaction type, which is required to


apply the correct type of taxes to the
transaction. In most countries, there are two
transaction types: goods and services. In
the EU, there are many transaction types.
For example, in Europe, a supplied and
installed transaction will have different
reporting and tax requirements than a normal
goods transaction. Valid types are:
AT - Ancillary Transport Services
CL - Customer Location Services
DS - Default Services
ES - Electronic Services
GS - Goods
IN - Installation Services
IS - Intermediary Service
MV - Movement for Excise
PC - Prime Contracting
PP - Physical Performance
RR - Rental
SI - Supplied and Installed Goods
T1 - Chain Transaction 1
T2 - Chain Transaction 2
TS- Transport Services
WG - Work on Goods
For a complete description of these
transaction types, see the Help topic
Transaction Types.

<UNIQUE_LINE_
NUMBER>

varchar2
(100)

Yes

The ERP system's primary key for this line


number.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

183

Line and Allocation Line Level Output XML Elements

Element Name

Type

Audited?

Description

<USER_ELEMENT>

structural

No

A structure that enables companies to


submit, and have returned, user-defined
elements that are not directly supported in
ONESOURCE Indirect Tax 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 ONESOURCE Indirect Tax
Determination in the Input XML.

<VALUE>

varchar2
(200)

Yes

The value to be passed into ONESOURCE


Indirect Tax Determination's audit tables
and returned to your business application.
This was passed into ONESOURCE
Indirect Tax 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 line.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

184

Tax Calculation XML Elements


Message Level Output XML Elements

MESSAGE LEVEL OUTPUT XML ELEMENTS


The following message structure is found within the Batch, Invoice, Line, and Tax level output
structures. Multiple message structures can be returned at each level.
In the table, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>
Element Name
<MESSAGE>

Type

Audited?

Description

structural

N/A

A message related to this batch. There can


be multiple MESSAGE elements returned
with each batch.

<LOCATION>

varchar2
(100)

No

Returns information about the location at


which the message occurred. Used for
debugging only.

<CATEGORY>

varchar2(40)

No

Specifies the category of the message.

<CODE>

varchar2(50)

No

The message's code. Generally the


message code is used by business
applications to identify the event that
occurred.

<MESSAGE_TEXT>

varchar2
(1000)

No

The actual message, containing detailed


information about the event that occurred.

<SEVERITY>

varchar2(10)

No

The message's severity level: returns 0 for


informational messages (such as
Successful Processing), 1 for warnings
(errors that do not terminate processing),
and 2 for fatal errors that terminate
processing. Determination lets you set the
severity of different errors and display
either only level 2, level 1 and 2, or level 0,
1, and 2 errors.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

185

Tax Level Output XML Elements

TAX LEVEL OUTPUT XML ELEMENTS


The following elements are found in the <OUTDATA><INVOICE><LINE><TAX> and
<OUTDATA><INVOICE><LINE><ALLOCATION_LINE><TAX> structures.
In the table, dependency is shown by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>

Descriptions
Element Name
<ADDRESS_TYPE>

Type
varchar2(50)

Audited?
No

Description
Indicates the address type (for example,
'SHIP_FROM', 'BILL_TO') which
resulted in this tax.
Values returned in this field include:
l
l
l
l
l
l
l
l
l

SF (SHIP_FROM)
ST (SHIP_TO)
OO (ORDER_ORIGIN)
OA (ORDER_ACCEPTANCE)
BT (BILL_TO)
SU (SUPPLY)
MM (MIDDLEMAN)
SC (SELLER_PRIMARY)
BC (BUYER_PRIMARY)

<ADMIN_ZONE_LEVEL>

varchar2(50)

Yes

The zone level in which the tax is actually


administered. For example, many US
states administer both state and county
taxes.

<AUTHORITY_
CURRENCY_CODE>
<AUTHORITY_FIPS>

varchar2(3)

Yes

The currency code used by the authority.

varchar2(50)

Yes

The FIPS Code associated with a US


authority.

<AUTHORITY_NAME>

varchar2
(100)

Yes

The name of the current authority for


which data is being returned.

<AUTHORITY_
OFFICIAL_NAME>

varchar2
(100)

Yes

The official name of the current authority


for which data is being returned, if it
differs from the Determination-provided
authority name.

<AUTHORITY_
CATEGORY>

varchar2
(100)

Yes

The category of the current authority for


which data is being returned. From the
Authorities Edit page.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

186

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name

Type

Audited?

Description

<AUTHORITY_UUID>

varchar2(36)

Yes

Unique identifier of the current authority


being returned. Determined by
Determination default data.

<AUTHORITY_TYPE_
NAME>

varchar2
(100)

Yes

The type of authority. Returned value is


one of:
l

City Rental, City Sales/Use,


County Rental, County Sales/Use,
District Rental, District Sales/Use,
EXC, State Rental, State
Sales/Use (US)

CST, DPH, EXC, GCT, GIT, GST,


HST, ICMS, IGIC, IGV, IMI, IPI,
IPSI, ISS, IST, ISV, ITBIS, ITBM,
IVA, KDV, MOT, MVA, MWST,
PIS, PST, PVM, QST, ST, TVA,
VAT (INTL).

<AUTHORITY_TYPE_
ALIAS_NAME>

varchar2
(100)

N/A

This is an alternative name for an


authority type name that can be set in
TransEditors.

<AUTHORITY_
ATTRIBUTE>

structural

N/A

A structure containing Rule Output


name/value pairs.

<NAME>

varchar2
(100)

Yes

The name of a rule output identifier.

<VALUE>

varchar2
(100)

Yes

The value of a rule output identifier.

<BASIS_PERCENT>

number

Yes

A percentage of the gross amount of the


line used in tax calculation.

<BUYER_
REGISTRATION>

varchar2(25)

Yes

Buyer registration number used by this


tax calculation. Derived from registration
found in input XML or from value in
database.

<CALCULATION_
METHOD>

varchar2(50)

Yes

Text identifying the behavior of the


calculation algorithm. From the property
on the rule applied for this tax.

<COMMENT>

varchar2
(2000)

Yes

The optional comment from the rule


which was applied for this tax.

<CURRENCY_
CONVERSION_STEPS>

structural

No

Structural element containing information


about any currency conversions taking
place to generate this tax result, including
any intermediary conversions.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

187

Tax Level Output XML Elements

Element Name
<CONVERSION_
STEPS>
<CONVERSION_
STEP>
<FROM_
CURRENCY_
CODE>
<TO_
CURRENCY_
CODE>
<EXCHANGE_
RATE>

Type

Audited?

Description

structural

No

Structural element containing the


individual currency steps.

number

Yes

The step number (1 or 2).

varchar2(3)

Yes

The currency code of the currency from


which the conversion took place.

varchar2(3)

Yes

The currency code of the currency to


which the conversion took place.

number

Yes

The actual exchange rate.

<EXCHANGE_RATE_
DATE>

date

Yes

The date used to determine the exchange


rate using any specified date
determination rules.

<EXCHANGE_RATE_
SOURCE>

varchar2
(100)

Yes

The exchange rate source used in this


currency conversion.

<EFFECTIVE_ZONE_
LEVEL>

varchar2(50)

Yes

The zone level in which the tax logically


applies. If a US state administers both
state and county taxes, the effective tax
level defines who the tax is being
collected for regardless of who is
administering it.

<ERP_TAX_CODE>

varchar2
(200)

Yes

A default tax code to be used by the ERP


system if the rule does not return an
Oracle tax code.

<EU_TRANSACTION>

boolean

Yes

Indicates whether this tax result was


generated by an EU authority or not.
Valid values are true and false.

<EXEMPT_AMOUNT>

structural

No

The amount of gross not liable for this


tax, in authority and document
currencies, in rounded and unrounded
amounts.
Note: See also the <IS_ROUNDING>
Invoice Input XML element. When set to
false, all amounts in this structure are
unrounded. When set to true or null
(default), amounts are
rounded/unrounded as described.

<AUTHORITY_
AMOUNT>

number

Yes

The amount of gross not liable for this


tax, rounded, in the authority currency.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

188

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name

Type

Audited?

Description

<DOCUMENT_
AMOUNT>

number

Yes

The amount of gross not liable for this


tax, rounded, in the document currency.

<UNROUNDED_
AUTHORITY_
AMOUNT>

number

Yes

The amount of gross not liable for this


tax, unrounded, in the authority currency.

<UNROUNDED_
DOCUMENT_
AMOUNT>

number

This element returns 10 digits after the


decimal point.
Yes

The amount of gross not liable for this


tax, unrounded, in the document
currency.
This element returns 10 digits after the
decimal point.

<EXEMPT_
CERTIFICATE>

varchar2
(100)

Yes

The exempt certificate number applied to


this tax result.

<EXEMPT_
CERTIFICATE_
EXPIRE_DATE>
<EXEMPT_REASON>

date

Yes

The expiration date of the exemption


certificate applied to this tax result.

varchar2
(100)

Yes

The exempt reason code that was used


to select the tax rule resulting in this tax.

<FEE>

structural

No

This structural element contains the feerelated elements for tax authorities.

<AMOUNT>

number(31,5)

No

The fee amount.

<CURRENCY_CODE>

varchar2(3)

No

The currency code for the fee.

<UNIT_OF_
MEASURE>

varchar2
(100)

No

The unit of measure for the fee. The


default is Each.

<FISCAL_ADDRESS_1>

varchar2
(100)

Yes

The first address line of the fiscal


representative associated with the
registration number for the company
running the transaction. For example: If
the role is S this data is associated with
the <SELLER_REGISTRATION>.

<FISCAL_ADDRESS_2>

varchar2
(100)

Yes

The second address line of the fiscal


representative associated with the
registration number for the company
running the transaction. For example: If
the role is S this data is associated with
the <SELLER_REGISTRATION>.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

189

Tax Level Output XML Elements

Element Name

Type

Audited?

Description

<FISCAL_REP_
CONTACT>

varchar2
(100)

Yes

The contact name of the fiscal


representative associated with the
registration number for the company
running the transaction. For example: If
the role is S this data is associated with
the <SELLER_REGISTRATION>.

<FISCAL_REP_NAME>

varchar2
(100)

Yes

The name of the fiscal representative


associated with the registration number
for the company running the transaction.
For example: If the role is S this data is
associated with the <SELLER_
REGISTRATION>.

<FLAT_FEE>

number

Yes

Similar to <TAX_RATE>; indicates the


basis for the tax assessed by the
authority.

<GROSS_AMOUNT>

structural

No

The Gross Amount which resulted in this


tax result, passed down from the Line
level. Values are returned in the Authority
Currency in rounded and unrounded
amounts. When reverse calculations are
run, the tax amount is passed in and an
estimated gross amount is returned.
Note: See also the <IS_ROUNDING>
Invoice Input XML element. When set to
false, all amounts in this structure are
unrounded. When set to true or null
(default), amounts are
rounded/unrounded as described.

<AUTHORITY_
AMOUNT>

number

Yes

The gross amount, rounded, in the


authority currency.

<UNROUNDED_
AUTHORITY_
AMOUNT>

number

Yes

The gross amount, unrounded, in the


authority currency.
This element returns 10 digits after the
decimal point.

<INCLUSIVE_TAX>

boolean

Yes

Indicates that this tax is an inclusive tax


(included in the gross amount).

<INPUT_RECOVERY_
AMOUNT>

number

Yes

The amount of tax eligible for VAT


recovery.

<INPUT_RECOVERY_
PERCENT>

number

Yes

The percentage of tax eligible for VAT


recovery.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

190

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name

Type

Audited?

Description

<INVOICE_
DESCRIPTION>

varchar2
(100)

No

A text description of the tax which you


may choose to print on customer
invoices. This value comes from the
Authority or Rule used to generate the
tax.

<IS_EXEMPT>

boolean

Yes

Indicates that this line was exempt from


tax. Exemption is different from zero tax
as in VAT countries exemption
completely excludes the transaction from
the VAT system. In the case of a sale,
VAT paid to make the supply cannot be
recovered if the supply is exempt. In
Sales Tax countries such as the US, the
exempt indicator prevents tax from being
charged. If (N)o is explicitly passed the
exemption certificate lookup is
bypassed; tax will be charged even
though an apparently valid certificate
may exist in ONESOURCE Indirect Tax
Determination.

<IS_INTRASTAT_
REPORTED>

boolean

Yes

Indicates whether this transaction


applies for Intrastat reporting. Based on
Jurisdiction logic.

<IS_NOTAX>

boolean

Yes

Indicates whether this authority was told


not to tax this line.

<IS_TRIANGULATION>

boolean

Yes

Indicates whether triangulation


simplification was used on this
transaction. If the tag is not generated,
simplification was not used.

<IS_VAT_REPORTED>

boolean

Yes

Indicates whether this transaction


applies for VAT reporting. Based on
Jurisdiction logic.

<IS_VIES_REPORTED>

boolean

Yes

Indicates whether this transaction


applies for VIES reporting. Based on
Jurisdiction logic.

<JURISDICTION_
TEXT>

varchar2
(1000)

Yes

The text returned by this authority's


jurisdiction determination logic. This may
be text explaining why the authority was
selected to tax this address or it may be a
situation-specific warning message
related to the tax scenario such as "May
require proof of export".

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

191

Tax Level Output XML Elements

Element Name
<LICENSES>

Type

Audited?

Description

structural

No

Structural element containing information


about one or more Licenses which were
applied to this transaction.

structural

No

Structural element containing information


about a specific license which was
applied to this transaction.

<LICENSE_
NUMBER>
<LICENSE_
TYPE_NAME>
<LICENSE_
END_DATE>
<LICENSE_
EXTERNAL_
IDENTIFIER>

varchar2
(100)

Yes

The license number for this license.

varchar2
(100)

Yes

The license type for this license.

date

Yes

The end date for this license.

varchar2
(100)

Yes

An external identifier defined for this


license which enables matching to a
license in the ERP system.

<LICENSE_
CATEGORY>

varchar2(20)

Yes

The category of license. Currently, only


CUSTOMER is returned in this element.

<LOCATION_CODE>

varchar2(50)

Yes

Authority location code, from the


Authorities Edit page.

<MESSAGE>

structural

No

A message related to this tax amount.


There can be multiple MESSAGE
elements returned with each tax amount.

<MIDDLEMAN_
REGISTRATION>

varchar2(25)

Yes

Middleman registration number used by


this tax calculation. Derived from
registration found in input XML or from
value in database.

<NATURE_OF_TAX>

varchar2(1)

Yes

Indicates whether the value stored in


<TAX_AMOUNT> represents a (P)
ercentage, (F)ee, or is (E)xempt (no tax).

<NON_TAXABLE_
BASIS>

structural

N/A

Identifies the portion of a line's taxable


basis not used for calculating tax. Some
authorities may consider the non-taxable
basis a deduction from the gross sales or
gross receipts, thus reducing the
aggregated taxable basis to be reported
on a return.

<DOCUMENT_
AMOUNT>

number

Yes

The non-taxable basis, rounded, in the


document currency.

<UNROUNDED_
DOCUMENT_
AMOUNT>

number

Yes

The non-taxable basis, unrounded, in the


document currency.

<LICENSE>

This element returns 10 digits after the


decimal point.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

192

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name

Type

Audited?

Description

<AUTHORITY_
AMOUNT>

number

Yes

The non-taxable basis, rounded, in the


authority currency.

<UNROUNDED_
AUTHORITY_
AMOUNT>

number

Yes

The non-taxable basis, unrounded, in the


authority currency.

<OVERRIDE_AMOUNT>

number

Yes

Tax amount applied without calculation.

<OVERRIDE_RATE>

number

Yes

Tax rate applied regardless of rule rate for


this authority.

<REGISTRATION_
ATTRIBUTE_[1-50]>

varchar2
(100)

Yes

Custom attributes associated with the


registration number for the company
running the transaction. For example: If
the role is S, this data is associated with
the <SELLER_REGISTRATION>.

<RELATED_
ALLOCATION_LINE_
NUMBER>
<RELATED_LINE_
NUMBER>

number

No

The related allocation line number based


on the related line number.

number

No

The related line number from the Input


XML for this tax result.

<REVISED_GROSS_
AMOUNT>

number

Yes

The revised amount used by certain tax


authorities, primarily in Brazil. These
authorities revise the gross amount as
part of the process of tax calculation and
base the tax on this amount.

<RULE_ORDER>

number

No

The order of the rule applied to calculate


this tax.

<RULE_REPORTING_
CATEGORY>

varchar2
(100)

Yes

The reporting category of the rule applied


to calculate this tax, as maintained on the
Rules Edit page.

<SELLER_
REGISTRATION>

varchar2(25)

Yes

Seller registration number used by this


tax calculation. Derived from registration
found in input XML or from value in
database.

<SUPPLY_EXEMPT_
PERCENT>

number

Yes

A pass-through element which has been


deprecated in favor of enhanced VAT
calculation logic.

This element returns 10 digits after the


decimal point..

See <INPUT_RECOVERY_
AMOUNT/PERCENT> for more
information.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Tax Calculation XML Elements

193

Tax Level Output XML Elements

Element Name
<TAX_AMOUNT>

Type
structural

Audited?
No

Description
The amount of tax owed to the authority,
in authority and document currencies, in
rounded and unrounded amounts.
Note: See also the <IS_ROUNDING>
Invoice Input XML element. When set to
false, all amounts in this structure are
unrounded. When set to true or null
(default), amounts are
rounded/unrounded as described.

<AUTHORITY_
AMOUNT>

number

Yes

The amount of tax, rounded, in the


authority currency.

<DOCUMENT_
AMOUNT>

number

Yes

The amount of tax, rounded, in the


document currency.

<UNROUNDED_
AUTHORITY_
AMOUNT>

number

Yes

The amount of tax, unrounded, in the


authority currency.

<UNROUNDED_
DOCUMENT_
AMOUNT>

number

This element returns 10 digits after the


decimal point.
Yes

The amount of tax, unrounded, in the


document currency.
This element returns 10 digits after the
decimal point.

<TAX_
DETERMINATION_
DATE>
<TAX_DIRECTION>

date

Yes

The date used to drive all rule, rate, and


other tax decisions.

varchar2(1)

Yes

The tax direction specifies Input/Output


values for VAT recovery identification.

<TAX_POINT_DATE>

date

Yes

The date at which a tax liability to an


authority has been established.

<TAX_RATE>

number

Yes

The rate of taxation for the authority.

<TAX_RATE_CODE>

varchar2(25)

Yes

The tax rate code associated with the


applied rate.

<TAX_TREATMENT>

varchar2
(100)

Yes

The flag that indicates alternative tax


treatment after Determination performs
its calculation:
l
l
l

D (Deferred).
DI (Deferred Invoice).
DP (Deferred Payment).

For more information, see Deferred


Taxes in Help.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

194

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name
<TAX_TYPE>

Type
varchar2(3)

Audited?
Yes

Description
An override tax type determined when the
Jurisdiction Location is determined. Use
only to override the automatic tax type for
a transaction:
AC - Acquisition
CA - Custom Authority
(see Note 1 below)
CA1 - Custom
Authority 1
(see Note 1 below)

SN - Special
Rate
(see Note 2
below)

CU - Consumer Use

STK - Stock

DS - Distance Sale

TE - Taxable
Export

EC - European
Community Sales
ER -Intra EU Reverse
Charge
ES - Exported Service
EXC - Excise

US - Use

IC - Intra-Company

VG - VAT
Group

IR - International
Reverse Charge
(supplier outside the
EU)
IS - Imported Services
MA - Markup
Adjustment
MP - Markup
Percentage
MVT - Movement
NL - Not Liable
RC - Reverse Charge
or Rental Consumer's
Use
RS - Rental Sales
RU - Rental Use
S - Standard
SA - Sales

VERSION 5.5.1.0

TR Triangulation
UN Unregistered
Seller

IM - Import

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE

SI - Standard
Interstate

ZC - Zerorated
IntraCommunity
Dispatches
within the
European
Union (EU)
ZE - Zerorated Exports
leaving the
EU, or Zerorated Exports
from non-EU
countries
ZR - Zerorated Item
(rule
specifies rate
of zero)

Tax Calculation XML Elements

195

Tax Level Output XML Elements

Element Name
<TAX_TYPE>
continued

Type
varchar2(3)

Audited?
Yes

Description
Note 1: CA is returned for most Custom
Authority transactions. If a transaction
has two different Custom Authorities for
the Ship From and Ship To locations, CA
is returned for the Ship From authority
and for the Ship To authority.
Note 2: SN is returned for Brazilian
Provincial Special Rates and Indian
Provincial Rates for unregistered buyers.
For a complete description of tax types,
see the Help topic Tax Types Quick
Reference.

<TAXABLE_BASIS>

structural

N/A

The amount actually taxed by this


authority: gross less basis percentage
and other exempt amounts. Rounded and
unrounded amounts in authority and
document currencies.
Note: See also the <IS_ROUNDING>
Invoice Input XML element. When set to
false, all amounts in this structure are
unrounded. When set to true or null
(default), amounts are
rounded/unrounded as described.

<AUTHORITY_
AMOUNT>

number

Yes

The taxable basis, rounded, in the


authority currency.

<DOCUMENT_
AMOUNT>

number

Yes

The taxable basis, rounded, in the


document currency.

<UNROUNDED_
AUTHORITY_
AMOUNT>

number

Yes

The taxable basis, unrounded, in the


authority currency.

<UNROUNDED_
DOCUMENT_
AMOUNT>

number

This element returns 10 digits after the


decimal point..
Yes

The taxable basis, unrounded, in the


document currency.
This element returns 10 digits after the
decimal point.

<TAXABLE_COUNTRY>

varchar2(3)

Yes

Country code from address that triggered


this tax.

<TAXABLE_COUNTRY_
NAME>

varchar2(50)

Yes

Country name from the address that


triggered this tax.

<TAXABLE_STATE>

varchar2(50)

Yes

State from the address that triggered this


tax.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

196

Tax Calculation XML Elements


Tax Level Output XML Elements

Element Name

Type

<TAXABLE_PROVINCE>

varchar2(50)

Yes

Province from the address that triggered


this tax.

<TAXABLE_DISTRICT>

varchar2(50)

Yes

District from the address that triggered


this tax.

<TAXABLE_COUNTY>

varchar2(50)

Yes

County from the address that triggered


this tax.

<TAXABLE_CITY>

varchar2(50)

Yes

City from the address that triggered this


tax.

<TAXABLE_GEOCODE>

varchar2(50)

Yes

Geocode from the address that triggered


this tax.

<TAXABLE_POSTCODE>

varchar2(50)

Yes

Postcode from the address that triggered


this tax.

<UOM_CONVERSION>

structural

No

A structure containing data pertaining to


any unit of measure conversions which
took place for this transaction.

<FACTOR>

number

Yes

The conversion factor applied to the


FROM amount to yield the TO amount.

<OPERATOR>

varchar2(1)

Yes

The operator to be applied to the


conversion factor.

<FROM>

structural

No

The "from" amount and unit of measure.

number

Yes

The amount converted.

varchar2(50)

Yes

The original unit of measure.

structural

No

The rounded "to" amount and associated


unit of measure.

number

Yes

The rounded amount.

varchar2(50)

Yes

The unit of measure for the rounded


amount.

structural

No

The unrounded "to" amount and


associated unit of measure.

number

Yes

The unrounded amount.

varchar2(50)

Yes

The unit of measure for the unrounded


amount.

<VAT_GROUP_
REGISTRATION>

varchar2(25)

Yes

The registration number used to trigger


VAT Registration Group functionality for
this calculation.

<ZONE_NAME>

varchar2
(100)

Yes

The name of the zone for which authority


level information is being supplied.

<ZONE_LEVEL>

varchar2(50)

Yes

The zone level of the zone where this tax


applies.

<AMOUNT>
<UOM>
<TO_ROUNDED>

<AMOUNT>
<UOM>
<TO_UNROUNDED>

<AMOUNT>
<UOM>

Audited?

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Description

Tax Calculation XML Elements

197

Tax Level Output XML Elements

Allocation Rollup
Allocation tax results are rolled up at the Line level to enable accurate returns to the calling
applications through ONESOURCE Indirect Tax Integrations. Where possible, multiple
allocation line <TAX> results are combined into one or more <TAX> results at the Line level
based on grouping and summing.
If more than one allocation line contains the same Group By elements, and the values of those
elements are the same across each allocation line, those <TAX> results are combined at the
line level into a single result, with any Sum elements summed.
The Group By elements are:
l

<ADDRESS_TYPE>

<ADMIN_ZONE_LEVEL>

<AUTHORITY_NAME>

<AUTHORITY_TYPE>

<BUYER_REGISTRATION>

<COMMENT>

<EFFECTIVE_ZONE_LEVEL>

<ERP_TAX_CODE>

<EXEMPT_CERTIFICATE>

<EXEMPT_REASON>

<INPUT_RECOVERY_PERCENT>

<INVOICE_DESCRIPTION>

<IS_EXEMPT>

<JURISDICTION_TEXT>

<LOCATION_CODE>

<MIDDLEMAN_REGISTRATION>

<SELLER_REGISTRATION>

<TAX_DIRECTION>

<TAX_RATE>

<TAX_TYPE>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

198

Tax Calculation XML Elements


Tax Level Output XML Elements

The Sum elements are:


l

<EXEMPT_AMOUNT>

<FLAT_FEE>

<INPUT_RECOVERY_AMOUNT>

<REVISED_GROSS_AMOUNT>

<TAX_AMOUNT>

<TAXABLE_BASIS>

Example 1: Allocation lines 1 and 2 contain the same values for <TAX_RATE> <TAX_TYPE>
and <AUTHORITY_NAME> They also contain the <TAX_AMOUNT> and <TAXABLE_
BASIS> elements.
A single <TAX> block will be created at the Line level containing the <TAX_RATE> <TAX_
TYPE> and <AUTHORITY_NAME> elements, as well as summed values for <TAX_
AMOUNT> and <TAXABLE_BASIS>
Example 2: Same as Example 1, but allocation line 2 contains a different <AUTHORITY_
NAME> than line 2. Two <TAX> blocks will be created at the Line level (all Group By elements
must have the same value in each allocation line to enable rollup).
Example 3: Same as Example 1, but allocation line 2 contains the additional Group By element
<COMMENT> Two <TAX> blocks will be created at the Line level (the same Group By
elements must be present in each allocation line to enable rollup).

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Zone Lookup XML Elements

199

Zone Lookup Input XML

ZONE LOOKUP XML ELEMENTS


See the following sections for input and output XML elements for zone lookup:
l

Zone Lookup Input XML (page 199)

Zone Lookup Output XML (page 200)

ZONE LOOKUP INPUT XML


Element types listed below as varchar2(50) indicate the number of single-byte characters which
can be successfully contained within the element. If you include multi-byte characters, you need
to account for their size when submitting data. Most accented characters are 2 bytes; certain
special characters are 3 bytes.
Address Validation Input XML Elements
XML Field
Name

Type

Comment

<ADDRESS>

structural

<COUNTRY>

varchar2 Country
(50)

<PROVINCE> varchar2 Province, or non-US state.


(50)
<STATE>

varchar2 State
(50)

<COUNTY>

varchar2 County Name. Optional.


(50)

<CITY>

varchar2 City Name. Either <CITY> or <POSTCODE> is required.


(50)

<DISTRICT>

varchar2 District name


(50)

<POSTCODE>
<GEOCODE>

varchar2 First 5 digits of a US ZIP Code, or a non-US postal code. Can be


(50)
submitted as a 2-character, 3-character, or ISO code, or as a full
province name.
varchar2 The +4 portion of a Zip+4 US ZIP Code. Optional.
(50)

All elements except <GEOCODE> can contain a 2-character, 3-character, or ISO code, or a full name.
Valid codes can be viewed on the Zones Edit page for the associated zone.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

200

Zone Lookup XML Elements


Zone Lookup Output XML

ZONE LOOKUP OUTPUT XML


In the following tables, dependency is show by indentation. For example:
<PARENT_ELEMENT>
<CHILD_ELEMENT>
<GRANDCHILD_ELEMENT>

<ADDRESS> Elements
XML Field
Name

Type

Comment

<ADDRESS>

structure

An address returned for this request. There may be multiple


<ADDRESS> elements returned.

<COUNTRY>

structure

Country structure

<NAME>

varchar2
(50)

Country name

<CODE>

varCountry 2-digit code


char2(2)

<CODE3>

varCountry 3-digit code


char2(3)

<ISOCODE>

varCountry ISO Code


char2(3)

<PROVINCE> structure

Province structure. International only.

<NAME>

varchar2
(50)

Province name

<CODE>

varProvince 2-letter code


char2(2)

<CODE3>

varProvince 3-digit code


char2(3)

<ISOCODE>

varProvince ISO Code


char2(3)

<STATE>

structure

State structure

<NAME>

varchar2
(50)

State name

<CODE>

varState 2-letter code


char2(2)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Zone Lookup XML Elements

201

Zone Lookup Output XML

XML Field
Name

Type

Comment

<CODE3>

varState 3-digit code


char2(3)

<ISOCODE>

varState ISO Code


char2(3)

<COUNTY>

structure

County structure

<NAME>

varchar2
(50)

County name

<CODE3>

varCounty 3-digit code


char2(3)

<ISOCODE>

varCounty ISO Code


char2(3)

<CITY>

structure

City structure

<NAME>

varchar2
(50)

City name

<CODE3>

varCity 3-digit code


char2(3)

<ISOCODE>

varCity ISO Code


char2(3)

<DISTRICT>

structure

District structure. International only.

<NAME>

varchar2
(50)

District name

<CODE3>

varDistrict 3-digit code


char2(3)

<ISOCODE>

varDistrict ISO Code


char2(3)

<POSTCODE>

structure

District structure. International only.

<NAME>

varchar2
(50)

Postal code. First five digits of US ZIP Code, or International postal


code.

<CODE3>

var3-digit Postal Code


char2(3)

<ISOCODE>

varISO Postal Code


char2(3)

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

202

Zone Lookup XML Elements


Zone Lookup Output XML

XML Field
Name

Type

Comment

<GEOCODE>

structure

Geocode structure

<NAME>

varchar2
(50)

Geocode name

<MIN>

varMinimum value in Geocode range.


char2(4)

<MAX>

varMaximum value in Geocode range.


char2(4)

When multiple types of data are found for a specific address, each are returned. For example, a country
might return a <NAME>, <CODE>, <CODE3>, and <ISOCODE>, while a state might return only a
<NAME> and <CODE>.

<MESSAGE> Elements
XML Field
Name

Type

Comment

<MESSAGE>

structure

A message related to this transaction. There can be multiple


<MESSAGE> elements returned with each <ADDRESS>.

<LOCATION>

varchar2
(100)

The location at which the message occurred. Used for debugging


purposes only.

<CATEGORY>

varchar2
(40)

The message category

<CODE>

varchar2
(50)

The message's code. Generally the message code is used by business


applications to identify the event that occurred.

<MESSAGE_
TEXT>

varchar2
(1000)

The actual error message, containing detailed information about the


event that occurred.

<SEVERITY>

varchar2
(10)

The error's severity level: returns 0 for informational messages (such


as Successful Processing), 1 for warnings (errors that do not
terminate processing), and 2 for fatal errors that terminate processing.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

Appendix A: Special Transaction Considerations

203

Using Special Characters

APPENDIX A: SPECIAL TRANSACTION


CONSIDERATIONS
There are some special issues that can arise as you work with XML transactions. Review the
following to ensure that these do not hinder your development project:
l

Using Special Characters (page 203)

Extra White Space (page 204)

USING SPECIAL CHARACTERS


XML has a variety of special characters, for example left and right angle brackets (<,>), the
ampersand (&), and single and double quotes (""). If you want to include any of these characters
in your data, refer to them by their escape codes or by using the special CDATA tag.
Each special character can be represented as an escape code:
XML Entity

Escape Code

>

&gt;

<

&lt;

&

&amp;

&quot;

&apos;

Avoid using special characters in your XML if your data does not require them.
For more information about these XML entities, see the W3C website.
For example, if you wanted to pass the term Bait<live> & Worms in a <DESCRIPTION>
element, you would need to convert it to:
<DESCRIPTION>Bait&lt;live&gt; &amp; Worms</DESCRIPTION>

If you do not want to use escape codes, you can use the CDATA tag to surround the special
characters. This tells the XML parser to ignore special characters within the element. The
format of a CDATA tag is:
<![CDATA[special text]]>

Using the example above, the resulting CDATA string would appear as:
<DESCRIPTION><![CDATA[Bait<live> & Worms]]></DESCRIPTION>

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

204

Appendix A: Special Transaction Considerations


Extra White Space

ONESOURCE Indirect Tax Determination's XML parser handles both types of input conversion
seamlessly.

EXTRA WHITE SPACE


White space in XML element values is handled differently depending on the approach you are
using:
SOAP Tax Calculation Service: This interface does not trim extra space from the end of your
data. Data with extra white space following it can fail either because the value exceeds the
specified length or because the data is not recognized. For example, if you were to accidentally
pass "US " (with a space following the "S") for COUNTRY, this would fail because COUNTRY
only allows two characters.
ONESOURCE Indirect Tax Integration Java SDK (xmlinvoice): The xmlinvoice parser trims
extra white space following your data. So, if you were to accidentally pass "US (with a space
following the "S") it would be processed as the two character country code.

ONESOURCE INDIRECT TAX DETERMINATION PROGRAMMER GUIDE


VERSION 5.5.1.0

You might also like