Search Results cs_tp_template_questions_u1




Overview

CS.CS_TP_TEMPLATE_QUESTIONS is a seed-data table in the Customer Care (CS) schema of Oracle E-Business Suite 12.1.1 and 12.2.2. It functions as a linking table that associates questions with the templates used in the Trade Management / task-planning question framework, controlling which questions appear on a given template and in what order. The table resides in the APPS_TS_SEED tablespace, confirming its role as configuration-level reference data typically delivered with the product and maintained through setup rather than day-to-day transactional activity.

From a Data Vault modeling perspective, the mined relationship metadata suggests classification as a link table: it resolves a many-to-many association between a template and a question, with SEQUENCE_NUMBER acting as an ordering attribute on the link. Because the physical schema exhibits a standalone FK profile with only the SECURITY_GROUP_ID column referencing FND_SECURITY_GROUPS, the relationships to the template and question entities are enforced at the application layer rather than through database-level foreign keys.

Key Information Stored

The table contains 25 documented columns. The most significant are:

  • TEMPLATE_ID (NUMBER(15)) — identifier of the parent template. Part of the composite business key.
  • QUESTION_ID (NUMBER(15)) — identifier of the linked question. Part of the composite business key.
  • SEQUENCE_NUMBER (NUMBER) — controls the display or processing order of questions within the template; indexed by CS_TP_TEMPLATE_QUESTIONS_N2 and N3.
  • CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN — standard Who columns providing audit lineage on record creation and maintenance.
  • ATTRIBUTE_CATEGORY (VARCHAR2(30)) — descriptive flexfield structure-defining column, enabling context-sensitive DFF segments.
  • ATTRIBUTE1 through ATTRIBUTE15 (VARCHAR2(150) each) — descriptive flexfield segments for customer-specific extensions.
  • SECURITY_GROUP_ID (NUMBER) — used in hosted/multi-tenant environments; the only column with a documented foreign key, referencing FND_SECURITY_GROUPS.

The table has no explicit surrogate primary key column. Uniqueness is enforced through the unique index CS_TP_TEMPLATE_QUESTIONS_U1 on (TEMPLATE_ID, QUESTION_ID), which constitutes the business-key candidate. Note that this unique constraint allows only one row per template-question pair; ordering variants must therefore be expressed via SEQUENCE_NUMBER updates rather than duplicate rows.

Common Use Cases and Queries

Typical usage includes retrieving all questions for a template in sequence, joining template-question links to question definitions, and auditing configuration drift between environments.

  • List questions for a template in order:
    SELECT question_id, sequence_number FROM cs.cs_tp_template_questions WHERE template_id = :p_id ORDER BY sequence_number;
  • Reverse lookup — find all templates containing a question:
    SELECT template_id FROM cs.cs_tp_template_questions WHERE question_id = :q_id;
  • Duplicate detection or gap analysis on ordering:
    SELECT template_id, COUNT(*) FROM cs.cs_tp_template_questions GROUP BY template_id HAVING COUNT(*) != COUNT(DISTINCT sequence_number);
  • DFF reporting, extracting ATTRIBUTE_CATEGORY and ATTRIBUTE1–15 for setup documentation and migration comparisons.

Related Objects

  • FND_SECURITY_GROUPS — referenced by SECURITY_GROUP_ID; the only documented FK relationship.
  • CS_TP_TEMPLATES (template header) — joined on TEMPLATE_ID to resolve template name and context.
  • CS_TP_QUESTIONS (question definitions) — joined on QUESTION_ID to resolve question text and type.
  • CS_TP_TEMPLATE_QUESTIONS_U1, _N2, _N3 — the unique and non-unique indexes supporting business-key and access-path queries.
  • FND_DESCR_FLEX_COLUMN_USAGES / FND_DESCRIPTIVE_FLEXS — define the ATTRIBUTE_CATEGORY and ATTRIBUTE1–15 DFF structure used by this table.