E-Commerce Order Status Message (CWOrderStatus)

 

The EC_STS_INQ job, started through Working with E-Commerce Job Control (EJCT), receives E-Commerce Order Status messages from the web storefront. The Order Status message defines the order number whose summary information you wish to review. The system sends an E-Commerce Order Status Response Message (CWStatusResponse) back to the web storefront containing the order summary information.

Note: You can also inquire about a customer’s order history or detailed information about a single order, using the Generic Customer History API.

For more information: See:

E-Commerce Order Status Processing for additional processing information.

E-Commerce Order Status Message: Sample XML

E-Commerce Order Status 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 Order Status (EC_STS_INQ) name/value pair message uses a layout such as name=value and does not include the elements (Message or OrderStatus).

Example:

companycode=555

order_id=7557

bill_to_lname=MIRANDA

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

Message

One Message 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.

Required.

resp_qmgr

alpha

44

The MQ Series queue manager identified for the process queue 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).

OrderStatus

One OrderStatus is required, and either the bill-to name, individual name, or company name should be provided. See Order Status Response Includes Response Type? for a discussion of how these fields can determine the information included in the response message.

company_code

numeric

3

A code for the company where the order is located. Maps to the CMP Company field in the Order Header file.

Required.

order_id

numeric

8

The CWDirect order number. Maps to the Order # field in the Order Header file.

Required.

bill_to_lname

alpha

25

The last name of the sold to customer on the order. Maps to the NAM Last name field in the Customer Sold To file, based on the Cust # field in the Order Header file.

ind_lname

alpha

25

The last name of the placer of the order. Maps to the CIF Last name field in the Customer Individual file, based on the OHE Placer field in the Order Header Extended file.

Available in version: 6.0 or later of CWDirect.

company_name

alpha

30

The company name of the sold to customer on the order. Maps to the NAM Company name field in the Customer Sold To file, based on the Cust # field in the Order Header file.

Available in version: 6.0 or later of CWDirect.

ship_to_details

alpha

1

Indicates whether to include ship-to information in the E-Commerce Order Status Response Message (CWStatusResponse), and to list items under each ship-to.

Note: Applies only to name-value pair (NVP). If you use XML format, the response message always lists each ship-to and its items separately.

1 = The Order Status Response message lists each ship-to and its items separately.

0 or blank = The Order Status Response message does not include the ship to information; all items on the order are listed together regardless of the ship to address.

Available in version: 4.01 or later of CWDirect.

E-Commerce Order Status Message: Sample XML

A sample of the E-Commerce Order Status Message (CWOrderStatus) in XML format is presented below.

- <Message source="WEB" target="RDC" type="CWOrderStatus">

<OrderStatus company_code="555" order_id="7564" bill_to_lname="MIRANDA"/>

</Message>

E-Commerce Order Status Message: Sample NVP

A sample of the E-Commerce Order Status Message (CWOrderStatus) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).

company_code=555;order_id=7564;bill_to_lname=MIRANDA;ship_to_details=1;

E-Commerce Order Status Response Message (CWStatusResponse)

 

The EC_STS_INQ job, started through Working with E-Commerce Job Control (EJCT), generates an Order Status Response message when an E-Commerce Order Status Message (CWOrderStatus) is received from the web storefront. The Order Status Response message contains order summary information.

For more information: See:

E-Commerce Order Status Processing for additional processing information.

E-Commerce Order Status Response Message: Sample XML

E-Commerce Order Status 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 Order Status Response (EC_STS_INQ) name/value pair message uses a layout such as name=value and does not include the elements (such as Message or Header, etc.).

Example:

companycode=555

offer_id=204

order_id=7557

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

Message

One Message element is always included in the XML message.

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. CWStatusResponse indicates the message is an order status response message.

Required.

Header

One Header element is always included in the XML message.

company_code

numeric

3

A code for the company where the order is located.

From the CMP Company field in the Order Header file.

Required.

offer_id

alpha

3

A code for the offer associated with the order.

From the Offer number field in the Source file, based on the OHD SRC Source code field in the Order Header file.

order_id

numeric

8

The CWDirect order number.

From the Order # field in the Order Header file.

Required.

response_type

numeric

2

Included if the Pass E-Commerce Order Status Response Type (H68) system control value is set to Y.

Indicates if an order was found that matches the order status inquiry.

01 = An order was found that matches the order status inquiry. The Order Status Response message includes order information.

02 = An order was found that matches the order status inquiry, but the last name defined for the inquiry does not match the last name on the order. The Order Status Response message includes order information; however the response type 02 indicates the last name defined on the order status inquiry does not match the last name on the order.

03 = An order was not found that matches the order status inquiry. The Order Status Response message includes company_code. order_id, and a response_type of 3, but does not include order information.

 

 

 

If the Pass E-Commerce Order Status Response Type (H68) system control value is set to N, the system only sends an Order Status Response message to the web storefront if an order number is found that matches the order_id in the Order Status message and a match is found on at least one of the name fields in the request (bill_to_lname, ind_lname, or company_name).

Required.

Available in version: 6.0 or later of CWDirect.

date_placed

numeric

8

The date the order was placed.

From the OHD Order date field in the Order Header file.

ShipTo

The ShipTos element in the XML message can include one or more ShipTo elements.

If the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y, the system includes the complete ship to name and address information in the ShipTo element; otherwise, only the ship to customer’s number, first name, and last name are included in the ShipTo element.

ship_to_number

numeric

3

The order ship to number on the order. From the Ship to # field in the Order Ship To file.

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.

NAM First name field in the Customer Ship To file, or

NAM First name field in the Customer Sold To file.

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.

ship_to_street_addr

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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect.

