Search Results okc_template_usages
Overview
OKC_TEMPLATE_USAGES is a Contracts Core (OKC) transactional table in Oracle E-Business Suite 12.1.1 and 12.2.2 that stores the relationship between a terms template and the contract or document in which that template is used. It is the physical link between reusable template definitions and the actual contractual instruments generated or authored from them. Each row records one application of a template to a document, together with the numbering scheme, document type, effectivity information, and a set of administrative and behavioral control flags that govern how the resulting contract behaves.
From a Data Vault modeling perspective, the foreign key topology mined from the schema classifies this object heuristically as a link. Three foreign keys converge on the table — DOC_NUMBERING_SCHEME, DOCUMENT_TYPE, and TEMPLATE_ID — indicating that OKC_TEMPLATE_USAGES resolves many-to-many associations among templates, business document types, and numbering schemes while carrying descriptive attributes of its own.
Key Information Stored
The table is documented with 29 columns. The most significant are:
- TEMPLATE_ID — identifies the source terms template; foreign key to OKC_TERMS_TEMPLATES_ALL.
- DOCUMENT_TYPE — the business document type of the contract; foreign key to OKC_BUS_DOC_TYPES_B.
- DOC_NUMBERING_SCHEME — the numbering scheme applied; foreign key to OKC_NUMBER_SCHEMES_B.
- DOCUMENT_ID and DOCUMENT_NUMBER — the specific document instance and its human-readable number.
- ARTICLE_EFFECTIVE_DATE — the date from which the template articles take effect.
- CONFIG_HEADER_ID and CONFIG_REVISION_NUMBER, with VALID_CONFIG_YN — configuration context for the generated document.
- CONTRACT_SOURCE_CODE and AUTHORING_PARTY_CODE — origin and authorship metadata for the contract.
- ORIG_SYSTEM_REFERENCE_CODE, ORIG_SYSTEM_REFERENCE_ID1, and ORIG_SYSTEM_REFERENCE_ID2 — cross-system identifiers for integration.
- Control flags: LOCK_TERMS_FLAG, AUTOGEN_DEVIATIONS_FLAG, SOURCE_CHANGE_ALLOWED_FLAG, ENABLE_REPORTING_FLAG, and CONTRACT_EXPERT_FINISH_FLAG.
- Operational roles: CONTRACT_ADMIN_ID, LEGAL_CONTACT_ID, and LOCKED_BY_USER_ID.
The documented unique index entries are internal LOB indexes (SYS_IL...), so no columns are formally documented as business-key candidates. Conventional EBS practice treats the combination of TEMPLATE_ID, DOCUMENT_ID, and DOCUMENT_TYPE as the effective business key. The documented structure does not enumerate a surrogate primary key column, though EBS tables of this family typically rely on a system-generated identifier in the document-identifier column group. Standard EBS audit columns — CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN, and OBJECT_VERSION_NUMBER — are present.
Common Use Cases and Queries
Typical reporting needs include identifying which templates are in active use, tracing template provenance for a contract, and auditing which contracts bypassed standard terms.
- Template usage frequency: group rows by TEMPLATE_ID and count DOCUMENT_ID to rank the most-used templates.
- Contract-to-template lineage: join DOCUMENT_ID to the contract header tables to retrieve clause and article inheritance.
- Control auditing: filter on LOCK_TERMS_FLAG = 'Y' or SOURCE_CHANGE_ALLOWED_FLAG = 'N' to find documents where terms were frozen at generation.
- Integration reconciliation: use ORIG_SYSTEM_REFERENCE_CODE/ID1/ID2 to match external documents.
A representative query:
SELECT t.TEMPLATE_ID, t.DOCUMENT_ID, t.DOCUMENT_NUMBER, t.CONTRACT_SOURCE_CODE FROM OKC_TEMPLATE_USAGES t WHERE t.DOCUMENT_TYPE = :doc_type AND t.VALID_CONFIG_YN = 'Y' ORDER BY t.CREATION_DATE DESC;
Related Objects
The most significant related objects, based on the documented foreign key and dependency data, are:
- OKC_TERMS_TEMPLATES_ALL — joined on OKC_TEMPLATE_USAGES.TEMPLATE_ID; holds template definitions.
- OKC_BUS_DOC_TYPES_B — joined on DOCUMENT_TYPE; defines business document types.
- OKC_NUMBER_SCHEMES_B — joined on DOC_NUMBERING_SCHEME; numbering scheme definitions.
- OKC_K_HEADERS_ALL / OKC_K_HEADERS_B — contract headers keyed by DOCUMENT_ID.
- OKC_K_LINES_ALL / OKC_K_ARTICLES_B — articles and lines inherited from the template.
- OKC_TEMPLATE_DEVIATIONS — deviations recorded against template defaults.
- FND_USER — resolves CREATED_BY, LOCKED_BY_USER_ID, CONTRACT_ADMIN_ID, and LEGAL_CONTACT_ID.
-
Table: OKC_TEMPLATE_USAGES
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_TEMPLATE_USAGES, object_name:OKC_TEMPLATE_USAGES, status:VALID, product: OKC - Contracts Core , description: This entity will contain relationship between template and document where it is used. , implementation_dba_data: OKC.OKC_TEMPLATE_USAGES ,
-
Table: OKC_TEMPLATE_USAGES
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_TEMPLATE_USAGES, object_name:OKC_TEMPLATE_USAGES, status:VALID, product: OKC - Contracts Core , description: This entity will contain relationship between template and document where it is used. , implementation_dba_data: OKC.OKC_TEMPLATE_USAGES ,
-
VIEW: APPS.OKC_TEMPLATE_USAGES_V
12.1.1
-
VIEW: APPS.OKC_TEMPLATE_USAGES_V
12.2.2
-
APPS.OKC_XPRT_XRULE_VALUES_PVT SQL Statements
12.2.2
-
SYNONYM: APPS.OKC_TEMPLATE_USAGES
12.1.1
owner:APPS, object_type:SYNONYM, object_name:OKC_TEMPLATE_USAGES, status:VALID,
-
VIEW: OKC.OKC_TEMPLATE_USAGES#
12.2.2
owner:OKC, object_type:VIEW, object_name:OKC_TEMPLATE_USAGES#, status:VALID,
-
APPS.OKC_XPRT_XRULE_VALUES_PVT SQL Statements
12.1.1
-
SYNONYM: APPS.OKC_TEMPLATE_USAGES
12.2.2
owner:APPS, object_type:SYNONYM, object_name:OKC_TEMPLATE_USAGES, status:VALID,
-
APPS.OKC_TERMS_QA_GRP SQL Statements
12.1.1
-
APPS.OKC_TERMS_QA_GRP SQL Statements
12.2.2
-
APPS.OKC_TERMS_UTIL_GRP SQL Statements
12.2.2
-
APPS.OKC_PO_INT_GRP SQL Statements
12.2.2
-
VIEW: APPS.OKC_TERMS_STRUCTURE_V
12.1.1
-
APPS.OKC_TERMS_UTIL_GRP SQL Statements
12.1.1
-
VIEW: OKC.OKC_TEMPLATE_USAGES#
12.2.2
-
VIEW: APPS.OKC_TERMS_STRUCTURE_V
12.2.2
-
APPS.OKC_TERMS_COPY_GRP SQL Statements
12.2.2
-
View: OKC_TERMS_STRUCTURE_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_STRUCTURE_V, object_name:OKC_TERMS_STRUCTURE_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TERMS_STRUCTURE_V ,
-
View: OKC_TEMPLATE_USAGES_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TEMPLATE_USAGES_V, object_name:OKC_TEMPLATE_USAGES_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TEMPLATE_USAGES_V ,
-
Table: OKC_NUMBER_SCHEMES_B
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_NUMBER_SCHEMES_B, object_name:OKC_NUMBER_SCHEMES_B, status:VALID, product: OKC - Contracts Core , description: Translation table for Numbering schemes , implementation_dba_data: OKC.OKC_NUMBER_SCHEMES_B ,
-
APPS.OKC_TEMPLATE_USAGES_GRP SQL Statements
12.1.1
-
APPS.OKC_TEMPLATE_USAGES_GRP SQL Statements
12.2.2
-
Table: OKC_TERMS_TEMPLATES_ALL
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_TERMS_TEMPLATES_ALL, object_name:OKC_TERMS_TEMPLATES_ALL, status:VALID, product: OKC - Contracts Core , description: Master table for contract terms templates , implementation_dba_data: OKC.OKC_TERMS_TEMPLATES_ALL ,
-
View: OKC_TERMS_STRUCTURE_V
12.2.2
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TERMS_STRUCTURE_V, object_name:OKC_TERMS_STRUCTURE_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TERMS_STRUCTURE_V ,
-
APPS.OKC_TEMPLATE_USAGES_PVT SQL Statements
12.2.2
-
APPS.OKC_TEMPLATE_USAGES_PVT SQL Statements
12.1.1
-
Table: OKC_TERMS_TEMPLATES_ALL
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_TERMS_TEMPLATES_ALL, object_name:OKC_TERMS_TEMPLATES_ALL, status:VALID, product: OKC - Contracts Core , description: Master table for contract terms templates , implementation_dba_data: OKC.OKC_TERMS_TEMPLATES_ALL ,
-
Table: OKC_NUMBER_SCHEMES_B
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_NUMBER_SCHEMES_B, object_name:OKC_NUMBER_SCHEMES_B, status:VALID, product: OKC - Contracts Core , description: OKC_NUMBER_SCHEMES_B is the base table to store the numbering schemes to organize the sections and clauses , implementation_dba_data: OKC.OKC_NUMBER_SCHEMES_B ,
-
PACKAGE BODY: APPS.OKC_TEMPLATE_USAGES_PVT
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TEMPLATE_USAGES_PVT, status:VALID,
-
View: OKC_TEMPLATE_USAGES_V
12.1.1
owner:APPS, object_type:VIEW, fnd_design_data:OKC.OKC_TEMPLATE_USAGES_V, object_name:OKC_TEMPLATE_USAGES_V, status:VALID, product: OKC - Contracts Core , implementation_dba_data: APPS.OKC_TEMPLATE_USAGES_V ,
-
Table: OKC_BUS_DOC_TYPES_B
12.1.1
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_BUS_DOC_TYPES_B, object_name:OKC_BUS_DOC_TYPES_B, status:VALID, product: OKC - Contracts Core , description: Stores all business document types and preferences related to those documents. This information is seeded by each product team that integrates with Oracle Contracts to implement Contract authoring. , implementation_dba_data: OKC.OKC_BUS_DOC_TYPES_B ,
-
PACKAGE BODY: APPS.OKC_TERMS_COPY_GRP
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TERMS_COPY_GRP, status:VALID,
-
PACKAGE BODY: APPS.OKC_TEMPLATE_USAGES_GRP
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TEMPLATE_USAGES_GRP, status:VALID,
-
Table: OKC_BUS_DOC_TYPES_B
12.2.2
owner:OKC, object_type:TABLE, fnd_design_data:OKC.OKC_BUS_DOC_TYPES_B, object_name:OKC_BUS_DOC_TYPES_B, status:VALID, product: OKC - Contracts Core , description: Stores all business document types and preferences related to those documents. This information is seeded by each product team that integrates with Oracle Contracts to implement Contract authoring. , implementation_dba_data: OKC.OKC_BUS_DOC_TYPES_B ,
-
PACKAGE BODY: APPS.OKC_TEMPLATE_USAGES_GRP
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TEMPLATE_USAGES_GRP, status:VALID,
-
PACKAGE BODY: APPS.OKC_PO_MOD_PKG
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_PO_MOD_PKG, status:VALID,
-
PACKAGE BODY: APPS.OKC_TERMS_VERSION_PVT
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TERMS_VERSION_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_CLM_PKG
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_CLM_PKG, status:VALID,
-
PACKAGE BODY: APPS.OKC_REP_UPD_CON_ADMIN_PVT
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_REP_UPD_CON_ADMIN_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_REP_UPD_CON_ADMIN_PVT
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_REP_UPD_CON_ADMIN_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_NUMBER_SCHEME_GRP
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_NUMBER_SCHEME_GRP, status:VALID,
-
PACKAGE BODY: APPS.OKC_TERMS_VERSION_PVT
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TERMS_VERSION_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_XPRT_XRULE_VALUES_PVT
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_XPRT_XRULE_VALUES_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_TERMS_QA_GRP
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TERMS_QA_GRP, status:VALID,
-
PACKAGE BODY: APPS.PO_CONTERMS_UTL_GRP
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:PO_CONTERMS_UTL_GRP, status:VALID,
-
PACKAGE BODY: APPS.OKC_XPRT_INT_GRP
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_XPRT_INT_GRP, status:VALID,
-
PACKAGE BODY: APPS.OKC_TEMPLATE_USAGES_PVT
12.1.1
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_TEMPLATE_USAGES_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_XPRT_RULES_ENGINE_PVT
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_XPRT_RULES_ENGINE_PVT, status:VALID,
-
PACKAGE BODY: APPS.OKC_PO_INT_GRP
12.2.2
owner:APPS, object_type:PACKAGE BODY, object_name:OKC_PO_INT_GRP, status:VALID,