Search Definitions

The Search Definition is a Tax Engine tool that is intended to assist the user to automatically fill-in tax information that is difficult to interpret because of the complexities of some taxes in a country. Tax information is automatically loaded as suggestions, which the user can still change, when processing an inbound/outbound fiscal document. Search Definitions allow users to set up the most part of fiscal data needed to be loaded automatically on Tax Engine. It has a set of fields related to Department, Fiscal data, Business Partner, Item data, and so on. Most of this data is coming from SOR. The search of taxes and accounting data is performed both in incoming (Fiscal Receipts) and outbound transactions (Shipments).

Tax Engine will always try to return the most specific record. For example, to search a Tax Group, all data from Inbox Order is used as search argument, and the system will search in the Tax Group by Search Definition session. The system will sort all results and will return the most specific record. Search results provided by Tax Engine also follows a hierarchy. For example, if you maintained a Tax Rate for ICMS Tax Code on the Maintain Rates by Tax Code session, and at the same time created a search definition for Tax Rate by Search Definition, the system will automatically apply the tax rate from Tax Engine Master Data to your fiscal document.

You may create a Search Definition up to Item level or Business Partner's shipping address, a Department or a Fiscal document type, or a combination of these parameters. It is recommended that searches for fiscal and taxes data are created separately for each type of fiscal document.

Search definitions can also be created for Accounting Master Data such as Accounting Group, Accounting Data, and Standard History.

Priorities and Searches are tools designed to assist the user in automatically filling in fiscal data. This data is automatically loaded as suggestions, which the user can still modify when processing the fiscal receipt or invoice.

These examples illustrate the searches performed by the Engine:

Example A

  1. In the Priorities Search Tax Code session, these parameters are set:

    • Transaction Origin = Output

    • Tax Type = ICMS

    Priority Features:

    • Department = 1

    • Fiscal Doc Type = 2

    • Item Fiscal Data = 3

    • Fiscal Classification = 4

  2. Search definitions are created in the Tax Code by Fiscal Search Definition session for Tax Type 'ICMS' and Transaction Origin 'Output' with these features:

    Department Fiscal Doc Type Item Fiscal Data Fiscal Classification Other Fields ICMS Tax Code
    DEP004 01029010 x ICMS_BRL
    DEP005 6072016 x ICMS_OF
    BRSALES 01029010 x ICMS_001
  3. Assume that an Invoice has this Fiscal information:

    • Item Fiscal Data = 6072016

    • Fiscal Classification = 74040000

    • Department = DEP004

    • Fiscal Doc Type = BRSALES (Fiscal Doc Type ‘Sale with Request’)

The system will apply the priorities defined in Step 1 and, in this case, the tax code returned will be the code ICMS_BRL. This is because the system would have ordered the characteristics table as follows, to perform the search:

Department Fiscal Doc Type Item Fiscal Data Fiscal Classification Other Fields ICMS Tax Code
DEP004(1) 01029010(3) x ICMS_BRL
DEP005 6072016(4) x ICMS_OF
BRSALES(2) 01029010(3) x ICMS_001

Example B

  1. In the Priorities Search Tax Group session, these parameters are set:

    • Transaction Origin = Output

    • Priority Features:

    • Fiscal Doc Type = 1

    • Item = 2

    • Country/State/City From = 3 ->Country

    • Country/State/City From = 4 -> State

  2. Search definitions are created in the Tax Group by Search Definitions session for Transaction Origin ‘Output’ with these features:

    Fiscal Doc Type Item Code Ship-From Country Ship-From State Ship-From Country Ship-From State Other Fields Tax Group
    100020988 BRA SP x BRLSER
    SALE2 BRA RJ x BRLTAX
    BRA SP BRA RJ x BMTG
  3. Assume that an Invoice has this information:

    • Fiscal Doc Type Code = BRSALES

    • Department Address (Country) = BRA

    • Department Address (State) = SP

    • BP Ship-To Address (Country) = BRA

    • BP Ship-To Address (State) = RJ

    • Item Code = 100020988

The system will apply the priorities defined in Step 1 and, in this case, the tax group returned will be BRLSER. Search was performed based on the sequence defined in Priorities session:

Fiscal Doc Type Item Code Ship-From Country Ship-From State Ship-From Country Ship-From State Other Fields Tax Group
(1) 100020988(2) BRA SP x BRLSER
SALE2 BRA RJ x BRLTAX
BRA SP BRA RJ x BMTG

Because the invoice contained the fiscal document type code BRSALES, which is different from the fiscal document type that is defined in the Search, the system will automatically use priority number 2, which is Item. The item code is present in the Search and Invoice, hence, the system returned the tax group BRLSER.

The system will return the Tax Group BMTG by using priority 3 and 4 in the search if the Invoice contains this information:

  • Fiscal Doc Type Code = BRSALES

  • Department Address (Country) = BRA

  • Department Address (State) = SP

  • BP Ship-To Address (Country) = BRA

  • BP Ship-To Address (State) = RJ

  • Item Code = 100020987