ORDERS

Each row in this table represents an order in a store.


Column Descriptions:

Name Type Description
ORDERS_ID BIGINT NOT NULL Generated unique key.
ORMORDER CHAR (30) A merchant-assigned order reference number, if any.
ORGENTITY_ID BIGINT The immediate parent organization ID of the creator.
TOTALPRODUCT DECIMAL (20,5) DEFAULT 0 The sum of ORDERITEMS.TOTALPRODUCT for the OrderItems in the Order.
TOTALTAX DECIMAL (20,5) DEFAULT 0 The sum of ORDERITEMS.TAXAMOUNT for the OrderItems in the Order.
TOTALSHIPPING DECIMAL (20,5) DEFAULT 0 The sum of ORDERITEMS.SHIPCHARGE for the OrderItems in the Order.
TOTALTAXSHIPPING DECIMAL (20,5) DEFAULT 0 The sum of ORDERITEMS.SHIPTAXAMOUNT for the OrderItems in the Order.
DESCRIPTION VARCHAR (254) A mnemonic description of the order, entered by the customer, suitable for display to the customer.
STOREENT_ID INTEGER NOT NULL The store entity the order is part of. This is normally a store unless STATUS is Q, in which case it is normally a store group.
CURRENCY CHAR (10) The currency for monetary amounts associated with this order. This is the currency code according to ISO 4217 standards.
LOCKED CHAR (1) Reserved for IBM internal use.
TIMEPLACED TIMESTAMP The time this order was processed by the OrderProcess command.
LASTUPDATE TIMESTAMP The time this order was most recently updated.
SEQUENCE DOUBLE NOT NULL DEFAULT 0 Can be used by a user interface to control the sequence of orders in a list.
STATUS VARCHAR (3) The status of the order. This is similar to order states. For specific values of status and their descriptions, refer to the order states page, but omit states 'Y' and 'Z'.
MEMBER_ID BIGINT NOT NULL The customer that placed the order.
FIELD1 INTEGER Customizable.
ADDRESS_ID BIGINT This column is deprecated. In versions WC 5.6.1 and earlier, this column contained the billing address. In version WC 6.0 and later, the billing address is part of payment data and is stored in PPCEXTDATA table as encrypted data.
FIELD2 DECIMAL (20,5) Customizable.
PROVIDERORDERNUM INTEGER Reserved for IBM internal use.
SHIPASCOMPLETE CHAR (1) NOT NULL DEFAULT 'Y' Reserved for IBM internal use.
FIELD3 VARCHAR (254) Customizable.
TOTALADJUSTMENT DECIMAL (20,5) DEFAULT 0 The sum of ORDERITEMS.TOTALADJUSTMENT for the order items in the order. This column also includes all kinds of shipping charge adjustments like discount, coupon, shipping adjustment and surcharge.
ORDCHNLTYP_ID BIGINT Reserved for IBM internal use.
COMMENTS VARCHAR (254) Comments from the customer.
NOTIFICATIONID BIGINT Notification identifier referring to the rows in the NOTIFY table that store notification attributes. These attributes override the defaults for notifications related to this order.
TYPE CHAR (3) For an order, TYPE indicates whether it is a regular order (ORD), private requisition list order (PRL), shareable requisition list order (SRL), standing order (STD), quotation order (QUT), quote (QOT), profile order (QUK), recurring order (REC), or subscription (SUB).
OPTCOUNTER SMALLINT NOT NULL DEFAULT 0 The optimistic concurrency control counter for the table. Every time there is an update to the table, the counter is incremented.
EDITOR_ID BIGINT Stores the ID of the person editing the order.
BUSCHN_ID INTEGER The Business Channel ID of the order.
SOURCEID BIGINT This field indicates the sources from which this order came, if any. This field is relevant for orders that were generated from a previously saved quote, for example. In that situation, the QuoteId would be saved here.
EXPIREDATE TIMESTAMP This entry is only relevant when the row refers to a quote, type "QOT". This field then indicates the expiration date for that quote.
BLOCKED SMALLINT DEFAULT 0 Indicates if this order has a block placed against it or not.
OPSYSTEM_ID INTEGER This field indicates the Order Processing system for the order.
TRANSFERSTATUS SMALLINT Order transferring status: 0, it is in the initial status. 1, it is in the transferring status. 2, it is in the transferred status. null, the same as 0.
BUYERPO_ID BIGINT The Buyer PO Number Id related to an order


Indexes:

Name Column Names Type
<SYSTEM-GENERATED> ORDERS_ID Primary Key
I0000176 MEMBER_ID+STATUS+STOREENT_ID Non-Unique Index
I0000652 ADDRESS_ID Non-Unique Index
I0000653 ORGENTITY_ID Non-Unique Index
I0000654 STOREENT_ID Non-Unique Index
I0000892 EDITOR_ID Non-Unique Index
I0000933 SOURCEID Non-Unique Index
I0001267 BUYERPO_ID Non-Unique Index
I0001508 STATUS+LASTUPDATE Non-Unique Index
I173124 TIMEPLACED Non-Unique Index


Constrained By Parent Tables:

