Order Management subsystem commands

The Order Management subsystem includes all logic and data relevant to placing, processing, and managing orders. The order management subsystem also deals with returns. With the commands in this group you can do the following: 

Order abbreviations

Several order commands accept Order abbreviations, such as "*" and "." to indicate one or more values for some of their parameters that specify order identifiers. Commands that accept Order abbreviations generally accept any of the following abbreviations, although "**" and ".**." (which involve creating a new order) may not be applicable for some commands. Refer to each command's documentation to understand which abbreviations are accepted by each command. Many commands accept the following order abbreviations for parameters that specify order reference numbers.

Note: For most commands, the specified customer is the customer executing the command, and a parameter named storeId specifies the store. For some commands, the store may be implied from other parameters. If no store is specified, then the abbreviation applies to all stores.  The abbreviations "**" and ".**." should not be used when no store is specified.

Abbreviation Description
. (dot) The reference numbers of the current pending orders for the specified customer and store. (You can make a pending order current by calling the SetPendingOrder command.) 

The order reference numbers are obtained by calling the GetCurrentPendingOrdersCmd task command. If it returns none, the most recently updated pending order is considered to be current.

* (asterisk) All pending orders for the specified customer and store.
.t (dot and t) The current template orders for the specified customer and store, as previously set by the SetOrderTemplate command.
*t (asterisk and t) All template orders for the specified customer and store, as previously set by the SetOrderTemplate command.
** (double asterisk) Create a new order for the specified customer and store, and assign it a new reference number.
.**. (dot, double asterisk, dot) Use the current pending orders; if there are no pending orders, make a new pending order and set it to be current.
q Use the customer's order profile for the specified store, if it exists.  Otherwise, use the customer's order profile for the specified store's store group. 
*n (asterisk and n) No order objects.
*child<(OrderQuotationRelId | OrderQuotationRel abbreviation)> All child orders for the OrderQuotationRel objects specified by <(OrderQuotationRelId | OrderQuotationRel abbreviation)>.
*parent<(OrderQuotationRelId | OrderQuotationRel abbreviation)> All parent orders for the OrderQuotationRel objects specified by <(OrderQuotationRelId | OrderQuotationRel abbreviation)>.

Examples

Below are examples of some Order abbreviations:

Abbreviation Description
*child*parent.*submission All submitted child orders whose parent is one of the current pending orders (for the current user in the current store).
*parent*child1001 The parent order of child order number 1001.

OrderItem abbreviations

Several order commands accept OrderItem abbreviations (such as "*" and "*n") to indicate one or more values for some of their parameters that specify order item identifiers. Commands that accept OrderItem abbreviations, generally accept any of the following abbreviations, although "**" (which involves creating a new order item) may not be applicable for some commands.

OrderItem abbreviations are evaluated in the context of one or more orders. For example, "*" represents all order items for the specified order(s).

Abbreviation Description
*n (asterisk and n) No order items. *n can be used to specify that no order item IDs executed from previous command are implicitly sent to the current command.
*string Various order items are included depending on the codes that appear in string, as defined in the "Code group for illustrating the syntax of the OrderItem abbreviations" table below.

In the following definition, each code group represents the union of the sets of order items defined by the codes in that code group. 

The set of order items defined by string is as follows:

(**) U (abu^cd^iv^fpw) U (g)

where U indicates union and ^ indicates intersection. For example, if string is "fuwbd", then the following is true:

  • no codes from code group "**" appear, so that code group represents no order items
  • codes "u" and "b" from code group "abu" appear, so that code group represents all unallocated or backordered order items
  • code "d" from code group "cd" appears, so that code group represents all order items whose inventory items are discontinued
  • no codes from code group "iv" appear, so that code group represents all order items
  • codes "f" and "w" from code group "fpw" appear, so that code group represents all order items whose estimated availability dates are either unknown or in the future
  • no codes from "g" appear, so that code group represents no order items

Based on the above logic, "*fuwbd" means that all unallocated or backordered order items whose estimated availability times are unknown or in the future and whose inventory items are discontinued.

Code group for illustrating the syntax of the OrderItem abbreviations

The following table describes the codes for the *string abbreviation, as described in the "OrderItem abbreviations" table above.

