About Order Reference XQuery Expressions

This topic describes how to use the Order Recognition Rule editor Order Reference area XQuery tab to write an expression that specifies an element value in the incoming customer order that identifies the order reference. The XQuery has the following characteristics:

  • Context: The input document for the Order Reference XQuery is the customer order. For more information about typical customer order structures, see OSM Modeling Guide.

  • Prolog: You can declare the customer order namespace in the XQuery prolog. For example:

    declare namespace im="http://xmlns.oracle.com/InputMessage";
    
  • Body: The Order Reference body must specify the node that contains the order reference value.

The following example shows a transformation rule XQuery expression that retrieves the order reference number (as a string) from the numSalesOrder field in the incoming customer order:

declare namespace im="http://xmlns.oracle.com/InputMessage";
let $order := ../im:order
return
$order/im:numSalesOrder/text()

For more information about order reference, see OSM Modeling Guide.