Constraint Columns Parent Table Parent Columns Type
F_1138 EDITOR_ID MEMBER MEMBER_ID Cascade
F_1176 BUSCHN_ID BUSCHN BUSCHN_ID Cascade
F_513 ORGENTITY_ID ORGENTITY ORGENTITY_ID Cascade
F_514 ORDCHNLTYP_ID ORDCHNLTYP ORDCHNLTYP_ID Cascade
F_515 ADDRESS_ID ADDRESS ADDRESS_ID Cascade
F_516 MEMBER_ID MEMBER MEMBER_ID Cascade
F_517 STOREENT_ID STOREENT STOREENT_ID Cascade
F_9004 BUYERPO_ID BUYERPO BUYERPO_ID Cascade
R_3455 OPSYSTEM_ID OPSYSTEM OPSYSTEM_ID Cascade


Referenced By Child Tables:

Constraint Columns Child Table Child Columns Type
F_1051 ORDERS_ID PX_PROMOARG ORDERS_ID Cascade
F_1054 ORDERS_ID PX_COUPON ORDERS_ID Cascade
F_1057 ORDERS_ID PX_USAGE ORDERS_ID Cascade
F_1076 ORDERS_ID ORDPROMOCD ORDERS_ID Cascade
F_1118 ORDERS_ID EXCHORDERS EX_ORD_ID Cascade
F_1145 ORDERS_ID SHIPINFO ORDERS_ID Cascade
F_120 ORDERS_ID BIDORDRREL ORDERS_ID Cascade
F_1219 ORDERS_ID ORDERBLK ORDERS_ID Cascade
F_1224 ORDERS_ID CALADJUST ORDERS_ID Cascade
F_129 ORDERS_ID BUACCTDET ORDERS_ID Cascade
F_260 ORDERS_ID CPENDORDER ORDERS_ID Cascade
F_3594 ORDERS_ID PX_RWDOPTION ORDERS_ID Cascade
F_3610 ORDERS_ID PX_CDUSAGE ORDERS_ID Cascade
F_3639 ORDERS_ID ORDERREL PARENTORDER_ID Cascade
F_3640 ORDERS_ID ORDERREL CHILDORDER_ID Cascade
F_3649 ORDERS_ID SUBSCRIPTION ORDERS_ID Cascade
F_3777 ORDERS_ID ORDEXTATTR ORDERS_ID Cascade
F_397 ORDERS_ID INVOICE ORDERS_ID Cascade
F_423 ORDERS_ID LPOPURAMT ORDERS_ID Cascade
F_477 ORDERS_ID ONLOG ORRFNBR Cascade
F_479 ORDERS_ID ONQUEUE ORRFNBR Cascade
F_483 ORDERS_ID ORCOMMENT ORDERS_ID Cascade
F_485 ORDERS_ID ORCPMAP ORDERS_ID Cascade
F_490 ORDERS_ID ORDADJUST ORDERS_ID Cascade
F_493 ORDERS_ID ORDBTB ORDERS_ID Cascade
F_494 ORDERS_ID ORDCALCD ORDERS_ID Cascade
F_496 ORDERS_ID ORDERITEMS ORDERS_ID Cascade
F_511 ORDERS_ID ORDERMGP ORDERS_ID Cascade
F_512 ORDERS_ID ORDERMSG OMORNBR Cascade
F_519 ORDERS_ID ORDERTMPL ORDERS_ID Cascade
F_532 ORDERS_ID ORDMEEXTN ORDERS_ID Cascade
F_533 ORDERS_ID ORDOPTIONS ORDERS_ID Cascade
F_534 ORDERS_ID ORDPAYINFO ORDERS_ID Cascade
F_542 ORDERS_ID ORDPAYMTHD ORDERS_ID Cascade
F_547 ORDERS_ID ORDRELEASE ORDERS_ID Cascade
F_551 ORDERS_ID ORDTAX ORDERS_ID Cascade
F_579 ORDERS_ID PAYSTATUS SETSORNBR Cascade
F_60 ORDERS_ID ALCHARGE ORDERS_ID Cascade
F_672 ORDERS_ID REFUNDMTHD ORDERS_ID Cascade
F_740 ORDERS_ID SCHORDERS ORDERS_ID Cascade
F_813 ORDERS_ID SUBORDERS ORDERS_ID Cascade
F_863 ORDERS_ID TORCPMAP ORDERS_ID Cascade
F_871 ORDERS_ID TRDDEPAMT ORDERS_ID Cascade
F_877 ORDERS_ID TRDPURAMT ORDERS_ID Cascade
F_880 ORDERS_ID TRDREFAMT ORDERS_ID Cascade
F_932 ORDERS_ID ORDQUOTREL CHILD_ID Cascade
F_933 ORDERS_ID ORDQUOTREL PARENT_ID Cascade
F_939 ORDERS_ID ORDSTAT ORDERS_ID Cascade
F_940 ORDERS_ID ORDISTAT ORDERS_ID Cascade
R_3458 ORDERS_ID ORDERHIST ORDERS_ID Cascade


Related reference
ATP inventory fulfillment data model
ATP inventory orders data model
Calculation code - direct attachment data model
Scheduler data model
Messaging data model
Messaging extension data model
Order data model
Order adjustment data model
Order item data model
Order release data model
Order trading agreement data model
Order tax data model
Procurement data model
Suborders data model