Code Code group Specified order items Default value when no codes from the code group are specified
** (double asterisk) ** (double asterisk) Order items created by the command execution to which this parameter is passed. No order items.
a abu Allocated order items (InventoryStatus "ALLC"). All order items.
b abu Backordered order items (InventoryStatus "BO"). All order items
u abu Unallocated order items (InventoryStatus "NALC"). All order items.
c cd Order items whose inventory items are not discontinued. All order items.
d cd Order items whose inventory items are discontinued. All order items.
i iv Order items that are not validly allocated (and not validly backordered).

Note: An order item is validly allocated or backordered if it is allocated or backordered, the Quantity, FulfillmentCenter, and Shipping Address are the same as when it was allocated or backordered, and the allocation or backorder has not yet expired. Changing the configuration ID or the shipping mode ID will also invalidate allocations and backorders.

All order items.
v iv Order items that are validly allocated (or validly backordered). All order items.
f fpw Order items whose estimated availability times are in the future. All order items.
p fpw Order items whose estimated availability times are in the past or present. All order items.
w fpw Order items whose estimated availability times are unknown. All order items.
g g Order items with the same correlationGroup attribute as any of the other specified order items. No order items.

Examples

Below are examples of some OrderItem abbreviations:

Abbreviation Description
*n (asterisk and n) No order items.
* (asterisk) All existing order items in the specified order(s).
** (double asterisk) All order items created by this command execution.
** c (double asterisk and c) All order items created by this command execution whose inventory items are not discontinued.
*** (triple asterisk) All existing order items plus those created by this command execution.
*i** (asterisk, i, and  double asterisk) All existing order items not validly allocated (and not validly backordered) plus any order items created by this command execution.
*w (asterisk and w) All existing order items whose estimated availability time is unknown.
*fp (asterisk, f, and p) All existing order items whose estimated availability time is unknown (in the future, past, or present).
*f (asterisk and f) All existing order items whose estimated availability time is in the future.
*u (asterisk and u) All existing unallocated order items.
*ub (asterisk, u, and b) All existing unallocated or backordered order items.
*ai (asterisk, a, and i) All existing order items that are not validly allocated but whose InventoryStatus is "ALLC".
*bic (asterisk, b, i, and c) All existing order items whose inventory items are not discontinued and are not validly backordered, but whose InventoryStatus is "BO".
*ud (asterisk, u, and d) All existing order items whose inventory items are discontinued and whose InventoryStatus is "NALC".

OrderQuotationRel abbreviations

Below is a table of OrderQuotationRel abbreviations:

Abbreviation Description
*n (asterisk and n) No OrderQuotationRel objects.
*initial All OrderQuotationRel objects whose relType attribute indicates initial.
*selection All OrderQuotationRel objects whose relType attribute indicates selection.
*final All OrderQuotationRel objects whose relType attribute indicates final.
*submission All OrderQuotationRel objects whose relType attribute indicates submission.
*parent<(OrderId | Order abbreviation)> All OrderQuotationRel objects whose parentId attribute indicates one of the orders indicated by <(OrderId | Order abbreviation)>.
*child<(OrderId | Order abbreviation)> All OrderQuotationRel objects whose childId attribute indicates one of the orders indicated by <(OrderId | Order abbreviation)>.
*store<(StoreId)> All OrderQuotationRel objects whose childStoreId attribute indicates one of the Stores indicated by <(StoreId)>.
*contract<(ContractId | *default)> All OrderQuotationRel objects whose tradingAgreementId attribute indicates one of the Contracts indicated by <(ContractId | *default)>, where *default indicates the default Contract for the Store indicated by the childStoreId attribute of the OrderQuotationRel object..
Any combination of the above abbreviation values OrderQuotationRel abbreviations may be concatonated to represent the intersection of the sets of OrderQuotationsRel objects represented by the individual abbreviations.

Examples

Below are examples of some OrderQuotationRel abbreviations:

Abbreviation Description
*initial*parent. All OrderQuotationRel objects whose parent order is one of the current pending orders (for the current user in the current store) and whose relType attribute indicates initial.
*contract*default*store123*final All OrderQuotationRel objects whose storeId attribute is 123 and whose tradingAgreementId attribute indicates the default contract for that store and whose relType attribute indicates final.
*store123*parent* All OrderQuotationRel objects whose storeId attribute is 123 and whose parent order is a pending order (of the current user in the current store).

When using the Order Management subsystem commands, it is also important to understand the database tables and the data models for tables for the Order Management subsystem. Here is a list of the data models related to orders: