Order Maintenance API

Overview: Use the Order Maintenance API to process the following updates to an order:

         Release an order from a user hold, or

         Change the arrival date for an order line, or multiple order lines, or

         Perform both updates.

If the message indicates to perform more than one update, the order must be eligible for all updates; otherwise, the entire message fails and no updates are made.

Updates for a successful response: 

         If released from user hold: In addition to releasing the order from hold and/or changing the arrival date, a successful update also generates an order transaction history message indicating RELEASED FROM USER HOLD (API). The user ID specified is the default user.

         If arrival date updated: In addition to changing the arrival date for the order line, a successful update also generates an order transaction history message indicated Order Line 2 Updated Arrival Date, where 2 is the order line number. The user ID specified is the default user.

         If arrival date updated beyond reservation lead days: If the specified arrival date is later than the difference between the current date plus the Reservation Lead Days (B27), then if a pick slip record currently exists, it is deleted. The order becomes a future order until the new arrival date is within the reservation lead days. In the case of a drop ship order, the future order calculation is based on the Reservation Lead Days (B27) plus the lead days specified for the vendor item in Working with Vendor Items (WVNI).

In this topic:

         Order Maintenance API Setup

         Order Maintenance API Messages

         Sample Request Message

         Request Message Contents

         Sample Response Messages

         Response Message Contents

         Troubleshooting the Order Maintenance API

Order Maintenance API Setup

Necessary setup includes the following.

CWServiceIn web service: The CWServiceIn Web Service enables an external system to post the order maintenance request message directly to Order Management System and receive responses.

Endpoint: The individual endpoint is for this message is /SerenadeSeam/sxrs/SerenadeREST/CWServiceIn/1.0/OrderMaintenance.

Web service authentication: You can use the Manage External Application Access option in Modern View to create the client application to use OAuth authentication, and assign the client to CWServiceIn. You can also use the Working with Web Service Authentication (WWSA) menu option to assign the client to CWServiceIn.

For more information on OAuth, see the Omnichannel Web Service Authentication Configuration Guide at https://support.oracle.com/epmos/faces/DocumentDisplay?id=2728265.1.

Order Maintenance API Messages

Sample Request Message

A sample of the order maintenance request message is presented below. This sample message indicates to change the arrival date for order line 2 and to release a user hold.

{

  "datetime":"2021-05-11T20:24:48.015",

  "company":"123",

  "order_nbr":"10001234",

  "order_shipto_nbr":"001",

  "order_detail":[

     {

        "order_detail_seq_nbr":"002",

        "arrival_date":"2021-05-23"

     }

  ],

  "release_user_hold":"yes"

}

Request Message Contents

Name

Type

Length

Comments

datetime

datetime

 

company

numeric

3

A code for the company where the order to be updated exists. Required.

order_nbr

numeric

8

The order number to update. Required.

order_shipto_nbr

numeric

3

The ship-to number on the order to update. Required.

order_detail

The order_detail element is required to update the arrival date for the order line.

order_detail_seq_nbr

numeric

5

The order line whose arrival date should be updated. Required to update an arrival date.

arrival_date

numeric

8

The arrival date to apply to the order line. Must be in YYYY-MM-DD format.

Note:  The arrival date is still updated even if the date specified is not a future date.

To update the user hold:

release_user_hold

alpha

3

Set to y or yes to release the user hold; otherwise, set to no or n. Not case-sensitive.

Sample Response Messages

Successful Response: If the Order Maintenance request message is well formed and contains valid data and authorization credentials, and if the order or line, or both are eligible for the updates, the system returns a success message, for example:

{

  "date_created": "2021-05-11T06:45:40",

  "company": "123",

  "order_nbr": "10001234",

  "order_shipto_nbr": "001",

  "response": "SUCCESS"

} 

Failed Response: If the Order Maintenance request message is well formed and contains valid data and authorization credentials, but the order is not eligible for one or more updates specified in the request the system returns a failed response such as the following:

{

  "date_created": "2021-05-22T06:59:06",

  "company": "123",

  "order_nbr": "10001234",

  "order_shipto_nbr": "001",

  "response": "FAILED"

}

Response Message Contents

Name

Type

Length

Comments

datetime

datetime

The date and time when the response was generated.

company

numeric

3

The company number specified in the request message.

order_nbr

numeric

8

The order number specified in the request message.

order_shipto_nbr

numeric

3

The ship-to number specified in the request message.

response

alpha

3

Set to SUCCESS if the update succeeded; otherwise, set to FAILED.

Troubleshooting the Order Maintenance API

Authentication error: The error 401 Authorization Required is returned if:

         The request message did not pass a valid token.

         The client ID is not valid.

         The client ID is valid, but is not assigned to CWServiceIn.

If required information is missing or invalid: The response indicates FAILED if:

         The specified company is invalid.

         The specified order and ship-to is invalid.

         The order line specified for an arrival date update is invalid.

If releasing a user hold fails: The response indicates FAILED if the request indicates to release a user hold and:

         The order is currently on hold with a system-assigned hold, but not a user hold.

         The order is currently open and the request indicates to release a user hold.

         The order is currently locked for editing or updates.

         The order is closed.

If changing an arrival date fails: The response indicates FAILED if the request indicates to update an arrival date and:

         The order is currently locked for editing or updates.

         The arrival date specified in the request message is not in YYYY-MM-DD format.

         The order line is closed, sold out, or canceled.

         The order line has a printed quantity.

         The order line is being fulfilled through Order Broker.

         A partial quantity of the order line has shipped.

Note:             If any update specified in the request fails, a failure response is returned and none of the requested updates are applied. For example, if the request indicates to update an arrival date and also to release the order, but the order is held, the arrival date is not updated.

If the response indicates SUCCESS but there is no update: This can occur if:

         The request does not indicate to update the arrival date, or the release_user_hold tag is set to n, regardless of order status.

         The order is currently held and the release_user_hold tag is missing, blank, or set to n.

Note:             If the order currently has both a user hold and a system-assigned hold, releasing the user hold does not change the order status.

 

________________________________