Chapter 83: Creating Return Authorizations from the Web Storefront | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 84: E-Commerce Item Availability Processing |
E-Commerce Return Request Message (CWReturn)
The EC_RETURNS job, started through Working with E-Commerce Job Control (EJCT), receives E-Commerce Return Request messages from the web storefront. The Return Request message defines the order line(s) you wish to return. The E-Commerce Return Response Message (CWReturnResponse) sends the return authorization information back to the web storefront.
For more information: See:
• Creating Return Authorizations from the Web Storefront for an overview.
• E-Commerce Return Request Message: Sample XML
• E-Commerce Return 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 Return Request (EC_RETURNS) 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 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. CWReturn indicates the message contains a return request. Required. |
resp_qmgr |
alpha |
44 |
The MQ Series queue manager in Working with E-Commerce Job Control (EJCT). |
resp_q |
alpha |
44 |
The MQ Series queue identified for the process queue in Working with E-Commerce Job Control (EJCT). |
One Return element is required. |
|||
company_code |
numeric |
3 |
A code for the company where the order to return is located. Maps to the CMP company field in the Order Detail file. Required. |
order_id |
numeric |
8 |
The order number containing the item(s) to return. Maps to the Order # field in the Order Detail file. Required. |
ship_to |
numeric |
3 |
The order ship to number containing the item(s) to return. Maps to the Ship to # field in the Order Detail file. Required. |
The Lines element can include one ore more Line elements. |
|||
line_number |
numeric |
5 |
The order line sequence number containing the item to return. Maps to the Seq # field in the Order Detail file. Required. |
qty |
numeric |
5 |
The quantity of the item to return. Maps to the RAD Qty to return field in the RA Detail file. Required. |
reason |
numeric |
3 |
The reason for returning the item. Maps to the RTR Return reason code field in the RA Detail file. Required. |
E-Commerce Return Request Message: Sample XML
A sample of the E-Commerce Return Request Message (CWReturn) in XML format is presented below.
- <Message source="web" target="rdc" type="CWReturn">
- <Return company_code="555" order_id="7616" ship_to="1">
- <Lines>
<Line line_number="1" qty="1" reason="2" />
<Line line_number="2" qty="1" reason="1" />
</Lines>
</Return>
</Message>
E-Commerce Return Request Message: Sample NVP
A sample of the E-Commerce Return Request Message (CWReturn) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
company_code=555;order_id=7617;ship_to=1;line_number=1;qty=1;reason=1;line_number=2;qty=1;reason=2;
E-Commerce Return Response Message (CWReturnResponse)
The EC_RETURNS job, started through Working with E-Commerce Job Control (EJCT), generates an E-Commerce Return Response message when it receives an E-Commerce Return Request Message (CWReturn) from the web storefront. The Return Response message contains information about the return that was processed and information to print on a confirmation label.
For more information: See:
• Creating Return Authorizations from the Web Storefront for an overview.
• E-Commerce Return Response Message: Sample XML
• E-Commerce Return 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 Return Response (EC_RETURNS) 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. 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. CWReturnResponse indicates the message contains a return response. Required. |
One ReturnResponse element is required. |
|||
company_code |
numeric |
3 |
A code for the company where the return was processed. From the Company field in the RA Header file. Required. |
order_id |
numeric |
8 |
The order number containing the item(s) returned. From the Order # field in the RA Header file. Required. |
ship_to |
numeric |
3 |
The order ship to number containing the item(s) returned. From the Ship to # field in the RA Header file. Required. |
ra_number |
alpha |
16 |
The order number + ship to number + return authorization number associated with the return. none displays if the return was rejected. From the Order #, Ship to #, and RAH RA# field in the RA Header file. Required. |
total_weight |
numeric |
7.3 |
The total weight of the returned items. From the Ship weight field in the SKU file or Item file. |
date_entered |
numeric |
8 |
The date the return was processed in MMDDYYYY format. From the RAH Date entered field in the RA Header file. |
name |
alpha |
30 |
The name of the warehouse where the item will be returned. From the Name field in the Warehouse file. |
address |
alpha |
32 |
The street address for the warehouse address. From the Address field in the Warehouse file. |
address2 |
alpha |
32 |
The second address line of the warehouse address. From the Address line 2 field in the Warehouse file. |
city |
alpha |
25 |
The city for the warehouse address. From the City field in the Warehouse file. |
state |
alpha |
2 |
The state code for the warehouse address. From the State field in the Warehouse file. |
zip |
alpha |
10 |
The postal code for the warehouse address. From the Zip code field in the Warehouse file. |
country |
alpha |
3 |
The country code for the warehouse address. From the RPR country field in the Warehouse file. |
phone_number |
alpha |
14 |
The warehouse’s phone number. From the Phone field in the Warehouse file. |
E-Commerce Return Response Message: Sample XML
A sample of the E-Commerce Return Response Message (CWReturnResponse) in XML format is presented below.
- <Message source="RDC" target="WEB" type="CWReturnResponse">
<ReturnResponse company_code="555" order_id="7616" ship_to="001" ra_number="7616-1-1" total_weight="12000" date_entered="07262004" name="KAB Co." address="24 PRIME PARK WAY" address2="COCHITUATE PLACE" city="NATICK" state="MA" zip="01760" country="USA" phone_number="508 652-9489" />
</Message>
E-Commerce Return Response Message: Sample NVP
A sample of the E-Commerce Return Response Message (CWReturnResponse) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
company_code=555;order_id=7617;ship_to=001;ra_number=7617-1-1;total_weight=24000;date_entered=07262004;name=KAB Co.;address=24 PRIME PARK WAY;address2=COCHITUATE PLACE;city=NATICK;state=MA;zip=01760;country=USA;phone_number=508 652-9489;
Chapter 83: Creating Return Authorizations from the Web Storefront | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 84: E-Commerce Item Availability Processing |
SO10_08x CWDirect 18.0 August 2015 OTN