Converting Quotes to Orders | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Order Status Reports and On-line Inquiries |
Overview: Use the Order Line History In API to receive order line history activity for a specified order line on an order, based on XML messages from an external system, such as a warehouse management system.
In this chapter:
• Order Line History API Setup
• Order Line History In Process
• Order Line History In Message (CWOrdLnHstIn)
Before you can use the Order Line History In API, you must perform the necessary setup.
Order line activity codes: Use the Working with Order Line Activity Codes (WOLA) menu option to create any user defined order line activity codes you wish to send to Oracle Retail Order Management System in the Order Line History In Message (CWOrdLnHstIn). The system automatically creates the System Delivered Order Line Activity Codes in the Order Line Activity table and displays them on the Work with Order Line Activity Codes Screen; however, you cannot send system delivered order line activity codes in the Order Line History In message.
CWServiceIn web service: The CWServiceIn web service allows an external system to post the Order Line History In Message (CWOrdLnHstIn) directly to Oracle Retail Order Management System and receive responses without the need of any queues.
Web service authentication? The Require_Auth field in the Webservice table defines whether the web service requires basic web service authentication. By default, this field is set to Y, indicating the web service requires authentication. See Working with Web Service Authentication (WWSA) for an overview.
To use the CWServiceIn web service, you must define the endpoint:
If you are using the CWServiceIn RESTful web service: You POST inbound CWServiceIn messages to the web service’s URI, or endpoint, of the RESTful service. The individual URL for the CWServiceIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/application/CWServiceIn, where server:port identifies the application server where the RESTful service is located and CWServiceIn is the name of the web service to call.
If you are using the CWServiceIn SOAP-based web service: The endpoint specified in the CWServiceIn.wsdl file is where you need to post messages in order for the CWServiceIn web service to process them. The endpoint is typically set to http://server:port/CWDirectCPService/services/CWServiceIn, where server:port identifies the application server where the wsdl is located and CWServiceIn is the name of the web service to call.
The CWServiceIn web service requires that inbound messages be embedded in SOAP envelope tags. A sample XML message embedded in a SOAP envelope is presented below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://dom.w3c.org">
<soapenv:Header />
<soapenv:Body>
<dom:performAction type="xsd:string">
<![CDATA[
<Message source="External" target="CWSerenade" type="CWORDLNHSTIN" resp_qmgr="" resp_q="">
<Header company_code="7" order_number="3963">
<ShipTos>
<ShipTo ship_to_number="1">
<OrderLineHistorys>
<OrderLineHistory order_detail_seq="1" activity_code="T" quantity="1" contact_date="101112" contact_time="101112" delivery_provider="KB" ext_sys_date="091011" user="SHELDON" ext_ref_nbr="2"/>
</OrderLineHistorys>
</ShipTo>
</ShipTos>
</Header>
</Message>
]]>
</dom:performAction>
</soapenv:Body>
</soapenv:Envelope>
You can use the Order Line History In API to create order line activity for a specified line on an order. The steps are:
1. |
An external system sends an Order Line History In Message (CWOrdLnHstIn) to Oracle Retail Order Management System using the CWServiceIn web service. |
2. |
Oracle Retail Order Management System receives the message and writes the message to the MQ Message Log if its Logging Level is set to INFO or lower. |
3. |
Oracle Retail Order Management System determines if the XML message is well formed. • If the XML message is not well formed, the system returns a simple response with the error Invalid XML Message and does not perform any further updates; see Order Line History In Errors. • If the XML message is well formed, the system continues to the next step. |
4. |
Oracle Retail Order Management System determines if any errors exist in the Header element of the message. • If an error exists in the Header element of the message, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. • If an error does not exist in the Header element of the message, the system continues to the next step. |
5. |
Oracle Retail Order Management System determines if any errors exist in the first ShipTo element of the message. • If an error exists in the first ShipTo element of the message, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. • If an error does not exist in the first ShipTo element of the message, the system determines if any errors exist in the first OrderLineHistory element for the first ShipTo. - If an error exists in the first OrderLineHistory for the first ShipTo, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. - If an error does not exist in the first OrderLineHistory element for the first ShipTo, the system creates a record in the Order Line History table. Oracle Retail Order Management System determines if any errors exist in the next OrderLineHistory element for the first ShipTo element of the message. • If an error exists in the next OrderLineHistory element for the first ShipTo, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. • If an error does not exist in the next OrderLineHistory element for the first ShipTo, the system creates a record in the Order Line History table. |
6. |
Once Oracle Retail Order Management System finishes processing the first ShipTo element and its OrderLineHistory elements, the system determines if any errors exist in the next ShipTo element of the message. • If an error exists in the next ShipTo element of the message, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. • If an error does not exist in the next ShipTo element of the message, the system determines if any errors exist in the first OrderLineHistory element for this ShipTo. - If an error exists in the first OrderLineHistory element for this ShipTo, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. - If an error does not exist in the first OrderLineHistory element for this ShipTo, the system creates a record in the Order Line History table. Oracle Retail Order Management System determines if any errors exist in the next OrderLineHistory element for this ShipTo element of the message. • If an error exists in the next OrderLineHistory element for the ShipTo, the system returns a simple response with a description of the error and does not perform any further updates; see Order Line History In Errors. • If an error does not exist in the next OrderLineHistory element for the ShipTo, the system creates a record in the Order Line History table. |
7. |
If Oracle Retail Order Management System finishes processing the Order Line History In Message (CWOrdLnHstIn) without any errors, the system returns a simple response of OK. You can review the order line history records created on the Display Order Line History Screen. |
If the Order Line History In Message (CWOrdLnHstIn) contains an error, the system returns a simple response with a description of the error.
Error Message |
Reason For Error |
Invalid XML Message |
The Order Line History In Message (CWOrdLnHstIn) is not a well formed XML message. |
Invalid XML Message: ERROR: Invalid Target. |
The web service used to post the Order Line History In Message (CWOrdLnHstIn) directly to Oracle Retail Order Management System is not set up correctly; see Order Line History API Setup. |
Invalid XML Message: ERROR: Company is not found. |
The company_code in the Order Line History In Message (CWOrdLnHstIn) is not a valid company. |
Invalid XML Message ERROR: Order 9999 not found. |
The order_number in the Order Line History In Message (CWOrdLnHstIn) is not a valid order number for the specified company_code. |
Invalid XML Message ERROR: Order 9999 Ship To 9 not found. |
The ship_to_number in the Order Line History In Message (CWOrdLnHstIn) is not a valid ship to number for the specified order_number. |
Invalid XML Message ERROR: Order 9999 Ship To 9 Detail 9 not found. |
The order_detail_seq in the Order Line History In Message (CWOrdLnHstIn) is not a valid order detail sequence number for the specified ship_to_number. |
Invalid XML Message ERROR: Activity S is a system value. |
The activity_code in the Order Line History In Message (CWOrdLnHstIn) is a system delivered activity code. See System Delivered Order Line Activity Codes. |
Invalid XML Message ERROR: Activity Q not found. |
The activity_code in the Order Line History In Message (CWOrdLnHstIn) is not a valid activity code in the Order Line Activity table. See Working with Order Line Activity Codes (WOLA). |
Order Line History In Message: Sample XML
A sample of the Order Line History In Message (CWOrdLnHstIn) is presented below.
<Message source="WMS" target="CWSerenade" type="CWORDLNHSTIN">
<Header company_code="7" order_number="3965">
<ShipTos>
<ShipTo ship_to_number="1">
<OrderLineHistorys>
<OrderLineHistory order_detail_seq="1" activity_code="K" quantity="1" contact_date="101112" contact_time="101112" delivery_provider="KB" ext_sys_date="091011" user="SFLYE" ext_ref_nbr="2" />
<OrderLineHistory order_detail_seq="1" activity_code="L" quantity="1" contact_date="101112" contact_time="101112" delivery_provider="KB" ext_sys_date="091011" user="JJANE" ext_ref_nbr="2" />
</OrderLineHistorys>
</ShipTo>
<ShipTo ship_to_number="2">
<OrderLineHistorys>
<OrderLineHistory order_detail_seq="1" activity_code="L" quantity="1" contact_date="101112" contact_time="101112" delivery_provider="KB" ext_sys_date="091011" user="JJANE" ext_ref_nbr="2" />
</OrderLineHistorys>
</ShipTo>
</ShipTos>
</Header>
</Message>
Successful Response: If the Order Line History In message is well formed and contains valid data, Oracle Retail Order Management System creates a record in the Order Line History table for each OrderLineHistory element passed in the message and returns a simple response of OK.
Error Response: If an error exists in the Order Line History In message, the system returns a simple response with a description of the error and does not perform any further updates. For example: Invalid XML Message ERROR: Activity S is a system value.
Order Line History In Message (CWOrdLnHstIn)
Oracle Retail Order Management System receives and processes this message to create order line history records for an order line. See Order Line History In Process for processing details.
Sample message: See Order Line History In Message: Sample XML.
Name |
Type |
Length |
Comments |
Message One Message element is required. |
|||
source |
alpha |
25 |
The source of the XML message. Informational only. |
target |
alpha |
25 |
The target of the XML message, such as OROMS. Informational only. |
type |
alpha |
25 |
CWORDLNHSTIN indicates the message is an Order Line History In message. |
resp_qmgr |
alpha |
25 |
Informational only. |
resp_q |
alpha |
25 |
Informational only. |
One Header element is required. |
|||
numeric |
3 |
Required. A code for the company where the order associated with the order line history update exists. Updates Company in the Order Line History table. |
|
numeric |
8 |
Required. The order number that contains the order line whose order line history you wish to update. Updates Order # in the Order Line History table. |
|
One or more ShipTo elements are required. |
|||
numeric |
3 |
Required. The order ship to that contains the order line whose order line history you wish to update. Updates Ship to # in the Order Line History table. |
|
One or more OrderLineHistory elements are required. |
|||
numeric |
5 |
Required. The order line whose order line history you wish to update. Updates Seq # in the Order Line History table. |
|
alpha |
1 |
Required. A code for the type of activity performed against the order line. Order line activity codes are defined in and validated against the Order Line Activity table; see Working with Order Line Activity Codes (WOLA). You can pass any user defined activity code in the Order Line History In message. If the activity code does not exist in the Order Line Activity table, or you pass a system delivered activity code, the system places the message in error. Updates Activity in the Order Line History table. |
|
quantity |
numeric |
5 |
Optional. The quantity of the item on the order line associated with the order line activity update. Informational only. The system does not validate the quantity passed against the Ordered, Reserved, Shipped, or Printed quantity on the order line. Updates Qty in the Order Line History table. |
contact_date |
numeric |
7 |
Optional. The date associated with the order line activity, in MMDDYYYY format. Updates Contact date in the Order Line History table. |
contact_time |
numeric |
6 |
Optional. The time the activity occurred, in HHMMSS format. Updates Contact time in the Order Line History table. |
delivery_provider |
alpha |
15 |
Optional. Identifies the name of the delivery provider. Informational only. Updates Delivery provider in the Order Line History table. |
ext_sys_date |
numeric |
7 |
Optional. The date the message was processed in the external system, in MMDDYYYY format. Informational only. Updates External system date in the Order Line History table. |
user |
alpha |
10 |
Optional. The user who performed the activity against the item on the order line. User IDs are defined in and validated against the User table. EXTERNAL defaults if a user ID is not passed in the message or is invalid. Updates User in the Order Line History table. |
ext_ref_nbr |
alpha |
20 |
Optional. An external reference number provided by the external system. Informational only. Updates External reference# in the Order Line History table. |
Converting Quotes to Orders | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | Order Status Reports and On-line Inquiries |
CS05_15 OROMS 15.1 June 2016 OTN