E-Commerce Item Availability Processing | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | E-Commerce Cancel Request Message (CWCancel) |
Working with Batch Order Maintenance Transactions (WBOM)
Purpose: Use this menu option to work with errors resulting from order cancel requests from the web storefront.
About order cancel requests from the web: You can enable your customers to submit cancel requests from the web storefront if you use the e-commerce interface. Each cancel request on the web storefront generates a message to Order Management System indicating whether to cancel the order or a specific order line. Occasionally, the system cannot process the request. For example, the customer might attempt to cancel an order line that has recently shipped.
Typically, you would first check the status of the order using the Generic Customer History API to determine the details of the order you wish to cancel.
Cancel request: The request specifies the order ship-to or order lines you wish to cancel.
Cancel response: The response message merely indicates that the request was received; a subsequent email confirmation indicates whether the cancellation request was successful.
Fixing errors: When there is an error, you might choose to complete the requested transaction yourself; or you might need to contact the customer for further information if the desired transaction is not clear. However, you cannot edit and resubmit the maintenance requests through the Batch Order Maintenance menu option. Once you have resolved the request through research, order maintenance, or customer contact, you should delete the related error record.
What if the order includes a membership item? If the cancel request attempts to cancel a membership item, the order cancellation process does not automatically cancel the customer membership created by the membership item. You need to use Working with Customer Memberships (WWCM) in order to cancel the customer membership.See Membership Overview for background on customer memberships.
What if the order includes an order line assigned to the Order Broker? If the cancel request attempts to cancel a brokered backorder, the request goes into error status with an error of Order Has Picks Open. You need to use order maintenance or cancel option in Work with Order Broker to cancel the order line. See Brokered Backorders for an overview.
What if the order is a retail pickup or delivery order received from the Order Broker? If the cancel request is for a retail pickup or delivery order, the process sends a status update to the Order Broker indicating that the order is canceled. The Order Broker does not attempt to find another location to fulfill the order. See Retail Pickup (including Ship-for-Pickup) or Delivery Orders for an overview.
What if the order is a store pickup order? You cannot cancel a store pickup order through the CWCancel message. See Store Pickup Orders for background or store pickup orders.
In this chapter:
- When is an Order Eligible for Cancellation through the E-Commerce Interface?
- Order Inquiry/Maintenance Message Flow
- E-Commerce Cancellation Transactions
- Emails for E-Commerce Cancels
• Work with Batch OM Transactions Screen
• Display Batch OM Transactions Screen (Header)
• Display Batch OM Transactions Screen (Detail)
• Display Batch OM Detail Screen
• Display Batch OM Errors Screen
• E-Commerce Order Maintenance Errors Report
• E-Commerce Cancel Request Message (CWCancel)
The CWServiceIn web service allows an external system to post the E-Commerce Cancel Request Message (CWCancel) directly to Order Management System and receive responses without the need of any queues.
Web service authentication? Use the Working with Web Service Authentication (WWSA) menu option to define a valid user and password for basic web service authentication.
Web service type? You can use the CWServiceIn web service as a SOAP-based web service or a RESTful web service.
• Setup for the CWServiceIn SOAP-Based Web Service
• Setup for the CWServiceIn RESTful Web Service
Setup for the CWServiceIn SOAP-Based Web Service
The CWServiceIn web service’s .wsdl (Web Services Definition Language) file, which is located on your application server, controls the function of the CWServiceIn web service. You sent the E-Commerce Cancel Request Message (CWCancel) to the URL, or endpoint, specified in the wsdl. The CWServiceIn web service routes the messages sent to the endpoint and dispatches them to the E-Commerce Cancel process. When the E-Commerce Cancel process generates a response, the CWServiceIn web service routes the response.
SOAP envelope and message type: You need to embed each inbound message in the SOAP (Simple Object Access Protocol) message tags in order for the CWServiceIn web service to receive and process it correctly. Also, the type attribute in the inbound message identifies the Order Management System process, so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Cancel Request Message (CWCancel) is CWCancel.
Determine the endpoint: 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.
Sample Inbound Message in SOAP Envelope
The CWServiceIn web service requires that the inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Cancel Request Message (CWCancel) 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 xsi:noNamespaceSchemaLocation="file:///c:/SVN/Serenade%205.5/XML/SampleXML/CWCancel/1.0/CWCancel.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="CWCancel" target="OROMS" source="WEB">
<Cancel order_reason="5" cancel_type="O" ship_to="1" order_id="855" company_code="1"/>
<Lines>
<Line reason="0" qty="1" line_number="1"/>
</Lines>
</Message>
]]>
</dom:performAction>
</soapenv:Body>
</soapenv:Envelope>
Setup for the CWServiceIn RESTful Web Service
You POST the E-Commerce Cancel Request Message (CWCancel) to the web service’s URL, or endpoint, of the RESTful service. The web service routes the messages sent to the endpoint and dispatches them to the E-Commerce Cancel process. When the E-Commerce Cancel process generates a response, the CWServiceIn web service routes the response.
Message type: The type attribute in the inbound message identifies the Order Management System process, so the CWServiceIn web service can route the message appropriately. The correct type for the E-Commerce Cancel Request Message (CWCancel) is CWCancel.
Determine the endpoint: The individual URL for the CWServiceIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/SerenadeREST/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.
Sample Inbound Message using RESTful Web Service
The CWServiceIn RESTful web service does not require that inbound messages be embedded in SOAP envelope tags. A sample E-Commerce Cancel Request Message (CWCancel) when using a RESTful web service is presented below.
<Message xsi:noNamespaceSchemaLocation="file:///c:/SVN/Serenade%205.5/XML/SampleXML/CWCancel/1.0/CWCancel.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="CWCancel" target="OROMS" source="WEB">
<Cancel order_reason="5" cancel_type="O" ship_to="1" order_id="855" company_code="1"/>
<Lines>
<Line reason="0" qty="1" line_number="1"/>
</Lines>
</Message>
When is an Order Eligible for Cancellation through the E-Commerce Interface?
In order to be fully or partially canceled through the e-commerce interface, the order must:
• have originated on the web storefront. If an order originated on the web, the Internet order field on the Order Header table is set to I.
• be in an open (O) or held (H) status
• have no pick slips printed
• not be assigned to the Order Broker for fulfillment
Also, you will not be able to complete cancellation of the order or order line if the order is in use. The system determines that an order is “in use” if the User field on the Order Header table is not blank; for example, the system populates this field when you are maintaining an order, and clears it when you are done with maintenance.
What if the order includes a membership item? If the cancel request includes a membership item, the order cancellation process does not automatically cancel the customer membership created by the membership item. You need to use Working with Customer Memberships (WWCM) in order to cancel the customer membership.See Membership Overview for background on customer memberships.
What if the order includes an order line assigned to the Order Broker? If the cancel request attempts to cancel an order line that is assigned to the Order Broker for fulfillment, the request goes into error status with an error of Order Has Picks Open. You need to use order maintenance or the Working with Order Broker (WOBR) option to cancel the order line. See Order Broker Integration for an overview.
Order Inquiry/Maintenance Message Flow
Order inquiry and maintenance through the e-commerce interface use the following messages:
Message |
Direction |
Purpose |
To check status: |
||
web storefront to Order Management System |
Inquires on the status of the order. |
|
Order Management System to web storefront |
Provides information on the order header and detail. |
|
To cancel: |
||
web storefront to Order Management System |
Attempts to cancel: • individual items, or reduce the quantities of selected items; or, • the entire order ship-to (a separate cancel request is required to cancel each separate shipping address for the order) This message also indicates the reason for the cancellation. See E-Commerce Cancellation Transactions. |
In response to a cancellation request from the web storefront, the system:
• Locks the order: The system sets the User field on the Order Header table to E-COMMERCE to prevent another user or process from attempting to update the order at the same time.
• Creates batch order maintenance error records: The system uses these records, if necessary, to track any errors in the cancellation request. See Work with Batch OM Transactions Screen.
• Edit: Next, the system checks whether there are any errors for the request.
• If there are no errors, the system:
- processes the requested update(s) to the order.
- deletes the batch order maintenance error records.
- unlocks the order.
• If there are errors, the system:
- updates the batch order maintenance error record with one or more error codes. See Display Batch OM Errors Screen.
- depending on customer preference, sends the customer an email indicating that the cancellation attempt was not successful. See Emails for E-Commerce Cancels.
- writes an order history message indicating that the attempt to update the order was not successful and that an email was generated. See Order History Messages.
- places the order on hold if there is a hold reason specified in the Hold Reason for Failed E-Commerce Maintenance Transactions (H11) system control value.
- produces the E-Commerce Order Maintenance Errors Report.
- unlocks the order.
You can use the Work with Batch OM Transactions Screen to review any cancel requests that are in error.
Note: If there are any errors in the request, none of the requested changes will be processed until the errors are corrected and the edit resubmitted.
E-Commerce Cancellation Transactions
Required for each cancel request:
• Company_code: three positions, alphanumeric; for example, company 7 is indicated by 007
• Order_id: order number
• Ship_to: the number identifying the shipping address on the order; for example, an order with a single shipping address has a ship-to number of 001
• Cancel_type:
- O (default) = order
- L = line
Whole order, single ship-to: The Cancel_type must be O and the Order_reason must specify a valid cancel reason code for the order.
Note: If there are multiple shipping addresses, the cancel request for each ship-to must be sent separately.
Single item, reducing quantity or canceling the entire order line: the Cancel_type must be L and the following information is also required:
• Line_number: the order line number to be cancelled or have its quantity reduced
• Qty: the total quantity to cancel
• Reason: the valid cancel reason code
Cancellation email: The ORDR_ASYNC job generates an order or order line cancellation email to the customer if:
• the cancellation attempt is successful, and
• you have specified an:
- Order Line Cancellation Email Program (K79), if no shipments have occurred, or
- Order Cancellation Email Program (K78), and
• the cancel reason code you use does not match the Cancel Reason Code to Suppress Email (L08), and
• the customer is eligible to receive email notifications; see When Does the System Generate an Email Notification?
See the Order Cancellation Confirmation Email Sample and Contents and the Order Line Cancellation Confirmation Email Sample and Contents for more information.
If the cancellation attempt is unsuccessful, the system generates the maintenance failure email if:
• you have specified a Order Maintenance Confirmation E-Mail Program (H12), and
• the customer is eligible to receive email notifications; see When Does the System Generate an Email Notification?
See the Cancellation Request Failure Email Sample and Contents for more information.
The system selects the order cancellation, order line cancellation, or maintenance failure email template as appropriate. See Work with E-Mail Template Screen. If the system sends an email, this information is noted in the order history message.
The system writes the following message to order history if the cancellation request fails:
Web cancel request failed.
If the cancel request is successful:
Web maintenance request processed.
If the system generates an email notification (see Emails for E-Commerce Cancels), it writes a message such as one of the the following:
Ord Can Conf to user@example.com.
or
Ord Can Fail to user@example.com
You can review order history messages at the Display Order History Screen. The system assigns the default user ID, DEFAULTUSR, to the order history messages.
Work with Batch OM Transactions Screen
Purpose: Use this screen to review any errors that have resulted when customers attempt to cancel orders from the web storefront. Also, you can use this screen to delete error records once you have resolved the errors, as the system does not delete them automatically.
Fixing errors: You might choose to complete the requested transaction yourself; or you might need to contact the customer for further information if the desired transaction is not clear. However, you cannot edit and resubmit the cancellation requests through this menu option.
For more information: See E-Commerce Cancel Process.
How to display this screen: Enter WBOM in the Fast path field at the top of any menu, or select Work with Batch OM Transactions from a menu.
Field |
Description |
Order number |
An order that a customer has attempted to cancel from the web storefront. Numeric, 8 positions; optional. |
St# (Ship-to number) |
This number indicates the order ship-to address that the customer attempted to cancel. Numeric, 3 positions; optional. |
Activity |
The type of transaction that the customer attempted to perform. Valid values are: • Cancel Order • Line Cancel This field is blank if the cancel request message from the web storefront did not specify a valid cancel type code. Display-only. |
Screen Option |
Procedure |
Delete a batch order maintenance error record |
Select Delete for an error record to delete it. The system does not delete errors automatically, so typically you will delete errors as you resolve them. |
Display a cancel request in error |
Select Display for an error record to display the header-level information for the cancel request. You advance to the Display Batch OM Transactions Screen (Header). If the request includes serious errors, you will not be able to review the error record; instead, the system displays a message such as the following: Order 5493-7 is invalid -- cannot display. Print list to see errors. |
Display the error message(s) for a cancel request |
Select Errors for an error record to review the error message(s) for the cancel request. You advance to the Display Batch OM Errors Screen. |
Advance to standard order inquiry |
Select Order Inquiry for an error record to advance to Order Inquiry Header Screen or the Order Inquiry Detail Screen for the related order, depending on the setting of the Default Version for Order Inquiry (C34) system control value. |
Print a listing of all batch order maintenance errors in your company |
Select Error List to print the E-Commerce Order Maintenance Errors Report, including all errors in your company. |
Display Batch OM Transactions Screen (Header)
Purpose: Use this screen to review the header-level information that was included in the cancel request from the web storefront that was in error, so that you can determine the transaction that the customer was attempting to process.
Note: If the request includes serious errors, you will not be able to review the error record; instead, the system displays a message such as the following: Order 5493-7 is invalid -- cannot display. Print list to see errors.
You can use the Display Batch OM Errors Screen to review the errors.
How to display this screen: Select Display for a cancellation error at the Work with Batch OM Transactions Screen.
Field |
Description |
Order number |
An order that a customer has attempted to cancel from the web storefront. The order ship-to address is separated from the order number by a hyphen. Order number: numeric, 8 positions; display-only. Ship-to number: numeric, 3 positions; display-only. |
Activity |
The type of transaction that the customer attempted to perform. Valid values are: • Cancel Order • Line Cancel This field is blank if the cancel request message from the web storefront did not specify a valid cancel type. Display-only. |
Cancel reason |
The cancel reason code to use when cancelling the order. This information is included only for an order-level cancel request. You can download cancel reasons to the web storefront through the Downloading E-Commerce Static Tables (ESTF) menu option. Numeric, 2 positions; display-only. |
Screen Option |
Procedure |
Select a detail line transaction from the cancel request for review |
Select Details to advance to the Display Batch OM Transactions Screen (Detail) if the cancel request was a line cancel. |
Display the error message(s) for this cancel request |
Select Errors to advance to the Display Batch OM Errors Screen. |
Advance to standard order inquiry |
Select Order Inquiry to advance to Order Inquiry Header Screen or the Order Inquiry Detail Screen for the related order, depending on the setting of the Default Version for Order Inquiry (C34) system control value |
Print a listing of the errors for this cancel request |
Select Error List to print the E-Commerce Order Maintenance Errors Report, including all errors for this cancel request only. |
Display Batch OM Transactions Screen (Detail)
Purpose: Use this screen to select a detail line for review if a cancel request in error included order line-level information. Line-level information could include either canceling a particular line or reducing the quantity.
If the request was to cancel the order, there will not be any detail information on this screen.
How to display this screen: Select Details at the Display Batch OM Transactions Screen (Header).
Field |
Description |
Order number |
An order that a customer has attempted to cancel from the web storefront. The order ship-to address is separated from the order number by a hyphen. Order number: numeric, 8 positions; display-only. Ship-to number: numeric, 3 positions; display-only. |
Action |
The action that the customer has attempted to perform against the order detail line. The only valid value is: Line cancellation = Reduce the quantity of the order detail line or cancel it entirely Display-only. |
Line number |
The order detail line number to be cancelled. Numeric, 3 positions; display-only. |
Cnr (Cancel reason code) |
The cancel reason code specified in the cancel request to describe why the customer wants to cancel or reduce the quantity of the order detail line. This information is included only for a detail-level cancel request. You can download cancel reasons to the web storefront through the Downloading E-Commerce Static Tables (ESTF) menu option. Numeric, 2 positions; display-only. |
Qty |
The quantity of the item that the customer has attempted to cancel. Numeric, 3 positions; display-only. |
Item |
The item that the customer has attempted to cancel. The system determines which item the customer has selected by the order detail line (when working with an existing order detail line) or the short SKU number (when adding a new item to the order). The short SKU number is stored in the SKU table. If the request does not specify a valid short SKU, the item and SKU information listed on this screen may be inconsistent; for example, even if the item code is valid, the SKU information may not represent a valid SKU for the item. Alphanumeric, 12 positions; display-only. |
SKU |
The item’s unique characteristics, such as its color and size. Alphanumeric, three 4-position fields; display-only. |
Screen Option |
Procedure |
Select a detail transaction in error to review |
Select Display for a detail line to advance to the Display Batch OM Detail Screen. |
Review header information for the maintenance or cancel request |
Select Header to advance to the Display Batch OM Transactions Screen (Header). |
Display the error message(s) for the maintenance or cancel request |
Select Errors to advance to the Display Batch OM Errors Screen. |
Advance to standard order inquiry |
Select Order Inquiry to advance to Order Inquiry Header Screen or the Order Inquiry Detail Screen for the related order, depending on the setting of the Default Version for Order Inquiry (C34) system control value. |
Print a listing of the errors for this maintenance or cancel request |
Select Error List to print the E-Commerce Order Maintenance Errors Report, including all errors for this maintenance or cancel request only. |
Display Batch OM Detail Screen
Purpose: Use this screen to review detail information on a cancel line request from the web storefront that is in error.
How to display this screen: Select Display for a detail line at the Display Batch OM Transactions Screen (Detail).
Field |
Description |
Order number |
The order and line number that a customer has attempted to cancel from the web storefront. The order ship-to address is separated from the order number by a hyphen, and the order line number follows: order number - ship-to number - order line number Order number: numeric, 8 positions; display-only. Ship-to number: numeric, 3 positions; display-only. Order line number: numeric, 3 positions; display-only. |
Activity |
The action that the customer has attempted to perform against the order detail line. The only valid value is: Line cancellation = Reduce the quantity of the order detail line or cancel it entirely Display-only. |
Item/SKU |
The item that the customer has attempted to cancel. The system determines which item the customer has selected by the order detail line (when working with an existing order detail line) or the short SKU number (when adding a new item to the order). The short SKU number is stored in the SKU table. Alphanumeric, 12 positions; display-only. |
Quantity |
The quantity of the item that the customer has attempted to cancel. Numeric, 3 positions; display-only. |
Cancel reason |
The cancel reason code specified in the cancel request to describe why the customer wants to cancel or reduce the quantity of the order detail line. This information is included only for a detail-level cancel request. You can download cancel reasons to the web storefront through the Downloading E-Commerce Static Tables (ESTF) menu option. Numeric, 2 positions; display-only. |
Display Batch OM Errors Screen
Purpose: Use this screen to review the errors that have prevented a cancel request from being processed.
How to display this screen: Select Errors for an error record at the Work with Batch OM Transactions Screen, or select Errors at the Display Batch OM Transactions Screen (Header) or the Display Batch OM Transactions Screen (Detail).
Field |
Description |
Order number |
An order that a customer has attempted to cancel from the web storefront. The order ship-to number is separated from the order number by a hyphen. Order number: numeric, 8 positions; display-only. Ship-to number: numeric, 3 positions; display-only. |
Line number |
The order detail number associated with the error. This field is blank if the error is associated with header-level information, or if the system could not determine which line number was involved. Numeric, 3 positions; display-only. |
Error description |
The description of the error that prevented the cancel request from being processed. See Batch Order Cancel Errors. Alphanumeric, 25 positions; display-only. |
Notes |
For certain errors, this field displays the description of the error that prevented the maintenance or cancel request from being processed. If the error is the result of an item on the order that already existed and was not part of the maintenance or cancel request, the message is: Error from a line that was not maintained. |
Screen Option |
Procedure |
Print a listing of the errors for this cancel request |
Select Error List to print the E-Commerce Order Maintenance Errors Report, including all errors for this cancel request only. |
Error Message |
Occurs When: |
Detail Errors |
|
Invalid Order Detail |
The order line number specified in the cancel request does not exist on the order. |
Line is not Open |
The order line has a status of X (closed). |
Pick Exists for Line |
There is currently a printed pick slip for the order line. |
Cpn Item Required |
The order line specified for cancellation is required for an order-level coupon. See Working with Coupon Promotions (WCPR) for more information on coupons. Note: Although the error is retained for review, the system does cancel the order line and does not automatically remove the coupon from the order. |
Order Tot < Cpn Requires |
The cancel request has reduced the order total below the minimum required for a coupon on the order. See Working with Coupon Promotions (WCPR) for more information on coupons. Note: • Although the error is retained for review, the system does not automatically remove the coupon from the order. • This error is listed on the Display Batch OM Errors Screen for each order detail line on the order. |
Invalid Transactions |
The cancel type is missing or invalid. |
Header Errors |
|
Order Has Picks Open |
Any order detail lines on the order have pick slips printed or are assigned to the Order Broker for fulfillment. |
Order In Use |
The order is locked from update because a user is maintaining it, or another process on the system is updating it. Use Unlocking a Stranded Order or Batch (MULO) to unlock the order. |
Order Not Open or Held |
The order status is not open (blank) or held (H). |
Invalid Cancel Quantity |
The quantity specified in the cancel request exceeds the quantity eligible for cancellation for the order detail line. |
Invalid Cancel Reason |
The cancel reason is not valid, as defined through Establishing Cancel Reason Codes (WCNR). |
Invalid Order Ship To |
• The order ID in the cancellation request is missing or invalid. • The order ship to in the cancellation request is missing or invalid for the order. |
E-Commerce Item Availability Processing | Contents | SCVs | Search | Glossary | Reports | Solutions | XML | Index | E-Commerce Cancel Request Message (CWCancel) |
WBOM OROMS 16.0 December 2016 OTN