Order Interface XML Message Formats | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 42: Order Creation and Maintenance Errors |
Detailed Order XML Response (CWORDEROUT)
The system generates this response to the Inbound Order XML Message (CWORDERIN) if the response_type is D (detail) or E (errors), although errors are included only for a response_type of E.
Includes final totals? The Perform Order Edit Interactively (I56) system control value determines whether the information in this response message includes the final order totals and other information updated at the order edit, or includes preliminary totals. This system control value also controls whether errors identified through the order edit are listed in the response if the response_type in the Inbound Order XML Message (CWORDERIN) is set to E. See that system control value for more information.
Note:
• All numeric values with decimal positions are passed as implied decimals. For example, a dollar value of $10.00 is passed as 1000.
• Attributes are included in the response only if they contain a value. Blank attributes are not passed.
For more information: See:
• Detailed Order Response Message without Errors: Sample XML for a sample message.
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Message Attribute |
Alpha/ numeric |
Positions |
Comments |
source |
alphanumeric |
|
Identifies the source of the XML message. RDC indicates the XML message originates from CWDirect. |
target |
alphanumeric |
|
Identifies the target of the XML message. IDC indicates the XML message is sent to CWIntegrate. |
type |
alphanumeric |
|
Identifies the type of information in the XML message. |
company_code |
numeric |
3 |
The company_code from the Inbound Order Message. |
numeric |
8 |
The order number assigned by the system. |
|
offer_id |
alphanumeric |
3 |
The offer associated with the source code assigned to the order header. |
reference_ order_number |
alphanumeric |
30 |
The order_number from the Inbound Order Message. |
customer_ number |
numeric |
9 |
The number identifying the customer specified in the Inbound Order Message, or created by the system. See Customer Sold To Selection, Creation and Update. |
alternate_sold_ to_id |
alphanumeric |
15 |
The Alt cust # field at the Second Create Customer Sold To Screen. |
bill_to_number |
numeric |
7 |
The number identifying the bill-to customer specified in the Inbound Order Message, created by the system, or assigned to the sold-to customer. See Customer Bill To Selection and Creation. Passed only if the customer or order has a bill-to account. |
numeric |
8 |
The order_date from the Inbound Order Message. |
|
alpha |
2 |
The order_channel from the Inbound Order Message |
|
ind |
alpha |
1 |
Valid values are: Y = The customer has an existing Bill Me Later account N = The customer does not have an existing Bill Me Later account The system determines the setting of this flag based on whether there is an account number in the Customer Sold To BML file, regardless of whether the customer actually uses a Bill Me Later payment method on this order. For example, if the customer is applying for a Bill Me Later account with this order, then this flag is set to N, because the order has not gone out for authorization yet and the account number has not yet been established. The customer’s Bill Me Later account number, if it exists, is shown on the Display Customer Order History Screen. See Bill Me Later Processing for more information. |
alpha |
1 |
The current status of the order. Valid values are: H = Held S = Suspended E = In error Included only if the status is not open (blank). |
|
order_type |
alpha |
1 |
The order_type from the Inbound Order message. |
order_type_ description |
alpha |
30 |
The description from the Order Type file; see Establishing Order Types (WOTY). |
b2b_order |
alpha |
1 |
From the B2B order? flag in the Order Header file. This flag will always be set to N. Valid values are: Y = This is a B2B order; see Entering B2B Orders N = This is not a B2B order This flag is set only for B2B orders and orders you receive through the e-commerce interface or the Inbound Order Message. |
store_restock_ order |
alpha |
1 |
From the Store restock order? flag in the Order Header file. This flag will always be set to N. Valid values are: Y = This is a retail Store restock order N = This is not a retail store restock order Note: This flag is set only for orders you receive through the e-commerce interface or the Inbound Order Message. |
entered_date |
numeric |
8 |
The enter_date from the Inbound Order Message. |
entered_time |
numeric |
6 |
The enter_time from the Inbound Order Message. |
source_code |
alphanumeric |
9 |
The source_code from the Inbound Order Message. |
Each of the components of the sold-to customer’s name and address, listed below, are passed only if the related field for the customer record has a value specified. |
|||
sold_to_prefix |
alphanumeric |
3 |
|
sold_to_fname |
alphanumeric |
15 |
|
sold_to_initial |
alphanumeric |
1 |
|
sold_to_lname |
alphanumeric |
25 |
|
sold_to_suffix |
alphanumeric |
3 |
|
sold_to_ company |
alphanumeric |
30 |
|
sold_to_busres |
alphanumeric |
1 |
|
sold_to_ address1 |
alphanumeric |
32 |
|
sold_to_ address2 |
alphanumeric |
32 |
|
sold_to_ address3 |
alphanumeric |
32 |
|
sold_to_ address4 |
alphanumeric |
32 |
|
sold_to_ apartment |
alphanumeric |
10 |
|
sold_to_city |
alphanumeric |
25 |
|
sold_to_state |
alphanumeric |
2 |
|
sold_to_state_ description |
alphanumeric |
25 |
As set up through Setting Up the Country File (WCTY). |
sold_to_zip |
alphanumeric |
10 |
|
sold_to_country |
alphanumeric |
3 |
|
sold_to_day_ phone |
alphanumeric |
14 |
|
sold_to_eve_ phone |
alphanumeric |
14 |
|
sold_to_fax_ phone |
alphanumeric |
14 |
|
allow_rent |
alphanumeric |
1 |
|
allow_email |
alphanumeric |
1 |
|
allow_mail |
alphanumeric |
1 |
|
sold_to_opt_in |
alphanumeric |
2 |
|
ind_number |
numeric |
3 |
The ind_number from the Inbound Order Message, or assigned by the system. Passed only if there is an individual on the order. |
Note: The bill-to name and address is from the Customer Bill To file, and is included only if there is a bill-to customer on the order. See Creating and Updating Bill-to Customers (WCBT) for a description of the bill-to information. |
|||
bill_to_prefix |
alphanumeric |
3 |
|
bill_to_fname |
alphanumeric |
15 |
|
bill_to_initial |
alphanumeric |
1 |
|
bill_to_lname |
alphanumeric |
25 |
|
bill_to_suffix |
alphanumeric |
3 |
|
bill_to_company |
alphanumeric |
30 |
|
bill_to_busres |
alphanumeric |
1 |
|
bill_to_address1 |
alphanumeric |
32 |
|
bill_to_address2 |
alphanumeric |
32 |
|
bill_to_address3 |
alphanumeric |
32 |
|
bill_to_address4 |
alphanumeric |
32 |
|
bill_to_ apartment |
alphanumeric |
10 |
|
bill_to_city |
alphanumeric |
25 |
|
bill_to_state |
alphanumeric |
2 |
|
bill_to_state_ description |
alphanumeric |
25 |
As set up through Setting Up the Country File (WCTY). |
bill_to_zip |
alphanumeric |
10 |
|
bill_to_country |
alphanumeric |
3 |
|
bill_to_day_ phone |
alphanumeric |
14 |
|
bill_to_eve_ phone |
alphanumeric |
14 |
|
bill_to_fax_ phone |
alphanumeric |
14 |
|
pc_expiration_ date |
numeric |
8 |
The expiration date of the customer’s current President’s Club membership, if any, or the membership the customer is purchasing on the current order. YYYYMMDD format. See Selling President’s Club Memberships through the Order API for a discussion, and see President’s Club Memberships for an overview on the President’s Club. Available in XML version: 3.0 (release 9.5 of CWDirect). |
pc_type |
alphanumeric |
1 |
Indicates the recommended action to take related to a President’s Club membership. Included only if the Use President’s Club Membership (H94) system control value is set to Y. Possible values are: • J = The customer is not already a member of the President’s Club. Prompt the customer to join. • R = The customer’s current President’s Club membership is due for renewal. Prompt the customer to renew. • X = There is an error related to the President’s Club membership. Errors are included in the Error element if the response_type in the Inbound Order XML Message (CWORDERIN) was set to E. • V = The customer’s President’s Club membership is flagged for auto-renewal. Do not prompt the customer to renew. If the customer’s membership is current and it is not yet time to prompt for renewal, the pc_type is not included in the response. |
|
|
|
See Selling President’s Club Memberships through the Order API for a discussion, and see President’s Club Memberships for an overview on the President’s Club. Available in XML version: 3.0 (release 9.5 of CWDirect). |
pc_program_ key |
alphanumeric |
6 |
Indicates the President’s Club program, if any, in which the customer is currently enrolled. See Selling President’s Club Memberships through the Order API for a discussion, and see President’s Club Memberships for an overview on the President’s Club. Available in XML version: 3.0 (release 9.5 of CWDirect). |
See the Display Order Pay Type Screen (1 of 2) for more information on order payment methods. |
|||
payment_seq_ number |
numeric |
2 |
Indicates the sequence in which the payment methods were added to the order. From the Order Payment Method file. |
pay_type |
numeric |
2 |
The payment_type from the Inbound Order Message. |
pay_type_desc |
alpha |
30 |
The description associated with the pay type. See Working with Pay Types (WPAY). |
credit_card_nbr |
alpha |
20 |
The cc_number from the Inbound Order Message. Encryption: If you use credit card encryption, the credit card number in this message will not be encrypted because the message is sent to an external system. Tokenization: If you use credit card tokenization, the number may be a token rather than the actual credit card number. Auto-assignment: If the Allow auto-assign field for a pay category 2 (credit card) pay type is set to Y, the system defaults the pay category 2 pay type to the order whose leading digits match the leading digits you enter in the credit_card_nbr field for the order. See Allow Auto-Assignment of Pay Category 2 Pay Type for additional processing information. |
credit_card_ exp_dt |
numeric |
4 |
The cc_exp_month and the cc_exp_year from the Inbound Order Message. |
credit_card_ auth_dt |
numeric |
6 |
The auth_date from the Inbound Order Message. |
credit_card_ auth_nbr |
alpha |
7 |
The auth_number from the Inbound Order Message. |
start_date |
numeric |
4 |
The start_date from the Inbound Order Message. |
card_issue_nbr |
alpha |
2 |
The card_issue_nbr from the Inbound Order Message. |
check_nbr |
numeric |
9 |
The check_number from the Inbound Order Message. |
gift_cert_nbr |
numeric |
7 |
The gift_certificate_number from the Inbound Order Message. |
amt_to_chg |
numeric |
9.2 |
The amt_to_charge from the Inbound Order Message. |
ship_to_number |
numeric |
3 |
The number identifying the ship-to address on the order. Assigned by the system. |
The following attributes related to order totals are passed only if these amounts exist on the order. The Perform Order Edit Interactively (I56) system control value determines whether the information in this response message includes the final order totals and other information updated at the order edit, or includes preliminary totals. See that system control value for more information. |
|||
sub_total |
numeric |
9.2 |
The merchandise total on the order ship-to, after applying any repricing or discounts. |
discount_total |
numeric |
11.2 |
The discount total on the order ship-to. |
shipping |
numeric |
7.2 |
Total freight charges for the order ship-to. |
numeric |
7.2 |
The total tax for the order ship-to. |
|
additional_ shipping |
numeric |
7.2 |
The total additional freight (Freight +) for the order ship-to. |
additional_ charges |
numeric |
7.2 |
The total additional charges for the order ship-to. |
handling |
numeric |
7.2 |
The total handling charges for the order ship-to. |
order_total |
numeric |
11.2 |
The total of all merchandise, shipping, charges, handling, and tax for the order ship-to. |
alpha |
1 |
Indicates the status of this shipping address. This status could differ from the order_status if, for example, the order has multiple shipping addresses and you canceled just one. Included only if the status is not open (blank). |
|
numeric |
7.2 |
The total Canadian Goods and Service Tax, if any, that applies to the order shipping address. The GST and the PST are included in the tax total. |
|
numeric |
7.2 |
The total Canadian Provincial Services Tax, if any, that applies to the order shipping address. The GST and the PST are included in the tax total. |
|
alpha |
1 |
The gift flag from the Inbound Order Message. |
|
alpha |
15 |
The ship_to_po_number from the Inbound Order Message. |
|
numeric |
5.2 |
The discount percentage, if any, from the Order Ship To file. |
|
numeric |
2 |
||
alpha |
30 |
The description of the ship via, as set up through Working with Ship Via Codes (WVIA). |
|
shipping_ override |
alpha |
1 |
Indicates whether the Freight override flag is set. Set to Y if a freight amount was specified in the inbound order message; otherwise, not included. The Display Order Properties Screen displays the Freight override flag on the order. Available in XML version: 2.0 (release 8.0 of CWDirect). |
free_gift |
alphanumeric |
30 |
Not currently implemented. |
customer_ number |
numeric |
9 |
Indicates the recipient customer for the order. Passed only if the shipping address is not the same as the sold-to customer. See Creating or Selecting Shipping Addresses or Customers. |
permanent_ship_to_number |
numeric |
3 |
Indicates the permanent ship-to customer on the order. Passed only if there is a permanent ship-to. |
See Creating or Selecting Shipping Addresses or Customers for an overview of how you specify various types of shipping addresses in the Inbound Order Message. Each of the ship_to name and address attributes listed below is passed only if the related field for the customer, recipient, permanent ship-to or order ship-to specifies a value. |
|||
ship_to_prefix |
alphanumeric |
3 |
|
ship_to_fname |
alphanumeric |
15 |
|
ship_to_initial |
alphanumeric |
1 |
|
ship_to_lname |
alphanumeric |
25 |
|
ship_to_suffix |
alphanumeric |
3 |
|
ship_to_ company |
alphanumeric |
30 |
|
ship_to_busres |
alphanumeric |
1 |
|
ship_to_ address1 |
alphanumeric |
32 |
|
ship_to_ address2 |
alphanumeric |
32 |
|
ship_to_ address3 |
alphanumeric |
32 |
|
ship_to_ address4 |
alphanumeric |
32 |
|
ship_to_ apartment |
alphanumeric |
10 |
|
ship_to_city |
alphanumeric |
25 |
|
ship_to_state |
alphanumeric |
2 |
|
ship_to_state_ description |
alpha |
25 |
As set up through Setting Up the Country File (WCTY). |
ship_to_zip |
alphanumeric |
10 |
|
ship_to_country |
alphanumeric |
3 |
|
line_seq_ number |
numeric |
3 |
A unique number to identify each detail line on the order. |
short_sku_ number |
numeric |
7 |
From the SKU file; see short_sku_number for more information. Passed regardless of whether the short SKU was specified in the Inbound Order Message. |
retail_ref_ number |
numeric |
15 |
See retail_ref_number. Passed only if a retail reference number exists for the item, but regardless of whether it was specified in the Inbound Order Message. |
status |
alphanumeric |
1 |
Set to S if the item is sold out; otherwise, not passed. |
item_id |
alphanumeric |
12 |
Always passed. |
item_ description |
alphanumeric |
30 |
The description of the item. |
sku |
alphanumeric |
14 |
Passed only if the item has SKUs. |
sku_description |
alphanumeric |
40 |
The description of the SKU. |
actual_price |
numeric |
7.2 |
The unit price of the item from the Order Detail file. Not included for free gift or no-charge items. Set items: The actual_price is specified for the master item of a set item, and not for the components, unless the set has |
offer_price |
numeric |
7.2 |
The unit price of the item as defined for the Item Offer or SKU offer and saved in the Order Detail file. |
drop_ship |
alphanumeric |
1 |
A Y indicates the item is a drop ship item; otherwise, N is passed. |
detail_ship_via |
numeric |
2 |
Passed only if the order detail line has a ship via override. See line_shipping_method. |
The three following values are related to store fulfillment requests. When an order line is flagged for store fulfillment, the order detail information is available for the order response message only if the system has not yet created the actual store fulfillment request, which deletes the order detail line. See Merchandise Locator and Store Fulfillment API through .NET for an overview. |
|||
pickup_type |
alphanumeric |
2 |
Indicates the store fulfillment request type, if any. Valid values are: SP = the customer will pick up the item(s) at the store SS = the store location will ship the item(s) directly to the customer |
pickup_system_ location |
alphanumeric |
10 |
A code identifying the system associated with the store fulfillment location. For example, if pickup_location 10 indicates a particular store, the system might indicate the CWStore database. Passed only for a store fulfillment request. |
pickup_location |
alphanumeric |
10 |
A code identifying the location where the customer will pick up the item, or which should ship the item directly to the customer. Passed only for a store fulfillment request. |
order_quantity |
numeric |
5 |
The quantity from the Inbound Order Message. Always passed. |
reserved_ warehouse |
numeric |
3 |
The warehouse where the item is reserved. Passed only if the item is reserved. |
reserve_ quantity |
numeric |
5 |
Passed only if the item is reserved. May be less than the order_quantity. |
sold_out_ quantity |
numeric |
5 |
Passed only if the item is sold out. May be less than the order_quantity. |
expected_ship_ date |
numeric |
8 |
Passed only if the item is backordered and there is an open purchase order for the item. MMDDYYYY format, or if the Calculate Expected Date in OE if No PO (J61) system control value is set to Y. See Determining the Expected Ship Date. This date is included for drop ship items only if the Assign Drop Ship Expected Ship Date (I59) system control value is set to Y. See that system control value for more information. |
tax |
numeric |
10.5 |
The total tax amount applied to the order detail line. Available in XML version: 2.0 (release 8.0 of CWDirect). |
gst_tax |
numeric |
10.5 |
The total GST tax, if any, applied to the order detail line. See GST Rate (A90) for a discussion. Available in XML version: 2.0 (release 8.0 of CWDirect). |
pst_tax |
numeric |
10.5 |
The total PST tax, if any, applied to the order detail line. See GST Rate (A90) for a discussion. Available in XML version: 2.0 (release 8.0 of CWDirect). |
set_main_item |
alpha |
1 |
Indicates whether the item is the main item of a set: Y = a main set item N = not a main set item Available in XML version: 4.0 (release 12.5 of CWDirect). |
set_component_item |
alpha |
1 |
Indicates whether the item was added to the order as a component of a set: Y = a set component N = not a set component Available in XML version: 4.0 (release 12.5 of CWDirect). |
set_seq_number |
numeric |
3 |
Indicates the sequence number that uniquely identifies a set and its components on this order. The main set item and its components have the same set sequence number. This attribute is not included for items that are not part of a set. Available in XML version: 4.0 (release 12.5 of CWDirect). |
gift_wrap |
alpha |
1 |
Indicates whether the item should be gift wrapped: Y = gift wrap the item N = do not gift wrap the item Available in XML version: 5.0 (release 17.0 of CWDirect) |
Note: This element is not used as part of the Generic Order Interface (Order API). |
|||
invoice_nbr |
numeric |
7 |
|
invoice_ship_ quantity |
numeric |
5 |
|
invoice_ship_ date |
numeric |
8 |
|
invoice_tracking_nbr |
alpha |
30 |
|
invoice_ship_ via_code |
numeric |
2 |
|
invoice_ship_ via_desc |
alpha |
30 |
|
This element is included only if the response_type in the Inbound Order XML Message (CWORDERIN) is set to E, and the system finds errors after processing the information in the inbound message. See Order Creation and Maintenance Errors for a listing of possible errors. Available in XML version: The Errors element and all of its attributes are available in version 3.0 (release 9.5 of CWDirect). |
|||
error_type |
alphanumeric |
3 |
Indicates whether the error is related to the order header or one of the order detail lines. Valid values are: • HDR = The error is related to the order header • DTLS = The error is related to an order detail line |
error_code |
alphanumeric |
2 |
A unique code to identify the error. See Order Creation and Maintenance Errors for a listing of possible errors. |
error_ship_to |
numeric |
3 |
Identifies the shipping address on the order that is related to the error. Set to 1 if there is a single shipping address on the order. |
error_odt_seq |
numeric |
5 |
Identifies the order detail line number related to the error. |
error_text |
alphanumeric |
25 |
The description of the error. See Order Creation and Maintenance Errors for a listing of possible errors. |
The Promotion element lists the type of end of order promotions that were applied to the order. You can use this information on the web storefront to display to the customer the type of promotions for which the order qualifies, such as ship via upgrade, reduced or free freight, or free items. Other types of promotions, such as those that apply a discount to item pricing, are not listed in this element, although any discounts they apply are reflected in the pricing indicated in the response message. The Promotion element is included only if the Apply End of Order Discounts during Repricing (J37) system control value is set to Y. Also, the response_type must be set to D (detail) or E (errors). Available in XML version: The Promotion element and all of its attributes are available in version 3.0 (release 10.0 of CWDirect). |
|||
promotion_type_code |
alphanumeric |
2 |
A code used to identify the type of promotion applied to the order. Valid values: FF = free freight FO = freight override FA = additional charge on freight promotion FV = ship via override on freight promotion AA = additional charge on additional freight promotion AV = ship via override on additional freight promotion OA = additional charge on order promotion OV = ship via override on order promotion TA = additional charge on tiered promotion TG = free gift on tiered promotion RA = additional charge on offer promotion RG = free gift on offer promotion SA = additional charge on source promotion SG = free gift on source promotion PI = package insert |
|
|
|
PT = premium See End of Order Discounts Applied during Repricing for more information about each promotion type. From the Promotion type field in the Order Discount Audit file. |
promotion_type_code_desc |
alphanumeric |
25 |
A description of the type of promotion applied to the order. Valid values are: • free freight • freight override • additional charge on freight promotion • ship via override on freight promotion • additional charge on additional freight promotion • ship via override on additional freight promotion • additional charge on order promotion • ship via override on order promotion • additional charge on tiered promotion • free gift on tiered promotion • additional charge on offer promotion • free gift on offer promotion • additional charge on source promotion • free gift on source promotion • package insert • premium See End of Order Discounts Applied during RepricingEnd of Order Discounts Eligible during Repricing for more information about each promotion type. |
promotion_ original_ freight_amt |
numeric |
7.2 |
The freight amount for the order ship to before it was discounted by a freight promotion. This value is only populated for the FF (free freight) or FO (freight override) promotion types. From the Original freight field in the Order Discount Audit file. |
promotion_ freight_amt |
numeric |
7.2 |
The freight amount for the order ship to after the freight promotion has been applied to the order. If freight is not being charged for the order ship to, the freight amount is 0.00. This value is only populated for the FF (free freight) and FO (freight override) promotion types. From the Promotion freight amt field in the Order Discount Audit file. |
promotion_ addl_charge_ code |
numeric |
2 |
The additional charge code that was added to the order as a result of the promotion. This value is only populated for the following promotion types: • FA (additional charge on freight promotion) • AA (additional charge on additional freight promotion) • OA (additional charge on order promotion) • TA (additional charge on tiered promotion) • RA (additional charge on offer promotion) • SA (additional charge on source promotion) From the Add’l chg code field in the Additional Charge file. Based on the OAC seq # field in the Order Discount Audit file. |
promotion_ addl_charge_ code_desc |
alphanumeric |
30 |
The description of the additional charge code that was added to the order as a result of the promotion. From the Description field in the Additional Charge file. |
promotion_ addl_charge_ amt |
numeric |
7.2 |
The amount of the additional charge that was applied to the order as a result of the promotion. Typically, this amount is a negative amount. This value is only populated for the following promotion types: • FA (additional charge on freight promotion) • AA (additional charge on additional freight promotion) • OA (additional charge on order promotion) • TA (additional charge on tiered promotion) • RA (additional charge on offer promotion) • SA (additional charge on source promotion) From the OAC Add’l charges field in the Order Discount Audit file. |
original_ shipping_ method |
numeric |
2 |
The ship via for the order ship to before it was overridden by the promotion. This value is only populated for the following promotion types: • FV (ship via override on freight promotion) • AV (ship via override on additional freight promotion) • OV (ship via override on order promotion) From the Original ship via field in the Order Discount Audit file. |
original_ shipping_ method_desc |
alphanumeric |
30 |
The description of the ship via that was assigned to the order before it was overridden by the promotion. From the Shipper name field in the Ship Via file. |
promotion_ shipping_ method |
numeric |
2 |
The ship via for the order ship to after the promotion has been applied to the order. This value is only populated for the following promotion types: • FV (ship via override on freight promotion) • AV (ship via override on additional freight promotion) • OV (ship via override on order promotion) From the Promotion ship via field in the Order Discount Audit file. |
promotion_ shipping_ method_desc |
alphanumeric |
30 |
The description of the ship via that was assigned to the order as a result of the promotion. From the Shipper name field in the Ship Via file. |
promotion_ item_id |
alphanumeric |
12 |
A code for the item that was added to the order as a result of a free gift, premium, or package insert. This value is only populated for the following promotion types: • TG (free gift on tiered promotion) • RG (free gift on offer promotion) • SG (free gift on source promotion) • PI (package insert) • PT (premium) From the ITM number field in the Order Detail file. Based on the ODT seq # field in the Order Discount Audit file. |
promotion_ item_desc |
alphanumeric |
40 |
A description of the item that was added to the order as a result of a free gift, premium, or package insert. From the Description field in the Item file. |
promotion_ sku |
alphanumeric |
14 |
A code for the SKU of the item that was added to the order as a result of a free gift, premium, or package insert. This value is only populated for the following promotion types: • TG (free gift on tiered promotion) • RG (free gift on offer promotion) • SG (free gift on source promotion) • PI (package insert) • PT (premium) From the SKU code field in the Order Detail file. Based on the ODT seq # field in the Order Discount Audit file. |
promotion_ sku_desc |
alphanumeric |
40 |
A description of the SKU that was added to the order as a result of a free gift, premium, or package insert. From the Description field in the SKU file. |
promotion_ offer_price |
numeric |
7.2 |
The offer price for the order detail line associated with the promotion, if one exists. This value is only populated for the following promotion types: • TG (free gift on tiered promotion) • RG (free gift on offer promotion) • SG (free gift on source promotion) • PI (package insert) • PT (premium) From the Offer price field in the Order Detail file. |
promotion_ price |
numeric |
7.2 |
The selling price of the order detail line associated with the promotion. If the item is free of charge, the price is 0.00. This value is only populated for the following promotion types: • TG (free gift on tiered promotion) • RG (free gift on offer promotion) • SG (free gift on source promotion) • PI (package insert) • PT (premium) From the ODT price field in the Order Detail file. |
promotion_ line_seq_nbr |
numeric |
5 |
The sequence number of the order line associated with the promotion. From the ODT seq # field in the Order Discount Audit file. |
Ord_Msg The Ord_Msg element lists each order message whose Print flag is set to G (gift message). See Adding Order Messages for background. Available in XML version: The Ord_Msg and each of its attributes are available in version 5.0 (release 17.0 of CWDirect). |
|||
ord_msg_code |
alphanumeric |
1 |
Always set to G (gift message). Only gift messages are included in the CWORDEROUT message. |
ord_msg_text |
alphanumeric |
60 |
A gift message entered for the order. |
Detailed Order Response Message without Errors: Sample XML
A sample of the Detailed Order XML Response (CWORDEROUT) that does not include errors is presented below. The ORDER_IN job produces this response format if the response_type for the Inbound Order XML Message (CWORDERIN) is set to D, or if the response_type is E and there are no errors.
<Message source="RDC" target="IDC" type="CWORDEROUT">
<Header company_code="27" order_id="10540" reference_order_number="EXT_SAMP" customer_number="1266" alternate_sold_to_id="000000056" order_date="12232013" order_channel="I" bill_me_later_ind="N" order_type="I" order_type_description="E-COMMERCE ORDERS" b2b_order="N" store_restock_order="N" entered_date="12232013" entered_time="163947" email_confirm_date="12232013" source_code="SOURCE" offer_id="OFR" sold_to_prefix="MR." sold_to_fname="GEORGE" sold_to_initial="D" sold_to_lname="WUFFE" sold_to_company="COMMERCIALWARE" sold_to_busres="B" sold_to_address1="24 PRIME PARK WAY" sold_to_city="NATICK" sold_to_state="MA" sold_to_state_description="MASSACHUSETTS" sold_to_zip="01760" sold_to_country="USA" allow_rent="Y" allow_mail="Y" sold_to_opt_in="O1" >
<Payments>
<Payment payment_seq_number="1" pay_type="5" pay_type_desc="VISA" credit_card_nbr="5" credit_card_exp_dt="1220"/>
</Payments>
<ShipTos>
<ShipTo ship_to_number="1" sub_total="5000" shipping="500" additional_shipping="123" tax="500" order_total="6123" gift_order="N" ship_via_code="1" ship_via_description="Large Thumb Inc." ship_to_prefix="MR." ship_to_fname="JAKE" ship_to_initial="D" ship_to_lname="VAN VOORHIS" ship_to_company="VAN VOORHIS CONSULTING" ship_to_busres="B" ship_to_address1="1800 WEST PARK DRIVE" ship_to_city="WESTBOROUGH" ship_to_state="MA" ship_to_state_description="MASSACHUSETTS" ship_to_zip="01581" ship_to_country="USA" >
<Details>
<Detail line_seq_number="1" short_sku_number="1928" item_id="PEN23" item_description="COMFORT-GRIP PEN" sku="BLUE" sku_description="BLUE INK" actual_price="500" offer_price="500" drop_ship="N" order_quantity="10" tax="500000" reserved_warehouse="2" reserve_quantity="10" gift_wrap="Y">
</Detail>
</Details>
<Ord_Msgs>
<Ord_Msg ord_msg_code="G" ord_msg_text="Merry Christmas from your friend George">
</Ord_Msg>
</Ord_Msgs>
</ShipTo>
</ShipTos>
</Header>
</Message>
Detailed Order Response Message with Errors: Sample XML
A sample of the Detailed Order XML Response (CWORDEROUT) that includes errors is presented below. The ORDER_IN job produces this response format if the response_type for the Inbound Order XML Message (CWORDERIN) is set to E and there are any errors.
For more information: See Order Acknowledgement Message: Sample XMLs for an example of the message generated when the order API cannot identify the order to update or the company where the order should be created.
<Message source="RDC" target="IDC" type="CWORDEROUT">
<Header company_code="27" order_id="11526" reference_order_number="CPW1103O" customer_number="1642" alternate_sold_to_id="20040" order_date="11032005" order_channel="I" bill_me_later_ind="N" order_status="E" order_type="I" order_type_description="E-COMMERCE ORDERS" b2b_order="N" store_restock_order="N" entered_date="11032005" entered_time="140309" source_code="SOURCE1" offer_id="SCT" sold_to_prefix="MS." sold_to_fname="DEBORAH" sold_to_lname="SAMSON" sold_to_busres="B" sold_to_address1="24 PRIME PARK WAY" sold_to_city="NATICK" sold_to_state="MA" sold_to_state_description="MASSACHUSETTS" sold_to_zip="01760" sold_to_country="USA" allow_rent="Y" allow_mail="Y" sold_to_opt_in="O1" pc_expiration_date="20051203" pc_program_key="PCJOIN2" >
<Payments>
</Payments>
<ShipTos>
<ShipTo ship_to_number="1" sub_total="2500" additional_shipping="123" tax="184" order_total="2807" ship_to_status="S" gift_order="N" ship_via_code="1" ship_via_description="STANDARD SHIPPING" shipping_override="N" ship_to_prefix="MS." ship_to_fname="DEBORAH" ship_to_lname="SAMSON" ship_to_busres="B" ship_to_address1="24 PRIME PARK WAY" ship_to_city="NATICK" ship_to_state="MA" ship_to_state_description="MASSACHUSETTS" ship_to_zip="01760" ship_to_country="USA" >
<Details>
<Detail line_seq_number="1" short_sku_number="1928" item_id="PEN23" item_description="COMFORT-GRIP GEL PEN" sku="BLUE" sku_description="BLUE INK MEDIUM" actual_price="1000" offer_price="1000" drop_ship="N" order_quantity="1" tax="70000" reserved_warehouse="2" reserve_quantity="1">
</Detail>
<Detail line_seq_number="2" short_sku_number="1927" item_id="PEN23" item_description="COMFORT_GRIP GEL PEN" sku="BLK" sku_description="BLACK INK MEDIUM" actual_price="1000" offer_price="1000" drop_ship="N" order_quantity="1" tax="70000" reserved_warehouse="2" reserve_quantity="1">
</Detail>
<Detail line_seq_number="3" short_sku_number="2077" item_id="PCJOIN2" item_description="TRIAL ONE-MONTH MEMBERSHIP" actual_price="500" drop_ship="N" order_quantity="1" tax="35000" reserved_warehouse="2" reserve_quantity="1">
</Detail>
</Details>
<Errors>
<Error error_type="HDR" error_code="Z2" error_text="No Paytypes for Order">
</Error>
<Error error_type="HDR" error_code="58" error_ship_to="1" error_text="Offer Restricted">
</Error>
</Errors>
</ShipTo>
</ShipTos>
</Header>
</Message>
Order Acknowledgement XML Message (CWORDEROUT)
The system generates this response to the Inbound Order XML Message (CWORDERIN) if the response_type is A (acknowledge).
Note:
• All numeric values with decimal positions are passed as implied decimals. For example, a dollar value of $10.00 is passed as 1000.
• Attributes are included in the response only if they contain a value. Blank attributes are not passed.
For more information: See Order Acknowledgement Message: Sample XMLs for sample messages and XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Message Attribute |
Alpha/ numeric |
Positions |
Comments |
source |
alphanumeric |
|
Identifies the source of the XML message. RDC indicates the XML message originates from CWDirect. |
target |
alphanumeric |
|
Identifies the target of the XML message. IDC indicates the XML message is sent to CWIntegrate. |
type |
alphanumeric |
|
Identifies the type of information in the XML message. |
company_code |
numeric |
3 |
The company_code from the Inbound Order Message. |
numeric |
8 |
The order number assigned by the system. |
|
reference_ order_number |
alphanumeric |
30 |
The order_number from the Inbound Order Message. |
customer_ number |
numeric |
9 |
The number identifying the customer specified in the Inbound Order Message, or created by the system. See Customer Sold To Selection, Creation and Update. |
alternate_sold_ to_id |
alphanumeric |
15 |
The Alt cust # field at the Second Create Customer Sold To Screen. |
bill_to_number |
numeric |
7 |
The number identifying the bill-to customer specified in the Inbound Order Message, created by the system, or assigned to the sold-to customer. See Customer Bill To Selection and Creation. Passed only if the customer or order has a bill-to account. |
order_date |
numeric |
8 |
The order_date from the Inbound Order Message. |
order_channel |
alpha |
2 |
The order_channel from the Inbound Order Message |
bill_me_later_ ind |
alpha |
1 |
Valid values are: Y = The customer has an existing Bill Me Later account N = The customer does not have an existing Bill Me Later account The system determines the setting of this flag based on whether there is an account number in the Customer Sold To BML file, regardless of whether the customer actually uses a Bill Me Later payment method on this order. For example, if the customer is applying for a Bill Me Later account with this order, then this flag is set to N, because the order has not gone out for authorization yet and the account number has not yet been established. See Bill Me Later Processing for more information. |
Order Acknowledgement Message: Sample XMLs
Successful message: A sample of the Order Acknowledgement XML Message (CWORDEROUT) is presented below.
<Message source="RDC" target="IDC" type="CWORDEROUT">
<Header company_code="555" order_id="7828" reference_order_number="104051" customer_number="6" alternate_sold_to_id="CUSTOMER 6" bill_to_number="3" order_date="01042005" order_channel="I" bill_me_later_ind="N" />
</Message>
Order not found: The order API returns this message when the response_type in the Inbound Order XML Message (CWORDERIN) is A, D, or E if it cannot locate an order.
<Message source="RDC" target="IDC" type="CWORDEROUT">Error: The order could not be located.</Message>
This error occurs when:
• If the company is not valid: This error occurs whenever the Inbound Order XML Message (CWORDERIN) does not specify a valid company in the company_code attribute.
• Payment-only messages: This error occurs the Inbound Order XML Message (CWORDERIN) includes payment information to apply to a suspended order if:
• the rdc_order_nbr identifying the CWDirect order does not match an existing order
• no rdc_order_nbr is specified
Note: As long as the rdc_order_nbr is correct, the order API can apply the payment against the existing order, regardless of whether the inbound message specifies the correct web order number in the order_number attribute.
Order Interface XML Message Formats | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 42: Order Creation and Maintenance Errors |
GO01_01xb CWDirect 18.0 August 2015 OTN