Custom Attributes
If you have transaction data that does not fit into Determination's standard XML elements, you can use special XML elements called custom attributes. These are Input XML elements that you define to match the needs of your implementation. Fifty separate elements are provided at both the Invoice and Line levels, although some are reserved for use by the integration software that links your financial system to ONESOURCE Indirect Tax Determination.
Common uses for custom attributes include:
- Submitting pass-through data for storage in the Audit Database. For example, you might want to store additional location data, contact info, or comments for a transaction that are not supported by the standard set of XML elements.
- Submitting data which can match exemption certificate "limited-use" criteria.
- Submitting data which, when evaluated by TransEditors, can trigger modifications to the Input XML and resulting calculations.
- Submitting data which, when evaluated by Rule Qualifiers, can determine the applicability of a rule to a transaction.
The <USER_ELEMENT> Structures
Custom attributes are submitted in the following Input XML structures:
-
<INVOICE>
-
<USER_ELEMENT>
-
<NAME>ATTRIBUTE[1-50]</NAME>
-
<VALUE> </VALUE>
-
-
</USER_ELEMENT>
-
-
</INVOICE>
-
-
<INVOICE>
-
<LINE>
-
<USER_ELEMENT>
-
<NAME>ATTRIBUTE[1-50]</NAME>
-
<VALUE> </VALUE>
-
-
</USER_ELEMENT>
-
-
</LINE>
-
-
</INVOICE>
For example, you may define ATTRIBUTE20 at the line level to contain a Project ID used at your implementation that may or may not be populated for each transaction. The presence of this attribute, and its value, can be evaluated to trigger rules, exemption certificates, or TransEditors. In addition, this evaluation can take into account only this single attribute or other custom attributes and standard elements in combination.
As mentioned above, ONESOURCE Indirect Tax Integrations reserve some of the 50 elements at each level for their own use and should not be populated. In general, attributes 1-30 are always available, 31-39 may be available, and 40-50 are never available. Refer to your Integrations documentation for more information.
Automatic Conversion for Rule Qualifiers and TransEditors
Custom Attributes are defined as strings by the Determination XML implementation. However, you can use these elements to pass in either numbers or dates and Determination will correctly evaluate them in Rule Qualifier or TransEditor comparisons that use the <, <=, >, or >= operators.
For example, a TransEditor could compare the value or <ATTRIBUTE25> against the value of <INVOICE_DATE> at the invoice level using one of the above four operators. Or, a Rule Qualifier could compare it against a constant such as 2007-03-05.
The order of attempted conversions is number, date, and then string.
Number Conversions
Determination first attempts to convert to a number such that the left- and right-hands of the expression are both numbers. Example:
<ATTRIBUTE25> > <ATTRIBUTE24>
Attribute 25 contains the string "10" and Attribute 24 contains the string "5". Both are converted to numbers and the expression evaluates to "true":
10 > 5 evaluates to "true"
Date Conversions
If number conversions fail, Determination attempts a date comparison. For example:
<ATTRIBUTE20> < <INVOICE_DATE>
Attribute 20 contains the string "2007-03-05" and the <INVOICE_DATE> is "2007-03-04". Determination first attempts to convert and compare numbers, which fails, then attempts to convert and compare by dates, which is successful:
2007-03-05 < 2007-03-04 evaluates to "false"
String Conversions
If number and date conversions both fail to generate a valid comparison, Determination attempts to treat both values as strings and attempts a lexicographical comparison. For example:
<ATTRIBUTE15> <= aab
Attribute 15 contains the string "aaa" and the constant evaluated against is "aab". The value "aaa" cannot be converted to number or date format and therefore is evaluated against the constant as a string.
aaa <= aab evaluates to "true"
Custom Attribute Tasks
Use custom attributes to:
- Trigger the application of limited use exemption certificates. For more information, see Certificate Use.
- Trigger a rule using a rule qualifier. See Rule Qualifiers.
- Trigger a TransEditor condition. See TransEditor Conditions.
- Pass in additional transaction data for storage in the Audit Database.
You can also use the Custom Attributes page to name attributes. Named attributes are a convenience in Determination; once you name an attribute it is displayed instead of the attribute number in the pick lists and drop-down menus for the tasks above. Naming attributes is not required for their use.