Search Results document_instance_id




Overview

WSH_DOCUMENT_INSTANCES is a Shipping Execution (WSH) table that stores document instances generated for shipping transactions. In Oracle E-Business Suite 12.1.1 and 12.2.2, the object serves as the central repository for the printable and legally significant transport documents produced during the outbound logistics cycle — bills of lading, packing slips, commercial invoices, and manifests. Each row represents a single instance of a document tied to a specific entity (such as a delivery, trip, or container) and records its lifecycle attributes: the sequence assigned, the print status, the final print date, and the point-of-delivery confirmation state.

Because the table carries a large number of optional, denormalized document-body attributes (67 columns in ETRM 12.2.2, including shipper and carrier signature blocks, export references, and hazardous-material declarations), it functions as a document master record rather than a transactional line. The metadata characterizes it heuristically as a standalone type from a Data Vault perspective; in practice, this suggests modeling as a hub on the natural document instance identifier, with descriptive attributes treated as satellite content. Only one foreign key is documented — DOC_SEQUENCE_CATEGORY_ID to WSH_DOC_SEQUENCE_CATEGORIES — so referential integration with shipping lines is largely driven at the application layer rather than by database constraints.

Key Information Stored

The surrogate primary key is DOCUMENT_INSTANCE_ID, uniquely enforced by both WSH_DOCUMENT_INSTANCES_PK and the unique index WSH_DOCUMENT_INSTANCES_U1. This column is the sole documented business-key candidate; no other column is guaranteed unique by index. The most significant descriptive columns are:

The standard WHO columns (CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN) plus the program context columns (PROGRAM_APPLICATION_ID, PROGRAM_ID, PROGRAM_UPDATE_DATE, REQUEST_ID) provide audit and concurrent-request traceability. Fifteen ATTRIBUTE columns and ATTRIBUTE_CATEGORY are available for extensibility.

Common Use Cases and Queries

Typical reporting includes retrieving printed documents for a given delivery, auditing point-of-delivery confirmations, and reconciling document sequences against their categories. A representative query joins the document instance to its numbering category and filters by entity:

  • List all documents for a delivery: SELECT document_instance_id, document_type, sequence_number, status FROM wsh_document_instances WHERE entity_name = 'DELIVERY' AND entity_id = :delivery_id;
  • Identify documents not yet finally printed: ... WHERE final_print_date IS NULL AND status <> 'CANCELLED';
  • POD audit: SELECT pod_flag, pod_by, pod_date, expected_pod_date FROM wsh_document_instances WHERE document_type = 'BOL';
  • Sequence reconciliation: join DOC_SEQUENCE_CATEGORY_ID to WSH_DOC_SEQUENCE_CATEGORIES to compare generated numbers with assigned ranges.

Related Objects

The following objects are most significant for integration and reporting:

  • WSH_DOC_SEQUENCE_CATEGORIES — the only documented FK target (via DOC_SEQUENCE_CATEGORY_ID), defining numbering rules.
  • WSH_DELIVERIES — parent delivery referenced through ENTITY_NAME/ENTITY_ID for most bill-of-lading records.
  • WSH_TRIPS and WSH_TRIP_STOPS — trip-level manifests that reference document instances.
  • WSH_DELIVERY_ASSIGNMENTS — links deliveries to trips and is commonly traversed when resolving documents.
  • WSH_NEW_DELIVERIES and the Shipping Execution document-generation concurrent programs — populate this table.
  • WSH_DOCUMENT_ATTRIBUTES / document template tables — supply the printing metadata consumed alongside each instance.

Because foreign keys beyond DOC_SEQUENCE_CATEGORY_ID are not enforced at the database level, joins on ENTITY_ID must apply ENTITY_NAME as a discriminator to avoid cross-entity collisions.