E-Commerce Order Maintenance Errors Report | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 87: E-Commerce Setup |
E-Commerce Cancel Request Message (CWCancel)
The EC_CANCELS job, started through Working with E-Commerce Job Control (EJCT), handles Cancel Request messages from the web storefront. The Cancel Request message can specify the entire order ship-to, or specific items on the order. An email confirmation indicates whether the cancellation request was successful.
For more information: See:
• E-Commerce Maintenance and Cancel Process Overview for additional processing information
• E-Commerce Cancel Request Message: Sample XML
• E-Commerce Cancel Request Message: Sample NVP
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Name/Value Pair layout: The e-commerce Cancel Request (EC_CANCELS) name/value pair message uses the following layout: name=value.
Example:
companycode=555
order_id=7557
ship_to=1
The Attribute Name column in the table below indicates the name part of the name/value pair. The Comments column indicates the data to enter in the value part of the name/value pair. A note displays in the Comments column if the field is only available in the XML message.
Note: If a field is included in the name/value pair message, the field must be included in the order shown below. However, if the field is empty, the field does not need to be sent.
Attribute Name |
Type |
Length |
Comments |
One Message element is required. Available in version: The Message element and all of its attributes is available for XML only. |
|||
source |
alpha |
|
Identifies the source of the message. WEB indicates the XML message is from the web storefront. Required. |
target |
alpha |
|
Identifies the target of the message. RDC indicates the XML message is sent to CWDirect. Required. |
type |
alpha |
|
Identifies the type of information in the XML message. CWCancel indicates the message contains a cancellation request. Required. |
One Cancel element is required. To cancel the entire order ship to, the cancel_type must be O and the order_reason must specify a valid cancel reason code. Note: If there are multiple shipping addresses, the cancel request for each ship to must be sent separately. |
|||
company_code |
numeric |
3 |
The company where the order is located. Maps to the CMP Company field in the Order Ship To file. Required. |
order_id |
numeric |
8 |
The CWDirect order number you wish to cancel. Maps to the Order # field in the Order Ship To file. Required. |
ship_to |
numeric |
3 |
The order ship to you wish to cancel. Maps to the Ship to # field in the Order Ship To file. Required. |
cancel_type |
alpha |
1 |
Indicates the type of cancel to perform. Valid values: O = Order cancel. L = Line cancel. Required. |
order_reason |
numeric |
2 |
A code that represents the reason for canceling the order. Maps to the CNR Cancel reason code field in the Order Detail file. |
The Lines element, if provided, can include one or more Line elements. To cancel an order line, the cancel_type must be L and you must specify the line_number to cancel, the qty on the order line to cancel, and the reason. |
|||
line_number |
numeric |
5 |
The order detail line sequence number to cancel. Maps to the Seq # field in the Order Detail file. |
qty |
numeric |
5 |
The quantity on the order line to cancel. Maps to the ODT Qty cancelled field in the Order Detail file. |
reason |
numeric |
2 |
A code that represents the reason for canceling the order line. Maps to the CNR Cancel reason code field in the Order Detail file. |
E-Commerce Cancel Request Message: Sample XML
A sample of the E-Commerce Cancel Request Message (CWCancel) in XML format is presented below.
- <Message source="WEB" target="RDC" type="CWCancel">
<Cancel company_code="555" order_id="7602" ship_to="1" cancel_type="O" order_reason="1" />
- <Lines>
<Line line_number="1" qty="1" reason="1" />
<Line />
</Lines>
</Message>
E-Commerce Cancel Request Message: Sample NVP
A sample of the E-Commerce Cancel Request Message (CWCancel) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
company_code=555;order_id=7603;ship_to=1;cancel_type=O;order_reason=1;
E-Commerce Maintenance Request Message (CWMaintenance)
The EC_MAINT job, started through Working with E-Commerce Job Control (EJCT), handles Maintenance Request messages from the web storefront. The first Maintenance Request message is flagged as an inquiry (the Maint_type field = I), and the E-Commerce Maintenance Response Message (CWMaintResp) provides all maintainable information on the order. The next Maintenance Request message, with the Maint_type field set to M, provides the specifics of the maintenance request. A subsequent email confirmation indicates whether the maintenance request was successful.
For more information: See:
• E-Commerce Maintenance and Cancel Process Overview for an overview
• E-Commerce Maintenance Request Message: Sample XML
• E-Commerce Maintenance Request Message: Sample NVP
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Name/Value Pair layout: The e-commerce Maintenance Request (EC_MAINT) name/value pair message uses the following layout: name=value.
Example:
companycode=555
order_id=7557
ship_to=001
The Attribute Name column in the table below indicates the name part of the name/value pair. The Comments column indicates the data to enter in the value part of the name/value pair. A note displays in the Comments column if the field is only available in the XML message.
Note: If a field is included in the name/value pair message, the field must be included in the order shown below. However, if the field is empty, the field does not need to be sent.
Attribute Name |
Type |
Length |
Comments |
One Message element is required. Available in version: The Message element and all of its attributes is available for XML only. |
|||
source |
alpha |
|
Identifies the source of the message. WEB indicates the message is from the web storefront. Required. |
target |
alpha |
|
Identifies the target of the message. RDC indicates the message is sent to CWDirect. Required. |
type |
alpha |
|
Identifies the type of information in the message. CWMaintenance indicates the message contains an order maintenance request. Required. |
One Header element is required. |
|||
company_code |
numeric |
3 |
A code for the company where the order is located. Maps to the CMP Company field in the Order Ship To file. Required. |
order_id |
numeric |
8 |
The CWDirect order number you wish to maintain. Maps to the Order # field in the Order Ship To file. Required. |
ship_to |
numeric |
3 |
The order ship to number you wish to maintain. Maps to the Ship to # field in the Order Ship To file. Required. |
maint_type |
alpha |
1 |
Indicates the type of maintenance transaction. I = Inquiry. The Maintenance Request message requests to maintain the order. The Maintenance Request Inquiry message includes only the company_code, order_id, ship_to numbers, and a maint_type of I. The E-Commerce Maintenance Response Message (CWMaintResp) sent back to the web storefront indicates all the maintainable information on the order. M = Maintenance. The Maintenance Request message provides the specifics of the maintenance request. The E-Commerce Maintenance Response Message (CWMaintResp) sent back to the web storefront confirms that the maintenance request was received. See E-Commerce Order Maintenance Transactions for more information. Required. |
shipping_method |
numeric |
2 |
The shipping method defined for the order ship to. Maps to the Ship via field in the Order Ship To file. |
gift |
alpha |
1 |
Indicates if the order ship to is a gift order. Y = The order ship to is a gift order. N = The order ship to is not a gift order. Maps to the OST Gift order field in the Order Ship To file. |
gift_message |
alpha |
256 |
Up to 5 gift messages for the order ship to. Positions 1 - 56 represent the first gift message. Positions 57 - 106 represent the second gift message. Positions 107 - 156 represent the third gift message. Positions 157 - 206 represent the fourth gift message. Positions 207 - 256 represent the fifth gift message. Maps to the OMS message field in the Order Messages file whose OMS Print? field is G. |
ship_to_fname |
alpha |
15 |
The first name of the ship to customer on the order. Maps to the: • NAM First name field in the Order Ship To file, or • NAM First name field in the Customer Ship To file, or • NAM First name field in the Customer Sold To file. |
ship_to_initial |
alpha |
1 |
The middle initial of the ship to customer on the order. Maps to the: • NAM Initial field in the Order Ship To Address file, or • NAM Initial field in the Customer Ship To file, or • NAM Initial field in the Customer Sold To file. Available in version: 6.0 or later of CWDirect. |
ship_to_lname |
alpha |
25 |
The last name of the ship to customer on the order. Maps to the: • NAM Last name field in the Order Ship To Address file, or • NAM Last name field in the Customer Ship To file, or • NAM Last name field in the Customer Sold To file. |
ship_to_company |
alpha |
30 |
The company of the ship to customer on the order. Maps to the: • NAM Company name field in the Order Ship To Address file, or • NAM Company name field in the Customer Ship To file, or • NAM Company name field in the Customer Sold To file. |
ship_to_address1 |
alpha |
32 |
The street address of the ship to customer on the order. Maps to the: • NAM Street address field in the Order Ship To Address file, or • NAM Street address field in the Customer Ship To file, or • NAM Street address field in the Customer Sold To file. |
ship_to_address2 |
alpha |
32 |
The second address line of the ship to customer on the order. Maps to the: • NAM Address line 2 field in the Order Ship To Address file, or • NAM Address line 2 field in the Customer Ship To file, or • NAM Address line 2 field in the Customer Sold To file. |
ship_to_address3 |
alpha |
32 |
The third address line of the ship to customer on the order. Maps to the: • Address line 3 field in the Order Ship To Address file, or • Address line 3 field in the Customer Ship To Extended file, or • Address line 3 field in the Customer Sold To Extended file. |
ship_to_address4 |
alpha |
32 |
The fourth address line of the ship to customer on the order. Maps to the: • Address line 4 field in the Order Ship To Address file, or • Address line 4 field in the Customer Ship To Extended file, or • Address line 4 field in the Customer Sold To Extended file. |
ship_to_apartment |
alpha |
10 |
The apartment for the address of the ship to customer on the order. Maps to the: • NAM Apartment field in the Order Ship To Address file, or • NAM Apartment field in the Customer Ship To file, or • NAM Apartment field in the Customer Sold To file. Available in version: 6.0 or later of CWDirect. |
ship_to_city |
alpha |
25 |
The city for the address of the ship to customer on the order. Maps to the: • NAM City field in the Order Ship To Address file, or • NAM City field in the Customer Ship To file, or • NAM City field in the Customer Sold To file. |
ship_to_state |
alpha |
2 |
The state code for the address of the ship to customer on the order. Maps to the: • NAM State field in the Order Ship To Address file, or • NAM State field in the Customer Ship To file, or • NAM State field in the Customer Sold To file. |
ship_to_zip |
alpha |
10 |
The postal code for the address of the ship to customer on the order. Maps to the: • NAM Zip field in the Order Ship To Address file, or • NAM Zip field in the Customer Ship To file, or • NAM Zip field in the Customer Sold To file. |
ship_to_country |
alpha |
3 |
The country code for the address of the ship to customer on the order. Maps to the: • RPR Country field in the Order Ship To Address file, or • RPR Country field in the Customer Ship To file, or • RPR Country field in the Customer Sold To file. |
ship_to_email |
alpha |
50 |
The email address of the ship to customer on the order. Maps to the: • OSA Email address field in the Order Ship To Address file, or • CSH Email address field in the Customer Ship To file, or • Email field in the Customer Sold To file. |
The Lines element can include one or more Line elements. |
|||
line_nbr |
numeric |
5 |
The order detail line sequence number. If you enter NEW in this field, the system adds a new order line to the order. Maps to the Seq # field in the Order Detail file. Required. |
item_id |
alpha |
12 |
The item number on the order line. Maps to the ITM number field in the Order Detail file. Required. |
sku |
numeric |
7 |
The short SKU code for the item on the order line. Maps to the Short SKU field in the SKU file. Required. |
quantity |
numeric |
5 |
The order quantity on the order line. Maps to the Qty ordered field in the Order Detail file. Required. |
list_price |
numeric |
7.2 |
The price for the item on the order line. Maps to the Price field in the Order Detail file. |
price_override |
alpha |
1 |
Indicates if the price from the web storefront should be used for the order line. Y = Use the price from the web storefront. N = Update the price based on regular price processing. |
gift_wrap |
alpha |
1 |
Indicates if the item on the order line should be gift wrapped. Y = Gift wrap the item. N or blank = Do not gift wrap the item. Maps to the Gift wrap field in the Order Detail file. |
personalization_id |
alpha |
2 |
The special handling code defined for the item on the order line. Overrides the additional charge code, if any, from the Item Offer or SKU Offer. Maps to the Add’l chg code field in the Order Detail file. |
personalization_cost |
numeric |
7.2 |
The special handling charge. Maps to the Special handling $ field in the Order Detail file. |
The personalization_lines element, if provided, can include one or more personalization_line elements. |
|||
personalization_text |
alpha |
45 |
Special handling instructions. Maps to the Input field in the Order Special Format file for custom special handling. |
E-Commerce Maintenance Request Message: Sample XML
A sample of the E-Commerce Maintenance Request Message (CWMaintenance) in XML format is presented below.
Inquiry message:
- <Message source="WEB" target="RDC" type="CWMaintenance">
<Header company_code="555" order_id="7609" ship_to="001" maint_type="I" />
- <Lines>
- <Line>
- <personalization_lines>
<personalization_line />
<personalization_line />
</personalization_lines>
</Line>
</Lines>
</Message>
Maintenance message:
- <Message source="WEB" target="RDC" type="CWMaintenance">
<Header company_code="555" order_id="7609" ship_to="001" maint_type="M" shipping_method="1" ship_to_fname="DARCY" ship_to_lname="BOTTGER" ship_to_address1="109 EXAMPLE LN" ship_to_city="TEMPLETON" ship_to_state="MA" ship_to_zip="01468" ship_to_country="USA" ship_to_email="DBOTTGER@EXAMPLE.COM" />
- <Lines>
- <Line line_nbr="1" item_id="2004ITEM1" sku="1745" quantity="2" list_price="1200" price_override="C">
- <personalization_lines>
<personalization_line />
<personalization_line />
</personalization_lines>
</Line>
</Lines>
</Message>
E-Commerce Maintenance Request Message: Sample NVP
A sample of the E-Commerce Maintenance Request Message (CWMaintenance) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
Inquiry message:
company_code=555;order_id=7609;ship_to=001;maint_type=I;
Maintenance message:
company_code=555;order_id=7609;ship_to=001;maint_type=M;shipping_method=1;ship_to_fname=DARCY;ship_to_lname=BOTTGER;ship_to_address1=109 SAMPLE LN;ship_to_city=TEMPLETON;ship_to_state=MA;ship_to_zip=01468;ship_to_country=USA;ship_to_email=DBOTTGER@EXAMPLE.COM;item_count=1;line_nbr=1;item_id=2004ITEM1;sku=1745;quantity=2;list_price=1200;price_override=C;
E-Commerce Maintenance Response Message (CWMaintResp)
The EC_MAINT job, started through Working with E-Commerce Job Control (EJCT), handles Maintenance Request messages from the web storefront. The first E-Commerce Maintenance Request Message (CWMaintenance) is flagged as an inquiry (the Maint_type field = I), and the Maintenance Response provides all maintainable information on the order. The next E-Commerce Maintenance Request Message (CWMaintenance), with the Maint_type field set to M, provides the specifics of the maintenance request. A subsequent email confirmation indicates whether the maintenance request was successful.
For more information: See:
• E-Commerce Maintenance and Cancel Process Overview for an overview
• E-Commerce Maintenance Response Message: Sample XML
• E-Commerce Maintenance Response Message: Sample NVP
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Name/Value Pair layout: The e-commerce Maintenance Response (EC_MAINT) name/value pair message uses the following layout: name=value.
Example:
companycode=555
order_id=7557
ship_to=001
The Attribute Name column in the table below indicates the name part of the name/value pair. The Comments column indicates the data to enter in the value part of the name/value pair. A note displays in the Comments column if the field is only available in the XML message.
If a field is included in the name/value pair message, the field must be included in the order shown below. However, if the field is empty, the field does not need to be sent.
Attribute Name |
Type |
Length |
Comments |
One Message element is required. Available in version: The Message element and all of its attributes is available for XML only. |
|||
source |
alpha |
|
Identifies the source of the message. RDC indicates the message is from CWDirect. Required. |
target |
alpha |
|
Identifies the target of the message. WEB indicates the message is sent to the web storefront. Required. |
type |
alpha |
|
Identifies the type of information in the message. CWMaintResp indicates the message contains a maintenance response message. Required. |
One Header element is required. |
|||
company_code |
numeric |
3 |
A code for the company where the order is located. From the CMP Company field in the Order Ship To file. Required. |
order_id |
numeric |
8 |
The order number where the maintenance occurred. From the Order # field in the Order Ship To file. Required. |
ship_to |
numeric |
3 |
The order ship to number associated with the maintenance. From the Ship to # field in the Order Ship To file. Required. |
ship_via |
numeric |
2 |
The ship via defined for the ship to order. From the Ship via field in the Order Ship To file. Required. |
ship_to_fname |
alpha |
15 |
The first name of the ship to customer on the order. From the: • NAM First name field in the Order Ship To Address file, or • NAM First name field in the Customer Ship To file, or • NAM First name field in the Customer Sold To file. Required. |
ship_to_initial |
alpha |
1 |
The middle initial of the ship to customer on the order. From the: • NAM Initial field in the Order Ship To Address file, or • NAM Initial field in the Customer Ship To file, or • NAM Initial field in the Customer Sold To file. Required. Available in version: 6.0 or later of CWDirect. |
ship_to_lname |
alpha |
25 |
The last name of the ship to customer on the order. From the: • NAM Last name field in the Order Ship To Address file, or • NAM Last name field in the Customer Ship To file, or • NAM Last name field in the Customer Sold To file. Required. |
ship_to_company |
alpha |
30 |
The company of the ship to customer on the order. From the: • NAM Company name field in the Order Ship To Address file, or • NAM Company name field in the Customer Ship To file, or • NAM Company name field in the Customer Sold To file. |
ship_to_address1 |
alpha |
32 |
The street address of the ship to customer on the order. From the: • NAM Street address field in the Order Ship To Address file, or • NAM Street address field in the Customer Ship To file, or • NAM Street address field in the Customer Sold To file. Required. |
ship_to_address2 |
alpha |
32 |
The second address line of the ship to customer on the order. From the: • NAM Address line 2 field in the Order Ship To Address file, or • NAM Address line 2 field in the Customer Ship To file, or • NAM Address line 2 field in the Customer Sold To file. |
ship_to_address3 |
alpha |
32 |
The third address line of the ship to customer on the order. From the: • Address line 3 field in the Order Ship To Address file, or • Address line 3 field in the Customer Ship To Extended file, or • Address line 3 field in the Customer Sold To file. |
ship_to_address4 |
alpha |
32 |
The fourth address line of the ship to customer on the order. From the: • Address line 4 field in the Order Ship To Address file, or • Address line 4 field in the Customer Ship To Extended file, or • Address line 4 field in the Customer Sold To Extended file. |
ship_to_apartment |
alpha |
10 |
The apartment/suite number for the address of the ship to customer on the order. From the: • NAM Apartment field in the Order Ship To Address file, or • NAM Apartment field in the Customer Ship To file, or • NAM Apartment field in the Customer Sold To file. Available in version: 6.0 or later of CWDirect. |
ship_to_city |
alpha |
25 |
The city for the address of the ship to customer on the order. From the: • NAM City field in the Order Ship To Address file, or • NAM City field in the Customer Ship To file, or • NAM City field in the Customer Sold To file. Required. |
ship_to_state |
alpha |
2 |
The state code for the address of the ship to customer on the order. From the: • NAM State field in the Order Ship To Address file, or • NAM State field in the Customer Ship To file, or • NAM State field in the Customer Sold To file. |
ship_to_zip |
alpha |
10 |
The postal code for the address of the ship to customer on the order. From the: • NAM Zip field in the Order Ship To Address file, or • NAM Zip field in the Customer Ship To file, or • NAM Zip field in the Customer Sold To file. |
ship_to_country |
alpha |
3 |
The country code for the address of the ship to customer on the order. From the: • RPR Country field in the Order Ship To Address file, or • RPR Country field in the Customer Ship To file, or • RPR Country field in the Customer Sold To file. Required. |
ship_to_email |
alpha |
50 |
The email address of the ship to customer on the order. From the: • OSA Email address field in the Order Ship To Address file, or • CSH Email address field in the Customer Ship To file, or • Email field in the Customer Sold To file. |
gift |
alpha |
1 |
Indicates if the ship to order is a gift order. From the OST Gift order field in the Order Ship To file. |
gift_message |
alpha |
256 |
Up to 5 gift order messages. Positions 1 - 56 represent the first order message. Positions 57 - 106 represent the second order message. Positions 107 - 156 represent the third order message. Positions 157 - 206 represent the fourth order message. Positions 207 - 256 represent the fifth order message. From the OMS message field in the Order Messages file whose OMS Print? field is G. |
The Lines element can include one or more Line elements. |
|||
sku |
numeric |
7 |
The short SKU code of the item on the order line. From the Short SKU field in the SKU file. Required. |
item_id |
alpha |
12 |
The item number on the order line. From the ITM number field in the Order Detail file. Required. |
line_nbr |
numeric |
5 |
The order sequence line number. From the Seq # field in the Order Detail file. Required. |
quantity |
numeric |
5 |
The order quantity for the item on the order line. From the ODT Qty ordered field in the Order Detail file. Required. |
qty_open |
numeric |
5 |
The quantity of the item on the order line that is in an open status. Required. |
gift_wrap |
alpha |
1 |
Indicates if the item on the order line will be gift-wrapped. From the Gift wrap field in the Order Detail file. Required. |
price |
numeric |
7.2 |
The selling price for the item on the order line. From the ODT Price field in the Order Detail file. Required. |
personalization_id |
alpha |
2 |
The special handling code defined for the item on the order line. From the Add’l chg field in the Order Detail file. |
personalization_cost |
numeric |
7.2 |
The special handling cost. From the ODT Special handling $ field in the Order Detail file. |
personalization_text |
alpha |
45 |
Special handling instructions. From the Input field in the Order Special Format file for custom special handling. |
E-Commerce Maintenance Response Message: Sample XML
A sample of the E-Commerce Maintenance Response Message (CWMaintResp) in XML format is presented below.
- <Message source="RDC" target="WEB" type="CWMaintResp">
<Header company_code="555" order_id="7609" ship_to="001" ship_via="1" ship_to_fname="DARCY" ship_to_lname="BOTTGER" ship_to_address1="109 SAMPLE LN" ship_to_city="TEMPLETON" ship_to_state="MA" ship_to_zip="01468" ship_to_country="USA" ship_to_email="KBOTTGER@EXAMPLE.COM" gift="0" gift_message="ORDER MESSAGE" />
- <Lines>
<Line sku="1745" item_id="2004ITEM1" line_nbr="11" quantity="1" qty_open="1" gift_wrap="0" price="0000500" />
<Line sku="1748" item_id="2004ITEM2" line_nbr="12" quantity="1" qty_open="1" gift_wrap="0" price="0001000" />
<Line sku="1750" item_id="2004ITEM3" line_nbr="13" quantity="1" qty_open="1" gift_wrap="0" price="0001000" />
</Lines>
</Message>
E-Commerce Maintenance Response Message: Sample NVP
A sample of the E-Commerce Maintenance Response Message (CWMaintResp) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
company_code=555;order_id=7609;ship_to=001;ship_via=1;ship_to_fname=DARCY;ship_to_lname=BOTTGER;ship_to_address1=109 SAMPLE LN;ship_to_city=TEMPLETON;ship_to_state=MA;ship_to_zip=01468;ship_to_country=USA;ship_to_email=KBOTTGER@EXAMPLE.COM;gift=0;gift_message=ORDER MESSAGE;sku=1745;item_id=2004ITEM1;line_nbr=11;quantity=1;qty_open=1;gift_wrap=0;price=0000500;sku=1748;item_id=2004ITEM2;line_nbr=12;quantity=1;qty_open=1;gift_wrap=0;price=0001000;sku=1750;item_id=2004ITEM3;line_nbr=13;quantity=1;qty_open=1;gift_wrap=0;price=0001000;
E-Commerce Order Maintenance Errors Report | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 87: E-Commerce Setup |
SO10_10x CWDirect 18.0 August 2015 OTN