ship_to_addr_line_2

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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_addr_line_3

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 Extended file.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_addr_line_4

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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_city

alpha

25

The city 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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_state

alpha

2

The state 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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_zip

alpha

10

The postal code 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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

ship_to_country

alpha

3

The country code 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.

This field is only included if the Pass Ship To Address in E-Commerce Status Inquiry (J33) system control value is set to Y.

Available in version: 10.0 or later of CWDirect for XML only.

allow_maint

alpha

1

Indicates if the order is eligible for maintenance.

Y = The order is eligible for maintenance; see E-Commerce Maintenance and Cancel Process Overview.

N = The order is not eligible for maintenance.

This field is included only if the order type on the order matches the E-Commerce Order Type (G42) OR the Internet order (Future use sts 1) field in the Order Header file is set to I.

Invoice

The Invoices element in the XML message can include one or more Invoice elements. A separate Invoice element is included for each invoice on the order; however, the invoice number is not included.

date_shipped

numeric

8

The date the order was shipped. From the IDT Date shipped field in the Invoice Detail file.

tracking_id

alpha

30

The shipment tracking number assigned to the order shipment. From the MUA Tracking # field in the Manifest Upload Audit file; not included if there is no record in this file.

ship_via

numeric

2

The shipper assigned to the order shipment. From the VIA Ship via code field in the Manifest Upload Audit file; not included if there is no record in this file.

Item

The Items element can include one or more Item elements.

Note: If you pre-bill items, the Pre Billed Amount Item (J72) is included in the response message. The status is In stock and reserved if the pre-billing has not yet occurred; otherwise, the response includes the shipment (pre-billing) date. The quantity is always 1 for each pre-billable item on the order, regardless of the quantity of the pre-billable item.

sku

numeric

7

The short SKU code of the item on the order line. From the Short SKU field in the SKU file.

item_id

alpha

12

The item number on the order line. From the ITM Number field in the Order Detail file.

line_nbr

numeric

3

The order line sequence number. From the Seq # field in the Order Detail file.

Note: This is the sequence number, not the order line number.

description

alpha

40

A description of the item on the order line. From the Description field in the Item file.

sku_description1

alpha

10

A description of the first SKU element. From the Element 1 desc field in the SKU Element 1 file.

sku_description2

alpha

10

A description of the second SKU element.From the Element 2 desc field in the SKU Element 2 file. Included only if item/SKU has this SKU element.

sku_description3

alpha

10

A description of the third SKU element.From the Element 3 desc field in the SKU Element 3 file. Included only if item/SKU has this SKU element.

quantity

numeric

5

The quantity of the item ordered on the order line. From the ODT Qty ordered field in the Order Detail file.

list_price

numeric

7.2

The selling price of the item on the order line. From the ODT Price field in the Order Detail file.

status

alpha

40

Indicates the status of the item on the order line, based on the ODT Line status field in the Order Detail file. Valid values:

Item sent to store for pickup (SP)

Your membership is being processed (Y)

Item is no longer available (S)

Item will be shipped directly from the vendor (D)

In stock and reserved (IN) (This status also applies to non-inventory items.)

Item is backordered (BO)

X reserved (1, partial backorder)

No status is indicated for set master items.

rtn_qty

numeric

5

The quantity of the item on the order line that has been shipped, and so is eligible to be returned. Not included for set components, just the set master item.

cancel_qty

numeric

5

The quantity of the item on the order line that is open, and so is eligible to be canceled. Included only for e-commerce orders (the Internet order flag on the Order Header is set to I).

E-Commerce Order Status Response Message: Sample XML

A sample of the E-Commerce Order Status Response Message (CWStatusResponse) in XML format is presented below.

- <Message source="RDC" target="WEB" type="CWStatusResponse">

<Header company_code="555" offer_id="204" order_id="7564" response_type="01" date_placed="07192004" />

- <ShipTos>

- <ShipTo ship_to_number="001" ship_to_fname="BERNADETTE" ship_to_lname="MIRANDA">

- <Invoices>

<Invoice date_shipped="07192004" ship_via="1" />

</Invoices>

- <Items>

<Item sku="1748" item_id="2004ITEM2" line_nbr="2" description="2004ITEM2 ITEM DESCRIPTION" quantity="1" list_price="0001000" status="1 unit shipped on 07/19/2004" />

<Item sku="1745" item_id="2004ITEM1" line_nbr="11" description="2004ITEM1 DESCRIPTION" quantity="1" list_price="0000500" status="" />

<Item sku="1750" item_id="2004ITEM3" line_nbr="13" description="2004ITEM3 ITEM DESCRIPTION" quantity="1" list_price="0001000" status="" />

</Items>

</ShipTo>

</ShipTos>

</Message>

E-Commerce Order Status Response Message: Sample NVP

A sample of the E-Commerce Order Status Response Message (CWStatusResponse) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).

company_code=555;offer_id=204;order_id=7564;response_type=01;date_placed=07192004;ship_to_number=001;ship_to_fname=BERNADETTE;ship_to_lname=MIRANDA;date_shipped=07192004;ship_via=1;sku=1748;item_id=2004ITEM2;line_nbr=2;description=2004ITEM2 ITEM DESCRIPTION;quantity=1;list_price=0001000;status=1 unit shipped on 07/19/2004;sku=1745;item_id=2004ITEM1;line_nbr=11;description=2004ITEM1 DESCRIPTION;quantity=1;list_price=0000500;status=;sku=1750;item_id=2004ITEM3;line_nbr=13;description=2004ITEM3 ITEM DESCRIPTION;quantity=1;list_price=0001000;status=;

SO10_07x CWDirect 18.0 August 2015 OTN