Search Results token_rec




Overview

IEM_IM_TOKENS_WRAPPERS_PVT is a private PL/SQL package owned by the APPS schema in Oracle E-Business Suite. It belongs to the Oracle Interaction Center / eMail Center (IEM) module family, which provides the inbound email processing infrastructure used by Oracle Advanced Inbound and related interaction-channel products. The package encapsulates tokenization logic: it decomposes an inbound email message body or an indexed text fragment into a collection of discrete tokens, each carrying an associated weight. This token set is the foundation for relevance scoring, keyword matching, and rule evaluation performed by the email classification and routing engine.

The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the definer, a common pattern for wrapper packages that must respect the calling session's security context. The header identifies the source file as iemtimws.pls, version 115.4, last shipped in December 2002, so the implementation is stable and has carried forward largely unchanged into EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

The package exposes a single documented function:

  • GetTokens — Returns an integer status code and produces two OUT parameters. The first is a table of token records, and the second is an error text string used for diagnostic reporting. The function accepts an inbound message identifier, a part indicator identifying which segment of a multipart message is being processed, a flags value controlling processing behavior, a link reference, and a language code. Its purpose is to extract and score the tokens present in the identified message content so that downstream matching logic can operate on a normalized representation of the text.

The package also declares the two public types that define the data contract of GetTokens:

  • token_rec — A record type containing a token field of type VARCHAR2(150) and a weight field of type NUMBER. This is the structure the user searched for under the term "token_rec."
  • token_tab — A PL/SQL associative array (index-by table) of token_rec, indexed by BINARY_INTEGER. This is the collection type used for the OUT parameter that returns the tokenized result set.

Tables Accessed

ETRM documents two tables referenced through APPS synonyms: DUAL and PLITBLM.

  • DUAL — The standard Oracle single-row utility table, used for expression evaluation and simple SELECT constructs within the package body.
  • PLITBLM — The Oracle Text / interMedia helper table used in tokenization and linguistic-indexing operations. Its presence here confirms that GetTokens delegates to the Oracle Text (CTXSYS) text-processing engine for the actual token extraction, wrapping that functionality in a form callable from the IEM email-processing stack. An earlier revision of the package evidently referenced CTXSYS.CTX_DOC.TOKEN_TAB directly, as indicated by the commented subtype declaration in the header.

Usage Notes

As a package with an API classification of PVT, IEM_IM_TOKENS_WRAPPERS_PVT is not a published integration interface. It is invoked internally by other components of the IEM email-processing and classification stack, and ETRM records zero dependent packages exposed at the public level. The _PVT suffix and the wrapper naming convention indicate that it exists to isolate Oracle Text dependencies and present a stable internal contract to its callers.

Typical invocation occurs during inbound message processing, where the classification engine retrieves a message by identifier, calls GetTokens for the relevant part and language, and then evaluates the returned token_tab against configured keyword or category rules. Because the package relies on Oracle Text, the target database must have the Text component installed and the relevant language and lexer configuration available. Customizations should not modify or call this package directly; supported extension points are the IEM public APIs and the email classification configuration that sits above this layer.