E-Commerce New Order Message (CWCreateOrder)

 

The EC_ORDERS job, started through Working with E-Commerce Job Control (EJCT), receives New Order messages from the web storefront to create a new order in CWDirect.

The main purposes of this job:

• create the order (using the order type specified in the E-Commerce Order Type (G42) system control value)

• create the customer, if needed

• reserve inventory (exploding set items, although this is not visible on the web storefront)

• send the new order number to the web storefront

• possibly, delete an order and create a new one if the customer changes key information on the web storefront

Payment information can be included as part of the New Order message, depending on the design of your web storefront; otherwise, payment information is received separately in the E-Commerce Payment Message (CWPayment). In addition, if the payment information for the new order is sent separately from the rest of the order, the EC_ORDERS job sends an E-Commerce New Order Response Message (CWOrderResponse) to the web storefront.

For more information: See:

E-Commerce Order Creation

E-Commerce New Order Message: Sample XML

E-Commerce New Order Message: Sample NVP

XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.

Generic Order API: You can also create an order using the Generic Order Interface (Order API).

Name/Value Pair layout: The e-commerce New Order Request (EC_ORDERS) name/value pair message uses the following layout: name=value.

Example:

companycode=555

order_id=7557

offer_id=204

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 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. CWCreateOrder indicates the message contains a new order request.

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).

Header

One Header element is required.

company_code

numeric

3

Identifies the company for the order.

Validated against the Company file.

Required.

order_number

alpha

32

Updates the E-commerce order number in the Order Header Extended file. This field is labeled the Web order number at the Display Order Properties Screen.

Important: A unique order_number is required for every order received through the e-commerce New Order message to avoid the risk of having an unaccepted order replaced when another New Order message is received.

offer_id

alpha

3

Identifies the offer on the order.

source_code

alpha

9

Updates the OHD SRC source code field in the Order Header file. If this value exceeds the maximum length of 9 positions, it will be truncated.

If the order header source code matches the source code in the Default Unknown Source Code (I58) system control value, the system updates the source code on the order header to the source code associated with the offer on the first order detail line; see Default Unknown Source Code Logic.

Required.

The bill_to customer fields below identify the sold to customer on the order. See Selecting or Creating Sold-to Customers in E-Commerce Orders for more information on the basic logic the system uses in selecting or creating a sold to customer for the order.

bill_to_prefix

alpha

3

Maps to the Prefix field in the Customer Sold To file. If the Validate Prefix (I27) system control value is set to Y, the prefix is validated against the Prefix file; see Working with Prefix Codes (WPFX). In this situation, if the customer’s prefix is invalid, the order will be in error with a reason of Invalid Prefix Code (however, this message can also indicate a problem with the ar_prefix).

Available in version: 7.0 or later of CWDirect for XML; 8.5 or later for name/value pair.

bill_to_fname

alpha

15

Maps to the First name field in the Customer Sold To file.

bill_to_initial

alpha

1

Maps to the Initial field in the Customer Sold To file.

Available in version: 6.0 or later of CWDirect.

bill_to_lname

alpha

25

Maps to the Last name field in the Customer Sold To file.

If you change a customer address but do not specify either a last name or a sold_to_company, none of the changes specified for the Customer Sold To file will take place; however, updates to related files, such as the Customer Sold To Phone # or Customer Sold To Extended, will still take place.

bill_to_suffix

alpha

3

Maps to the Suffix field in the Customer Sold To file.

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

bill_to_company

alpha

30

Maps to the Company name field in the Customer Sold To file.

If you change a customer address but do not specify either a sold_to_lname or a company, none of the changes specified for the Customer Sold To file will take place; however, updates to related files, such as the Customer Sold To Phone # or Customer Sold To Extended, will still take place.

bill_to_busres

alpha

1

Maps to the Delivery code field in the Customer Sold To file. Valid values are:

B = business

R = residence

If this value is not specified and you are creating or updating the customer address, the system uses the Default Delivery Code for New Order Entry Customers (D13).

bill_to_address1

alpha

32

Maps to the Street address field in the Customer Sold To file.

If you enter PO box or P.O. box in this field, the system selects the PO box field for the customer. If you remove PO box or P.O. box from this field, the system unselects the PO box field for the customer.

bill_to_address2

alpha

32

Maps to the Address line 2 field in the Customer Sold To file.

bill_to_address3

alpha

32

Maps to the Address line 3 field in the Customer Sold To Extended file.

bill_to_address4

alpha

32

Maps to the Address line 4 field in the Customer Sold To Extended file.

bill_to_apartment

alpha

10

Maps to the Apartment field in the Customer Sold To Extended file.

Available in version: 6.0 or later of CWDirect.

bill_to_city

alpha

25

Maps to the City field in the Customer Sold To file.

bill_to_state

alpha

2

Maps to the State field in the Customer Sold To file.

bill_to_country

alpha

3

Maps to the Country field in the Customer Sold To file. If no country code is specified here, the system uses the Default Country for Customer Address (B17).

If the country is invalid, the order will be in error with a reason of Country Not Found.

bill_to_zip

alpha

10

Maps to the Zip field in the Customer Sold To file.

If the SCF related to the zip code is invalid, the order will be in error with a reason of SCF not Found.

bill_to_email

alpha

50

Maps to the Email field in the Customer Sold To file.

See Working with Customer Email Addresses for an overview.

If the email address is not properly formatted, the order will be in error. See Email Address Validation.

bill_to_day_phone

alpha

14

Maps to the Phone field in the Customer Sold To Phone # file.

Used to identify the sold-to customer. See Selecting or Creating Sold-to Customers in E-Commerce Orders.

The phone number should be unformatted; or, if it is formatted, it should be correctly formatted based on the phone number formatting specified for the customer’s country to create, match, or update the customer correctly. See Customer Selection/Creation Logic in E-Commerce Orders for more information on how the system finds a matching customer based on phone numbers.

bill_to_evening_phone

alpha

14

bill_to_fax_phone

alpha

14

Maps to the Phone field in the Customer Sold To Phone # file whose CS# Phone # type is F; see the Fax field at the Second Create Customer Sold To Screen. The phone number should be unformatted; or, if it is formatted, it should be correctly formatted based on the phone number formatting specified for the customer’s country to create, match, or update the customer correctly.

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

bill_to_opt_in

alpha

2

Maps to the CST Email status field in the Customer Sold To file; see the Opt in/opt out field at the First Create Sold To Customer Screen. If no value is specified in the message and you are creating a new customer, the system uses the Default Opt In/Opt Out Flag (G97).

Available in version: 4.0 or later of CWDirect.

allow_rent

alpha

1

Maps to the CST Rent name? field in the Customer Sold To file; see the Rent flag at the First Create Sold To Customer Screen. If no value is specified in the message and you are creating a new customer, the system uses the Default Rent Name (D11).

allow_email

alpha

1

This field is not currently implemented.

allow_mail

alpha

1

Maps to the CST Mail name? field in the Customer Sold To file; see the Mail flag at the First Create Sold To Customer Screen. If no value is specified in the message and you are creating a new customer, the system uses the Default Mail Name (D10).

customer_number

numeric

9

Updates the Customer # field in the Order Header file. See Customer Selection/Creation Logic in E-Commerce Orders for an overview.

nbr_ship_tos

numeric

3

Indicates the number of ship to customers on the order.

Available in version: 4.0 or later of CWDirect.

pay_incl

alpha

1

Indicates whether the message includes payment method information. If the payment method information will be sent in a separate message, the order remains suspended until the payment method message is received. If the system receives another order for the same customer before payment information is received for the first order, the first order is deleted and replaced with the second order.

Valid values are:

Y = Payment information is included in the message.

N = Payment information will be sent in a separate message; see E-Commerce Payment Message (CWPayment).

If this flag is set to N, no payment methods will be added to the order even if the information is included in the message.

Available in version: 4.0 or later of CWDirect.

The ind customer fields below identify the individual customer on the order. See Selecting or Creating Individual Customers in E-Commerce Orders for more information on the basic logic the system uses in selecting or creating an individual customer for the order.

ind_number

numeric

3

A unique number to identify the individual associated with the sold to customer.

Maps to the OHE Placer field in the Order Header Extended file.

Available in version: 6.0 or later of CWDirect.

ind_dept

alpha

3

A code that represents the individual’s department within the organization.

Maps to the CIF Department field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_position

alpha

3

A code that represents the individual’s position within the organization.

Maps to the CIF Position field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_prefix

alpha

3

The individual’s title, such as Mr. or Mrs.

Maps to the CIF Name prefix field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_fname

alpha

15

The individual’s first name.

Maps to the CIF First name field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_initial

alpha

1

The individual’s middle initial.

Maps to the CIF Middle initial field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_lname

alpha

25

The individual’s last name.

Maps to the CIF Last name field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_suffix

alpha

3

The individual’s suffix, such as Jr. or Sr.

Maps to the CIF Name suffix field in the Customer Individual file.

Available in version: 6.0 or later of CWDirect.

ind_day_phone

alpha

14

The individual’s day, evening, and fax numbers.

Maps to the Day phone, Eve phone, or Fax phone in the Customer Individual file.

The phone number should be unformatted; or, if it is formatted, it should be correctly formatted based on the phone number formatting specified for the customer’s country to create, match, or update the customer correctly.

Available in version: 6.0 or later of CWDirect.

ind_eve_phone

alpha

14

ind_fax_phone

alpha

14

ind_email_address

alpha

50

The individual’s email address.

Maps to the CIF Email address field in the Customer Individual file.

If the Default Individual Email Address (J17) system control value is set to Y, the system defaults the individual’s email address to the Order email address field on the order.

Available in version: 6.0 or later of CWDirect.

ind_opt_in

alpha

2

Indicates the preferred method of correspondence for the individual’s email address. Valid values are:

O1 (Email): Email is the preferred method of correspondence.

O2 (Order-only email): Use email for order-related correspondence only; generate a spool file for other correspondence.

O3 (No email): Do not use email for any correspondence; generate a spool file instead.

O4 (Do not ask customer): Do not ask the customer for his/her email address.

Maps to the CIF Opt in/opt out field in the Customer Individual file.

If you do not specify a setting here, the OptIn setting for the individual defaults from the Default Opt In/Opt Out Flag (G97) system control value.

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

ind_mail_flag

alpha

1

A code that further defines when and under what conditions you mail to the individual.

Maps to the CIF Mail flag field in the Customer Individual file.

If you do not specify a setting here, the Mail flag for the individual will be blank.

Available in version: 6.0 or later of CWDirect.

ind_rent_flag

alpha

1

A code that indicates whether to include the individual’s name in lists you sell to other companies.

Y = Rent the individual’s name to other companies.

N = Do not rent the individual’s name to other companies.

Maps to the CIF Rent flag field in the Customer Individual file.

If you do not specify a setting here, the Rent flag for the individual will be blank.

Available in version: 6.0 or later of CWDirect.

The ar customer fields below identify the bill to customer on the order. See Selecting or Creating Bill-to Customers in E-Commerce Orders for more information on the basic logic the system uses in selecting or creating a bill to customer for the order.

ar_number

numeric

7

A unique number to identify a customer billing account.

Updates the CBT Account # field in the Order Header file. See Selecting or Creating Bill-to Customers in E-Commerce Orders for an overview.

Note:

• The system does not update an existing bill-to customer through the Inbound Order Message.

• Having the Create/Assign Bill To Customers in Order Entry (A76) system control value set to N does not prevent you from specifying an existing bill-to here and assigning it to the order.

Available in version: 6.0 or later of CWDirect.

ar_prefix

alpha

3

A title assigned to the bill to customer, such as Mr. or Mrs.

Maps to the Prefix field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_fname

alpha

15

The bill to customer’s first name.

Maps to the First name field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_initial

alpha

1

The bill to customer’s middle initial.

Maps to the Initial field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_lname

alpha

25

The bill to customer’s last name.

Maps to the Last name field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_suffix

alpha

3

An addition to the customer’s name, such as Jr. or Sr.

Maps to the Suffix field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_company_name

alpha

30

The name of the bill to customer’s company.

Maps to the Company name field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_street_address

alpha

32

The street address where the bill to customer resides.

Maps to the Street address field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_address_2

alpha

32

The second address line of the bill to customer’s address.

Maps to the Address line 2 field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_address_3

alpha

32

The third address line of the bill to customer’s address.

Maps to the Address line 3 field in the Customer Bill To Extended file.

Available in version: 6.0 or later of CWDirect.

ar_address_4

alpha

32

The fourth address line of the bill to customer’s address.

Maps to the Address line 4 field in the Customer Bill To Extended file.

Available in version: 6.0 or later of CWDirect.

ar_apt

alpha

10

The apartment/suite number of the bill to customer’s address.

Maps to the Apartment field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_city

alpha

25

The city of the bill to customer’s address.

Maps to the City field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_state

alpha

2

The state code of the bill to customer’s address.

Maps to the State field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_country

alpha

3

The country code of the bill to customer’s address.

Maps to the RPR Country field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_zip

alpha

10

The postal code of the bill to customer’s address.

Maps to the Zip field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ar_day_phone

alpha

14

The day, evening, and fax number for the bill to customer.

Maps to the Phone field in the Customer Bill To Phone # file.

The phone number should be unformatted; or, if it is formatted, it should be correctly formatted based on the phone number formatting specified for the bill-to customer’s country to create, match, or update the customer correctly.

Available in version: 6.0 or later of CWDirect.

ar_eve_phone

alpha

14

ar_fax_phone

alpha

14

ar_email_address

alpha

50

The bill to customer’s email address.

Maps to the CBT Email address field in the Customer Bill To file.

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

ar_opt_in

alpha

2

Indicates the preferred method of correspondence for the bill to email address. Valid values:

O1 (Email): Email is the preferred method of correspondence.

O2 (Order only email): Use email for order-related correspondence only; generate a spool file for other correspondence.

O3 (No email): Do not use email for any correspondence; generate a spool file instead.

O4 (Do not ask customer): Do not ask the customer for his/her email address.

Maps to the CBT Opt in/opt out field in the Customer Bill To file.

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

ar_print_statement

alpha

1

Indicates whether the system prints a statement on open balances, and open and paid receipts for the customer. Valid values:

Y = Print and accounting statement.

N = Do not print an accounting statement.

Maps to the CBT Print statement? field in the Customer Bill To file.

Available in version: 6.0 or later of CWDirect.

ip_addr

alpha

15

Updates the IP address in the Order Header Extended file, displayed at the Display Order Properties Screen.

IP address validation: If the IP address is invalid, the system writes an Order Transaction History message such as INVALID IP ADDRESS: 1.2.3 where 1.2.3 represents the invalid IP address received, and does not update this field. The IP address is made up of a series of four numbers separated by three periods (for example, 12.34.234.8). Each number between the periods must be from 1 to 255. The IP address must:

• not include any non-numeric characters besides the periods

• not include any blank spaces

• include all three periods

• include all four numbers, each from 1 to 255

 

 

 

If the IP address matches an entry in the Miscellaneous Fraud file, the system puts the order on IP (IP address) hold and writes a message such as SYS HLD --IP ADDRESS HOLD to the Order Transaction History file.

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

CustOwnership

Use the following attributes to update the Customer Ownership file, available for review at the Work with Customer Ownership Screen in customer maintenance.

The CustOwnerships element, if provided, can include one or more CustOwnership elements.

Available in version: The CustOwnership element, and all of its attributes, is available in version 8.0 or later of CWDirect for XML only.

cust_own_ID

alpha

10

A code that represents a product the customer owns or previously owned.

Updates the Ownership ID field in the Customer Ownership file. Required to create or update a customer ownership record.

If a CustOwnership does not include cust_own_ID but does include other values, the system creates a customer note: Missing Ownership ID: Ownership Description. The system does not place the order in an error status because of customer ownership errors.

cust_own_desc

alpha

40

A description of the product.

Updates the Description field in the Customer Ownership file.

cust_own_active

alpha

1

Indicates if the customer currently owns the product.

Y = The customer currently owns the product.

N = The customer previously owned the product.

Updates the Act field in the Customer Ownership file.

cust_own_entry_date

numeric

7

The date the customer ownership record was created, in MMDDYY format.

Updates the Entry date field in the Customer Ownership file.

cust_own_confirm_date

numeric

7

The most recent date when the customer confirmed ownership of the product, in MMDDYY format.

Updates the Confirm date field in the Customer Ownership file.

UserField

See User-Defined Fields in the New Order Message for a complete overview.

The UserFields element, if provided, can include one or more UserField elements.

Available in version: The UserField element and all of its attributes is available in version 6.01 or later of CWDirect.

usr_fld_dtl_seq_number

numeric

3

Maps to the Sequence # in the Order Header User Field file.

usr_fld_label

alpha

15

Maps to the type of field to update in the Order Header User Field file.

usr_fld_data

alpha

30

Updates the Text, number, or Date field in the Order Header User Field file.

ShipTo

The ShipTos element can include one or more ShipTo elements. At least one ship to is required.

The ship_to_type field indicates the type of shipping address to use for the order. Valid values are:

1 = order-level shipping address

2 = recipient customer sold-to

3 = permanent ship-to

blank = use the shipping address of the sold-to customer on the order

If you have not set up your storefront to specify which type of alternate shipping address to create when a web customer selects an alternate shipping address, CWDirect uses the value specified in system control value Default Recipient Type for E-Commerce Orders (H33).

See Selecting or Creating Recipient or Ship-to Customers in E-Commerce Orders for an overview.

shipping_method

numeric

2

The ship via code for the ship to customer.

Updates the VIA ship via code in the Order Ship To file; see the Ship via at the Display Order Properties Screen. The ship via must be eligible to ship the items on the ship to order; see Item Ship Via Override Logic.

Ship via codes are defined in and validated against the Ship Via file; see Working with Ship Via Codes (WVIA) for an overview.

The ship via must already be set up with the SCF on the shipping address as a valid SCF/ship via combination.

 

 

 

If using item ship via overrides, the ship via must exist as an eligible shipper for the item in the Item Ship Via Override file. If records do not exist in the Item Ship Via Override file for the item, all shippers are eligible to deliver the item.

The Use SCF Ship Via in E-Commerce (J30) system control value controls whether the system overrides the ship via on the order to the Preferred ship via defined for the ship to customer’s SCF (the first 3 digits of the destination postal code).See Ship Via Defaults for Remote Orders for more information on the ship via that defaults to a remote order.

Required.

gift

alpha

1

Indicates if the order is a gift order. Valid values:

Y = The order is a gift order.

N = The order is not a gift order.

Updates the Gift order flag in the Order Ship To file; see the Gift flag at the Display Order Properties Screen. Defaults to N if this value is not set to Y.

gift_message

alpha

256

Up to 5 gift messages on the order.

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.

arrival_date

numeric

8

Updates the Arrival date in the Order Ship To file; see the Arrival date at the Display Order Properties Screen. MMDDYYYY format. Defaults to the current date if no override is specified.

freight

numeric

7.2

Updates the Freight field in the Order Ship To file, and sets the Freight override? flag to Y. See the Freight at the Order Inquiry Header Screen and the Freight override flag at the Display Order Properties Screen.

ship_complete

alpha

1

Updates the Ship complete? field in the Order Ship To file; see the Ship complete flag at the Display Order Properties Screen. Defaults to N if this value is not set to Y.

ship_to_type

alpha

1

Indicates the type of shipping address to use for the order. Valid values are:

1 = order-level shipping address

2 = recipient customer sold-to

3 = permanent ship-to

• blank = use the shipping address of the sold-to customer on the order

See Selecting or Creating Recipient or Ship-to Customers in E-Commerce Orders for an overview.

Available in version: 5.0 or later of CWDirect.

ship_to_prefix

alpha

3

The title of the ship to customer, such as Mr. or Mrs.

Maps to the:

Prefix field in the Order Ship To Address file, or

Prefix field in the Customer Ship To file, or

Prefix field in the Customer Sold To file.

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

ship_to_fname

alpha

15

The first name of the ship to customer.

Maps to the:

NAM First name field in the Order Ship To file.

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.

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.

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_suffix

alpha

3

The suffix code of the ship to customer.

Maps to the:

NAM Suffix field in the Order Ship To Address file, or

NAM Suffix field in the Customer Ship To file, or

NAM Suffix field in the Customer Sold To file.

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

ship_to_company

alpha

30

The company of the ship to customer.

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_busres

alpha

1

Indicates if the ship to address is a business or residence.Valid values are:

B = business

R = residence

Maps to the:

NAM Delivery code field in the Customer Ship To file, or

NAM Delivery code field in the Customer Sold To file.

ship_to_address1

alpha

32

The street address of the ship to customer.

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.

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.

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.

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 ship to customer address.

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 ship to customer address.

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 ship to customer address.

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 ship to customer address.

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 ship to customer address.

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.

Required if a ship-to address is provided.

ship_to_email

alpha

50

The ship to customer’s email address.

Maps to the:

OSA Email address field in the Order Ship To Address file if the ship_to_type is 1.

CSH Email address field in the Customer Ship to file if the ship_to_type is 3.

Email field in the Customer Sold To file if the ship_to_type is 2.

If the email address is not properly formatted, the order will be in error. See Email Address Validation.

Available in version: 4.0 or later of CWDirect.

ship_to_day_phone

alpha

14

The day, evening, and fax numbers for the ship to customer.

The phone numbers, if provided, should be unformatted; or, if it is formatted, it should be correctly formatted based on the phone number formatting specified for the customer’s country to create, match, or update the customer correctly.

Maps to the:

Phone field in the Customer Ship To Phone # file, or

Phone field in the Customer Sold To Phone # file.

Available in version: 6.0 or later of CWDirect.

ship_to_evening_

phone

alpha

14

ship_to_fax_phone

alpha

14

email_gc

alpha

1

Updates the Email gift certificate field in the Order Ship To file; see the Email gift certificate flag at the Display Order Properties Screen. Defaults to blank if this value is not set to Y. See the Gift Certificate E-Mail Program (H07) for an overview of how this flag is used.

Available in version: 4.0 or later of CWDirect.

ship_to_po_number

alpha

15

For each ship-to on the order, the system checks the ship_to_po_number first; if there is no PO number specified, the system uses the order-level po_number.

Updates the Purchase order # field in the Order Ship To file; see the Purchase order # at the Display Order Properties Screen. If the Verify Duplicate PO Numbers for A/R Orders (D80) system control value is set to Y and the purchase order number is a duplicate, the order will be in error with a reason of Duplicate PO#. Also, if the PO Required for A/R Orders (D79) system control value is set to Y and no purchase order number is specified, the order will be in error with a reason of Missing PO#-Req for A/R.

Available in version: 6.0 or later of CWDirect.

promotion

alpha

7

The promotion code associated with the order.

If the Promotion Code Entry Required for Discount (I63) system control value is:

• set to Y: this promotion is applied against the order, provided the order qualifies. The system does not automatically apply any other promotions against the order, and only one promotion can apply for each order shipping address. If a promotion is specified and the order does not qualify for it, the system continues creating the order and writes an order history message such as: Promotion (ADDFRT) not applied. However, if the promotion code specified in the message does not actually exist, the order will be in error with a reason of Invalid Promotion Code.

• set to N: the system ignores any promotion code passed and uses its regular hierarchy in determining which promotions, if any, to apply to the order.

See the Promotion Code Entry Required for Discount (I63) system control value for a complete discussion.

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

tax_area_id

alphanumeric

10

Updates the Future use code 2 field in the Order Ship To file. See the Tax Interface Values (J29) for more information.

Available in XML version: 4.0 (version 9.5 of CWDirect).

Ord_Msg

The Ord_Msgs element, if provided, can include one or more Ord_Msg elements.

Available in version: The OrdMsg element and its attributes is available in version 6.0 or later of CWDirect.

ord_msg_code

alpha

1

Updates the Print? flag in the Order Message file.See the Work with Order Messages Screen.

If the value specified here is not a valid value for the Print flag, or if no value is specified here, the message is still created, but the Print flag is set to blank (which is the same as N or do not print).

ord_msg_text

alpha

60

Updates the Message field in the Order Message file; see the Work with Order Messages Screen.

Item

The Items element includes at least one Item elements.

To create an order that includes a set or continuity item, the message should include the master set or continuity item only. The set or continuity will be “exploded” once the order is created, and all of the component items will be added to the order.

If the item indicated is subject to pre-billing, the system adds the Pre Billed Amount Item (J72) to the order. See the Pre Billed Amount Item (J72) system control value for more information.

item_id

alpha

12

The item number on the order line.

Updates the ITM number field in the Order Detail file.

If a valid item_id is not defined, the system uses the short SKU defined in the sku field to identify the item; see Identifying the Item.

To create an order that includes a set or continuity item, the message should include the master set or continuity item only. The set or continuity will be “exploded” once the order is created, and all of the component items will be added to the order.

If the item is subject to zone reservation, the system applies the Standard Zone Reservation Rules or Alternate Zone Reservation Rules based on your setup. However, if the zone reservation rules that apply to the item would normally display the Select Order Line Option Window in order entry, the system always adds the item as a future order.

Required.

sku

numeric

7

A code the represents the short SKU for the item on the order line.

Updates the ITM number field in the Order Detail file.

See Identifying the Item.

Required.

quantity

numeric

5

The quantity of the item ordered on the order line.

Updates the Qty ordered field in the Order Detail file. If no quantity is specified here, the system uses the Default Order Quantity (B30).

A negative quantity (indicated by a minus sign (-) preceding the number) indicates a return.

If the quantity specified here is not evenly divisible by the Sell quantity for the item/SKU, the order line will be in error with a reason of Multiples error.

Required.

list_price

numeric

7.2

The selling price of the item on the order line.

Updates the Price field in the Order Detail file. See the Price field at the Display Order Detail Screen (Reviewing Order Line Detail).

If you define a list_price, you must also define a price override reason. See Price Override Reason for E-Commerce (G73) for an overview.

0000000 displays if the no_charge flag is set to Y, indicating the item is priced at no charge.

See Pricing and Price Overrides.

price_override

alpha

1

If this field is set to 1 and there is no prc_ovr_rsn specified, the system uses the Price Override Reason for E-Commerce (G73), if any, or the Default Price Override Reason (B35) when creating the order line. See Price Override Reason for E-Commerce (G73) for an overview.

gift_wrap

alpha

1

Indicates if the item is gift-wrapped. Valid values:

Y = Gift wrap the item.

N = Do not gift wrap the item.

If set to Y, updates the Gift wrap flag in the Order Detail file and adds the gift wrap charge to the order; see the G/W and G/W $ at the Display Order Detail Screen (Reviewing Order Line Detail). If the item/offer or SKU/offer does not allow gift wrap, the order will be in error with a reason of Gift wrap not allowed.

cord_group

numeric

3

The coordinate group code assigned to the order line.

Updates the Coordinate group field in the Order Detail file. See the C/G at the Display Order Detail Screen (Reviewing Order Line Detail).

personalization_id

alpha

2

The special handling code assigned to the order line.

Updates the Add’l chg code field in the Order Detail file. Overrides the additional charge code, if any, from the Item Offer or SKU Offer. Required if the item should have special handling; if no personalization_id is specified, the additional charge code from the Item Offer or SKU Offer will not default.

Use the personalization_line element to specify the special handling details for the order line.

If the Item Offer or SKU Offer does not have the Special handling flag set to Y, the order will be in error with a reason of S/H code not allowed. See the Create Item Offer Screen for more information on specifying special handling for an Item Offer or SKU Offer.

If the value specified here does not represent a special handling code as set up through Establishing Additional Charge Codes (WADC), the order will be in error with a reason of S/H code is invalid.

personalization_cost

numeric

7.2

The cost for special handling on the order line.

Updates the Special handling $ field in the Order Detail file. If no charge is specified here, the system uses the regular hierarchy to determine the special handling charge or price; see Special Handling Overview.

Note: It is possible to add special handling charges without actually creating the special handling instructions for the order line if:

• complete instructions are not specified in the personalization_line element, and

• a personalization_id is specified, and

• a personalization_cost is specified here, or

• a S/H price is specified for the Item Offer or SKU Offer

gc_number

numeric

7

The gift certificate number assigned to the item on the order line.

The system uses this number only when:

• the item ordered on this order detail line is a gift certificate (the Gift certificate field for the item is selected)

• the gift certificate number specified here is not already assigned

Otherwise, if the item is a gift certificate, the system assigns a gift certificate number through the normal process; see Working with Gift Certificates.

Do not specify a gift certificate number if the quantity for the order detail line is more than 1; if you specify a gift certificate number, the system creates just one gift certificate.

Available in version: 4.01 or later of CWDirect.

no_charge

alpha

1

Updates the No charge field in the Order Detail file. If this flag is set to Y, the order detail line will be “no charge”. See the N/C flag at the Display Order Detail Screen (Reviewing Order Line Detail).

The list_price is 0000000, indicating the item is priced at no charge.

If you add the item at no charge, you must also define a price override reason. The price override reason on the order detail line defaults from the:

prc_ovr_rsn field; otherwise,

Price Override Reason for E-Commerce (G73) system control value; otherwise,

Default Price Override Reason (B35) system control value.

If a price override reason is not defined in any of the above places, the system does not price the item at no charge and instead defaults the item price from the list_price.

See Pricing and Price Overrides.

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

prc_ovr_rsn

alpha

1

Required if the no_charge field is set to Y.

Updates the Price Override Code field in the Order Detail file; see the Ovr field at the Display Order Detail Screen (Reviewing Order Line Detail). If the price override reason code specified here is not valid, the system uses the Price Override Reason for E-Commerce (G73), if any, or the Default Price Override Reason (B35) when creating the order line. See Price Override Reason for E-Commerce (G73) for an overview.

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

Note: Use the following values to process a store pickup or shipment. See Merchandise Locator and Store Fulfillment API through .NET for an overview, including errors related to store fulfillment requests for different types of items.

pickup_type

alpha

2

Indicates the type of store fulfillment request. Valid values are:

SP = store pickup (the customer will pick the item up in the store location)

SS = store shipment (the store location will ship the item to the customer)

If the message does not specify one of the above values, the system creates a regular order detail line.

You cannot create a store fulfillment request for a negative quantity, or for a continuity master, membership item, or subscription item. See Store Fulfillment Requests through E-Commerce Orders and the Generic Order API (.NET) for error messages.

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

pickup_system_

location

alpha

10

A code identifying the system associated with the store fulfillment location. For example, if fulfillment location 10 indicates a particular store, the system might indicate the CWStore database.

The system does not validate this value; however, if no pickup_system_location is specified for a store pickup request, the system puts the order in error. See Store Fulfillment Requests through E-Commerce Orders and the Generic Order API (.NET) for error messages.

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

pickup_location

alpha

10

A code identifying the store location where the customer will pick up the item, or which will ship the item.

The system does not validate this value; however, if no pickup_location is specified for a store pickup request, the system puts the order in error. See Store Fulfillment Requests through E-Commerce Orders and the Generic Order API (.NET) for error messages.

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

line_offer

alpha

3

Updates the OFR number field in the Order Detail file. See the Ofr at the Display Order Detail Screen (Reviewing Order Line Detail).

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

personalization_line

The personalization_lines element, if provided, can include one or more personalization_line elements.

The system uses the following information to build special handling instructions for the order detail line if a valid personalization_id is specified:

Standard special handling:

• The personalization_type should be set to S (standard).

• You can include one or more standard_text attributes to build one or multiple lines of custom special handling instructions. If any standard_text entry exceeds 30 positions, the additional data in the special handling instructions is truncated.

Custom special handling:

• The personalization_type should be set to C (custom).

• Unless the message will always include data in each personalization line, and all lines will be sent in the sequence in which they were set up through Establishing Custom Special Handling Formats (WSHF), each personalization_line should also specify its corresponding personalization_seq_nbr. Using the sequence number also lets you maintain the personalization instructions and add data in order maintenance; to preserve this option, the inbound message must include each personalization line with either data or a blank value (for example, personalization_text = " ".

• If the personalization lines do not include the sequence number, and do not represent a complete, valid set of instructions according to the special handling format, the special handling code and charge are still added to the order; however, the order will either be in error, or the order line will include the special handling code and charge, but the instructions will be incomplete or missing.

For more information: See the sample message formats under E-Commerce New Order Message: Sample XML.

Copying special handling information for set items: In the case of a set item, the Copy Set Master Special Handling to Set Components (J39) system control value controls whether to copy the special handling instructions and handling charges to each eligible set component. See the Copy Set Master Special Handling to Set Components (J39) system control value and Setting Up Special Handing for Sets for more information.

personalization_seq_nbr

numeric

3

Indicates the special format detail sequence number (as opposed to the display sequence number) for the information being passed in this line for custom special handling. This sequence number is not displayed on a screen, but corresponds to the SFD sequence number from the Special Format Details file (MSSHFD), set up through Establishing Custom Special Handling Formats (WSHF), and the EC Personalization Detail file (EXPRSD), sent to the web storefront through Downloading E-Commerce Static Files (ESTF). Updates the Order Special Format file.

Sending the sequence number is required for custom special handling unless the message includes each personalization line in order by sequence number for a custom special handling format, with each line containing data; otherwise, the personalization information is not added to the order correctly.

The sequence number is not used for standard special handling.

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

personalization_

type

alpha

1

Indicates the type of special handling. Valid values are:

C = Custom

S = Standard

If this value is the wrong type for the personalization_id, the order will not be in error; however, no special handling instructions will be built.

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

standard_text

alpha

30

Used for standard special handling instructions. Updates the S/H info field in the Order Special Handling file for standard special handling. There can be more than one lines of standard text included in multiple standard_text attributes. Any standard_text entry that exceeds 30 positions is truncated from the special handling instructions.

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

personalization_text

alpha

45

Used for custom special handling instructions. Updates the Input field in the Order Special Format file for custom special handling. You can send the personalization_line with the personalization_text set to " " in order to create a blank custom special handling line for the order if you would like to preserve the option of adding special handing information in order maintenance.

Default text defined for the special handling format does not default for orders created through the Inbound Order Message.

 

 

 

Errors:

If the text is not a valid entry for the custom special handling format, the order will be in error with a reason of Input not valid response.

If the text exceeds the maximum specified for the custom special handling format, the order will be in error with a reason of Exceeds maximum character.

The order is not in error if you send a blank personalization_text entry, even if the line is flagged as a required entry for the special handling format. Similarly, the order is not in error if you omit a required personalization line from the message entirely.

Lin_Msg

The Lin_Msgs element, if provided, can include one or more Lin_Msg elements.

Available in version: The Lin_Msgs element and its attributes are available in version 6.0 or later of CWDirect.

lin_msg_code

alpha

1

Updates the Print? field in the Order Line Message file. See Work with Order Line Messages Screen for more information.

If this value is invalid, the system creates the order line message with a print value of blank (print nowhere).

lin_msg_text

alpha

60

Updates the Message field in the Order Line Message file. See Work with Order Line Messages Screen for more information.

Required if a lin_msg_code is defined.

Payment

Payment information can be included as part of the CWCreateOrder message, depending on the design of your web storefront; otherwise, payment information is received separately in the E-Commerce Payment Message (CWPayment).

An order can include the following payments:

check_type: pay category 1 (cash/check)

cc_type: pay category 2 (credit card), including:

• Bill Me Later (card type B) Note: If the pay type is Bill Me Later, the total order value cannot exceed the BML trans limit. Also, if the customer does not already have an account number established, the customer’s date of birth and last four digits of the social security number are required. See Bill Me Later Processing for an overview.

• credit card (card type C)

• debit card (card type D)

• stored value card (card type S)

ar_type: pay category 3 (A/R)

gc_type: pay category 5 (coupon/credit), including gift certificates

The order can include a single payment method or a combination of payment methods. As in regular order entry, the system requires that a “catch-all” payment method be specified if there are multiple credit cards, or one or more credit cards with an A/R payment method.

The Payments element can include one or more Payment elements. At least one payment method is required.

cc_name

alpha

40

Not currently implemented.

Available in version: 4.01 or later of CWDirect.

cc_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the credit card payment method on the order.

This code must be a valid credit card pay type (payment category 2), including:

• Bill Me Later (card type B)

• credit card (card type C)

• debit card (card type D)

• stored value card (card type S)

Available in version: 4.01 or later of CWDirect.

cc_number

alpha

20

Updates the Credit card number field in the Order Payment Method file; see the Credit card # field at the Display Order Pay Type Screen (1 of 2). Required for credit card payment methods except for Bill Me Later, or the order will be in error with a reason of Invalid Credit Card. See Types of Credit Cards for more information.

Encryption: Credit card encryption allows you to encrypt the credit card number in the CWDirect database. If you use credit card encryption, the credit card number in this message will not be encrypted because it is from an external system; however, the system encrypts the credit card number in the CWDirect database once the order is created.

 

 

 

Auto-assignment: If the Allow auto-assign field for a pay category 2 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 cc_number field for the order. See Allow Auto-Assignment of Pay Category 2 Pay Type for additional processing information.

Available in version: 4.01 or later of CWDirect.

cc_exp_month

numeric

2

Updates the first two positions of the Expiration date field in the Order Payment Method file; see the Expiration date at the Display Order Pay Type Screen (1 of 2). The Require expiration dateRequire expiration date flag for the pay type controls whether an expiration date is required for credit card payment methods. If the pay type requires an expiration date and it is not passed in the message, the order will be in error with a reason of CC Expiration/Start Date.

Available in version: 4.01 or later of CWDirect.

cc_exp_year

numeric

4

Updates the second two positions of the Expiration date field in the Order Payment Method file; see the Expiration date at the Display Order Pay Type Screen (1 of 2). Required for credit card payment methods. The Require expiration dateRequire expiration date flag for the pay type controls whether an expiration date is required for credit card payment methods. If the pay type requires an expiration date and it is not passed in the message, the order will be in error with a reason of CC Expiration/Start Date.

Available in version: 4.01 or later of CWDirect.

cc_sec_value

numeric

4

This field is not currently implemented.

You can only define a card secrity value on an order entered through regular order entry/maintenance.

See Credit Card Security Service (CID, CVV2, CVC2) for more information on credit card security processing.

Available in version: 6.01 or later of CWDirect.

cc_sec_presence

alpha

1

This field is not currently implemented.

You can only define a card security presence on an order entered through regular order entry/maintenance.

See Credit Card Security Service (CID, CVV2, CVC2) for more information on credit card security processing.

Available in version: 6.01 or later of CWDirect.

auth_number

alpha

7

Updates the Authorization number field in the Order Payment Method file; see the Authorization number at the Display Order Pay Type Screen (1 of 2). Used for credit card payment methods.

Available in version: 4.01 or later of CWDirect.

auth_date

numeric

8

Updates the Authorization date field in the Order Payment Method file; see the Authorization date at the Display Order Pay Type Screen (1 of 2). MMDDYYYY format. Used for credit card payment methods.

Available in version: 4.01 or later of CWDirect.

auth_amount

numeric

9.2

Updates the Manual auth amount field in the Order Payment Method file; see the Authorization amount at the Display Order Pay Type Screen (1 of 2). Used for credit card payment methods.

Available in version: 4.01 or later of CWDirect.

amt_to_charge

numeric

9.2

Updates the Amount to charge field in the Order Payment Method file; see the Amount to charge field at the Display Order Pay Type Screen (1 of 2). For a coupon/gift certificate or cash/check payment method, also updates the Amount collected field. Required if the payment method is not the only one on the order. A negative amount represents a credit against the payment method.

If you do not specify an amount and there is another payment method on the order without an amount specified, the order will be in error with a reason of Multiple CCs with $0. This error indicates that the order can have only one “catch-all” payment method; see the discussion of catch-all payment methods at the Enter Payment Method Screen.

Available in version: 6.0 or later of CWDirect.

gc_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the gift certificate or coupon payment method on the order.

If this field is blank, the system uses the value in the Default Pay Type for Gift Certificates/Coupons (G48) system control value. If there is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not check the value of the gift_certificate_amount field.

The gc_type field and/or Default Pay Type for Gift Certificates/Coupons (G48) must specify a valid coupon/credit pay type (payment category 5).

Available in version: 6.0 or later of CWDirect.

gift_certificate_

number

numeric

7

Updates the Gift cert/coupon field in the Order Payment Method file. Required if a coupon/credit payment method is defined in the gc_type field.

• If this value is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not check the value of the gift_certificate_amount field.

• If this value does not match a record in the Coupon Redemption file, the system creates a coupon or credit payment method on the order; however, the Dynamic Creation of Coupons (B21) system control value must be set to Y, or the order will be in error because of an Invalid coupon.

Available in version: 4.01 or later of CWDirect.

gift_certificate_amount

numeric

9.2

The amount of the coupon/credit payment method.

If there is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not use the amount defined in the gift_certificate_amount field.

Available in version: 4.01 or later of CWDirect.

expiration_date

numeric

8

The date the coupon/credit payment method expires.

Available in version: 4.01 or later of CWDirect.

hold_id

alpha

2

If a hold reason code is included, the system checks that the order hold reason code is valid. If the code is valid, the system puts the order on hold; otherwise, the order goes into error status.

Updates the OHD OHR Sys hold reason field in the Order Header file.

Available in version: 4.01 or later of CWDirect.

ar_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the accounts receivable payment method on the order.

This code must be a valid accounts receivable pay type (payment category 3).

See Selecting or Creating Bill-to Customers in E-Commerce Orders for information on how a bill-to customer is added to an accounts receivable order.

Available in version: 6.0 or later of CWDirect.

po_number

alpha

15

For each ship-to on the order, the system checks the ship_to_po_number first; if there is no PO number specified, the system uses the order-level po_number.

Updates the Purchase order # field in the Order Ship To file; see the Purchase order # at the Display Order Properties Screen. If the Verify Duplicate PO Numbers for A/R Orders (D80) system control value is set to Y and the purchase order number is a duplicate, the order will be in error with a reason of Duplicate PO#. Also, if the PO Required for A/R Orders (D79) system control value is set to Y and no purchase order number is specified, the order will be in error with a reason of Missing PO#-Req for A/R.

Available in version: 6.0 or later of CWDirect.

start_date

numeric

4

Indicates the first date when the card is effective. MMYY format. The Require start date flag for the pay type controls whether a start date is required for credit card pay types. If a start date is required and it is not provided in the message, the order will be in error with a reason of CC Expiration/Start Date.

Typically used for debit card or stored value card pay types. See Types of Credit Cards for more information.

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

card_issue_nbr

alpha

2

A sequential issue number, issued by the bank, indicating how many times the card has been replaced. The Require issue # flag for the pay type controls whether an issue number is required for credit card pay types. If an issue number is required and it is not provided in the message, the order will be in error with a reason of Invalid Card Issue#.

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

bml_version

numeric

5

Used as the terms and conditions (T&C) code when creating an account for a customer with a Bill Me Later payment method. If a T&C code is not included in the message, the system uses the BML T&C version (web site)T&C web site specified for the Bill Me Later pay type. The terms and conditions code should be zero-filled in order to update the Customer Sold To BML file correctly. For example, a terms and conditions code of 123 should be passed as a bml_version of 00123. See Bill Me Later Processing for more information.

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

soc_sec_nbr

numeric

9

Used for a Bill Me Later pay type. Because the social security number is treated here as a numeric value, it should be zero-filled if just the last four digits are included. For example, if the customer enters 1234 as the last four digits of the social security number, this attribute should be set to 000001234 in order to update the Customer Sold To BML file correctly.

The social security number is not required if the customer already has a Bill Me Later account number, as shown at the Display Customer Order History Screen. However, if the customer does not already have a Bill Me Later account and the last four digits of the social security number are not provided, the order will be in error with a reason of Invalid social security number.

The system updates the Customer Sold To BML file with the social security number provided, so this information will be available when you send the order out for authorization.

See Bill Me Later Processing for more information.

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

birthdate

numeric

8

Used for a Bill Me Later pay type. MMDDYYYY format. The date of birth should be zero-filled in order to update the Customer Sold To BML file correctly. For example, if the customer’s date of birth is August 25, 1953, the birth date should be 08251953.

The date of birth is not required if the customer already has a Bill Me Later account number, as shown at the Display Customer Order History Screen. However, if the customer does not already have a Bill Me Later account and the date of birth is not provided, the order will be in error with a reason of Invalid date of birth.

The system updates the Customer Sold To BML file with the birth date provided, so this information will be available when you send the order out for authorization.

See Bill Me Later Processing for more information.

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

check_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the cash/check payment method on the order.

This code must be a valid cash/check pay type (payment category 1).

To create a cash/check payment method on the order, at minimum, you must enter the pre-paid pay type code in the check_type field and the amount in the check_amount field.

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

check_number

numeric

9

Updates the Check number field in the Order Payment Method file.

The number of the check. Used for cash/check payment methods.

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

check_amount

numeric

9.2

The amount of the check. Used for cash/check payment methods.If an amount is not defined, the system places the order on balance due hold.

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

checking_account

alpha

20

The checking account number. Used for cash/check payment methods.

Updates the Checking account field in the Order Payment Method file.

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

routing_number

numeric

9

The routing number defined for the check. Used for cash/check payment methods.

Updates the Routing number field in the Order Payment Method file.

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

cash_control_

number

numeric

5

The cash control number assigned to the check. Used for cash/check payment methods.

Updates the Cash control number field in the Order Payment Method file.

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

pin_id

numeric

9

Informational-only; used for cash/check payment methods.

Updates the Pin storage field in the Order Payment Method file. The Pin storage field is not currently implemented.

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

authentication_value

alpha

40

A code received from an authentication service, such as Visa’s Verified by Visa program or MasterCard’s SecureCode program, indicating whether the card authentication password the cardholder entered on the web storefront was approved for the credit card. See Credit Card Authentication Service for more information.

Updates the Authentication value field in the Order Payment Method file.

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

ecommerce_indicator

alpha

4

This value represents either:

• An electronic commerce indicator code, received from an authentication service such as Visa’s Verified by Visa program or MasterCard’s SecureCode program, indicating the level of security provided for a credit card transaction placed over the internet.

• A value indicating if the order was placed on a web storefront. Valid values are:

YES = The order was placed over the web storefront.

NO = The order was not placed over the web storefront.

Updates the Ecomm Indic field in the Order Payment Method file.

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

E-Commerce New Order Message: Sample XML

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

<Message source="WEB" target="RDC" type="CWCreateOrder" resp_qmgr="response.q.manager" resp_q="response.q">

- <Header company_code="555" order_number="555" offer_id="204" source_code="2004" bill_to_prefix="MS." bill_to_fname="BERNADETTE" bill_to_initial="T" bill_to_lname="MIRANDA" bill_to_busres="R" bill_to_address1="109 SAMPLE LN" bill_to_city="TEMPLETON" bill_to_state="MA" bill_to_country="USA" bill_to_zip="01468" bill_to_email="BMIRANDA@EXAMPLE.COM" bill_to_day_phone="9785550101" bill_to_opt_in="O1" allow_rent="Y" allow_email="Y" allow_mail="Y" nbr_ship_tos="1" pay_incl="1" ar_prefix="MR." ar_fname="RICHARD" ar_initial="J" ar_lname="LETENDRE" ar_street_address="94 EXAMPLE ST" ar_city="SPRINGFIELD" ar_state="MA" ar_country="USA" ar_zip="01119" ar_day_phone="413 555 0102" ar_email_address="RLETENDRE@EXAMPLE.COM" ar_opt_in="O2" ar_print_statement="Y">

<UserFields>

<UserField usr_fld_dtl_seq_number="001" usr_fld_label="birthdate" usr_fld_data="123074" />

<UserField />

</UserFields>

</Header>

<ShipTos>

<ShipTo shipping_method="1" gift="Y" gift_message="HAPPY BIRTHDAY" ship_to_type="1" ship_to_fname="NONA" ship_to_lname="NONNIE" ship_to_busres="R" ship_to_address1="11 EXAMPLE ST" ship_to_apartment="FRONT" ship_to_city="MEDWAY" ship_to_state="MA" ship_to_zip="02053" ship_to_country="USA" ship_to_email="NNONNIE@EXAMPLE.COM" item_count="3">

<Ord_Msgs>

<Ord_Msg ord_msg_code="P" ord_msg_text="ORDER MESSAGE" />

</Ord_Msgs>

<Items>

<Item item_id="2004ITEM1" sku="1745" quantity="1" list_price="2500" gift_wrap="Y" prc_ovr_rsn="C">

<personalization_lines>

<personalization_line personalization_text="KAB" />

<personalization_line />

</personalization_lines>

<Lin_Msgs>

<Lin_Msg lin_msg_code="P" lin_msg_text="ORDER LINE MESSAGE" />

</Lin_Msgs>

</Item>

<Item item_id="2004ITEM2" quantity="1">

<personalization_lines>

<personalization_line personalization_text="KAB" />

<personalization_line />

</personalization_lines>

<Lin_Msgs>

<Lin_Msg lin_msg_code="P" lin_msg_text="ORDER LINE MESSAGE" />

</Lin_Msgs>

</Item>

<Item item_id="2004ITEM3" quantity="1">

<personalization_lines>

<personalization_line personalization_text="KAB" />

<personalization_line />

</personalization_lines>

<Lin_Msgs>

<Lin_Msg lin_msg_code="P" lin_msg_text="ORDER LINE MESSAGE" />

</Lin_Msgs>

</Item>

</Items>

</ShipTo>

</ShipTos>

<Payments>

<Payment ar_type="9" />

<Payment />

<Payment />

</Payments>

</Message>

Sample custom special handling information:

The personalization_line element(s) include the special handling instructions in the personalization_text attribute. The personalization_type is set to C (custom), and there is a personalization_seq_nbr for each entry. Also, a personalization_line that includes a blank personalization_text attribute is included for each unused line in the special handling format so that it will be possible to edit the special handling instructions and enter additional information in order maintenance.

For more information: See the personalization_line element in the E-Commerce New Order Message (CWCreateOrder).

<Message source="WEB" target="RDC" type="CWCreateOrder" resp_qmgr="response.q.manager" resp_q="response.q">

<Header company_code="027" order_number="CWCreateOrder 10/24_a" source_code="SOURCE" customer_number="1487" pay_incl="1">

</Header>

<ShipTos>

<ShipTo shipping_method="1" item_count="1">

<Items>

<Item sku="1844" quantity="1" list_price="1000" personalization_id="E">

<personalization_lines>

<personalization_line personalization_seq_nbr="1" personalization_type="C" personalization_text="Palatino" />

<personalization_line personalization_seq_nbr="2" personalization_type="C" personalization_text="Y" />

<personalization_line personalization_seq_nbr="3" personalization_type="C" personalization_text="Peter W. Van Voorhis" />

<personalization_line personalization_seq_nbr="4" personalization_type="C" personalization_text="24 Prime Park Way" />

<personalization_line personalization_seq_nbr="5" personalization_type="C" personalization_text="Natick, MA 01760" />

<personalization_line personalization_seq_nbr="6" personalization_type="C" personalization_text=" " />

<personalization_line personalization_seq_nbr="7" personalization_type="C" personalization_text=" " />

<personalization_line personalization_seq_nbr="8" personalization_type="C" personalization_text=" " />

<personalization_line personalization_seq_nbr="9" personalization_type="C" personalization_text=" " />

<personalization_line personalization_seq_nbr="10" personalization_type="C" personalization_text=" " />

<personalization_line personalization_seq_nbr="11" personalization_type="C" personalization_text="Gold" />

</personalization_lines>

</Item>

</Items>

</ShipTo>

</ShipTos>

<Payments>

<Payment cc_type="5" cc_number="5" cc_exp_month="12" cc_exp_year="06" auth_number="auth" />

</Payments>

</Message>

Sample standard special handling information:

The personalization_line element(s) include the special handling instructions in the standard_text attribute. The personalization_type is set to S (standard), and there is no personalization_seq_nbr.

For more information: See the personalization_line element in the E-Commerce New Order Message (CWCreateOrder).

<Message source="WEB" target="RDC" type="CWCreateOrder" resp_qmgr="response.q.manager" resp_q="response.q">

<Header company_code="027" order_number="CWCreateOrder 10/24_a" source_code="SOURCE" customer_number="1487" pay_incl="1">

</Header>

<ShipTos>

<ShipTo shipping_method="1" item_count="1">

<Items>

<Item sku="1842" quantity="1" list_price="1000" personalization_id="A">

<personalization_lines>

<personalization_line personalization_type="S" standard_text="Peter W. Van Voorhis" />

<personalization_line personalization_type="S" standard_text="Navy ink, script" />

</personalization_lines>

</Item>

</Items>

</ShipTo>

</ShipTos>

<Payments>

<Payment cc_type="5" cc_number="5" cc_exp_month="12" cc_exp_year="06" auth_number="auth" />

</Payments>

</Message>

E-Commerce New Order Message: Sample NVP

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

company_code=555;order_number=555;offer_id=204;source_code=2004;bill_to_prefix=MS.;bill_to_fname=BERNADETTE;bill_to_initial=T;bill_to_lname=MIRANDA;bill_to_busres=R;bill_to_address1=109 SAMPLE LN;bill_to_city=TEMPLETON;bill_to_state=MA;bill_to_country=USA;bill_to_zip=01468;bill_to_email=BMIRANDA@EXAMPLE.COM;bill_to_day_phone=978 555 0103;bill_to_opt_in=O1;allow_rent=1;allow_email=1;allow_mail=1;nbr_ship_tos=1;pay_incl=1;ar_prefix=MR.;ar_fname=RICHARD;ar_initial=J;ar_lname=LETENDRE;ar_street_address=94 SAMPLE ST;ar_city=SPRINGFIELD;ar_state=MA;ar_country=USA;ar_zip=01119;ar_day_phone=423 782 7520;ar_print_statement=1;shipping_method=01;gift=1;gift_message=HAPPY BIRTHDAY;ship_to_type=1;ship_to_fname=NONA;ship_to_lname=NONNIE;ship_to_busres=R;ship_to_address1=11 EXAMPLE ST;ship_to_apartment=FRONT;ship_to_city=MEDWAY;ship_to_state=MA;ship_to_zip=02053;ship_to_country=USA;ship_to_email=NNONNIE@EXAMPLE.COM;ship_to_day_phone=508 555 0100;ord_msg_count=1;ord_msg_code=G;ord_msg_text=HAPPY BIRTHDAY;item_count=1;item_id=2004ITEM1;sku=1745;quantity=1;list_price=2500;price_override=C;gift_wrap=Y;nbr_paytypes=1;cc_type=4;cc_number=4788250000121443;cc_exp_month=12;cc_exp_year=2005;

E-Commerce Payment Message (CWPayment)

 

The EC_PAY_ACC job, started through Working with E-Commerce Job Control (EJCT), receives the Payment message from the web storefront. This message contains information to:

• create one or more payment methods for an order,

• create a customer bill to if the name entered for the credit card is different from the name of the customer sold to,

• submit the ECOMM_ORDR job (described below) to the Job Queue for E-Commerce Order Processing (G53) specified in the System Control file.

Note:

• The Perform Order Edit Interactively (I56) system control value determines whether this job performs the order edit, or if the edit is submitted to batch.

• The Send Order Response After E-Commerce Payment Message (I57) system control value controls whether this function also generates an E-Commerce New Order Response Message (CWOrderResponse).

ECOMM_ORDR job: The ECOMM_ORDR job evaluates the order for errors. If there are errors, the order is assigned to the Default Batch for E-Commerce Orders in Error (G41), and the system produces the Order Error Listing; you must use batch order entry to correct the order and submit it to the phone orders edit. If there are no errors, the order is submitted to a credit check and created in an open or held status, depending on the result. In any case, this job always generates an e-mail order confirmation to the customer (regardless of the value in the Opt in/Opt outOpt in/Opt out field in the Customer Sold To and Customer Sold To Entity files), using the Order Acknowledgement Program (G50) system control value.

For more information: See:

E-Commerce Order Creation for additional processing information.

E-Commerce Payment Message: Sample XML

E-Commerce Payment 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 Payment (EC_PAY_ACC) name/value pair message uses the following layout: name=value.

Example:

companycode=555

order_id=7557

order_number=7607

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 required.

Available in version: The Message element and all of its attributes is available for XML only.

source

alpha

 

WEB

target

alpha

 

RDC

type

alpha

 

CWPayment

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).

Payment

The Payments element can include one or more Payment elements. At least one payment method is required.

company_code

numeric

3

Identifies the company for the order.

Validated against the Company file.

Required.

order_id

numeric

8

From the Order # field in the Order Header file.

order_number

alpha

32

From the E-commerce order number in the Order Header Extended file. This field is labeled the Web order number at the Display Order Properties Screen.

cc_name

alpha

40

Not currently implemented.

cc_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the credit card payment method on the order.

This code must be a valid credit card pay type (payment category 2), including:

• Bill Me Later (card type B)

• credit card (card type C)

• debit card (card type D)

• stored value card (card type S)

cc_number

alpha

20

Updates the Credit card number field in the Order Payment Method file; see the Credit card # field at the Display Order Pay Type Screen (1 of 2). Required for credit card payment methods except for Bill Me Later, or the order will be in error with a reason of Invalid Credit Card. See Types of Credit Cards for more information.

Encryption: Credit card encryption allows you to encrypt the credit card number in the CWDirect database. If you use credit card encryption, the credit card number in this message will not be encrypted because it is from an external system; however, the system encrypts the credit card number in the CWDirect database once the order is created.

Auto-assignment: If the Allow auto-assign field for a pay category 2 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 cc_number field for the order. See Allow Auto-Assignment of Pay Category 2 Pay Type for additional processing information.

cc_exp_month

numeric

2

Updates the first two positions of the Expiration date field in the Order Payment Method file; see the Expiration date at the Display Order Pay Type Screen (1 of 2). The Require expiration dateRequire expiration date flag for the pay type controls whether an expiration date is required for credit card payment methods. If the pay type requires an expiration date and it is not passed in the message, the order will be in error with a reason of CC Expiration/Start Date.

cc_exp_year

numeric

4

Updates the second two positions of the Expiration date field in the Order Payment Method file; see the Expiration date at the Display Order Pay Type Screen (1 of 2). Required for credit card payment methods. The Require expiration dateRequire expiration date flag for the pay type controls whether an expiration date is required for credit card payment methods. If the pay type requires an expiration date and it is not passed in the message, the order will be in error with a reason of CC Expiration/Start Date.

cc_sec_value

numeric

4

This field is not currently implemented.

You can only define a card security value on an order entered through regular order entry/maintenance.

See Credit Card Security Service (CID, CVV2, CVC2) for more information on credit card security processing.

Available in version: 6.01 or later of CWDirect.

cc_sec_presence

alpha

1

This field is not currently implemented.

You can only define a card security value on an order entered through regular order entry/maintenance.

See Credit Card Security Service (CID, CVV2, CVC2) for more information on credit card security processing.

Available in version: 6.01 or later of CWDirect.

auth_number

alpha

7

Updates the Authorization number field in the Order Payment Method file; see the Authorization number at the Display Order Pay Type Screen (1 of 2). Used for credit card payment methods.

auth_date

numeric

8

Updates the Authorization date field in the Order Payment Method file; see the Authorization date at the Display Order Pay Type Screen (1 of 2). MMDDYYYY format. Used for credit card payment methods.

auth_amount

numeric

9.2

Updates the Manual auth amount field in the Order Payment Method file; see the Authorization amount at the Display Order Pay Type Screen (1 of 2). Used for credit card payment methods.

amt_to_charge

numeric

9.2

Updates the Amount to charge field in the Order Payment Method file; see the Amount to charge field at the Display Order Pay Type Screen (1 of 2). For a coupon/gift certificate or cash/check payment method, also updates the Amount collected field. Required if the payment method is not the only one on the order. A negative amount represents a credit against the payment method.

If you do not specify an amount and there is another payment method on the order without an amount specified, the order will be in error with a reason of Multiple CCs with $0. This error indicates that the order can have only one “catch-all” payment method; see the discussion of catch-all payment methods at the Enter Payment Method Screen.

Available in version: 6.0 or later of CWDirect.

gc_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the gift certificate or coupon payment method on the order.

If this field is blank, the system uses the value in the Default Pay Type for Gift Certificates/Coupons (G48) system control value. If there is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not check the value of the gift_certificate_amount field.

The gc_type field and/or Default Pay Type for Gift Certificates/Coupons (G48) must specify a valid coupon/credit pay type (payment category 5).

Available in version: 6.0 or later of CWDirect.

gift_certificate_number

numeric

7

Updates the Gift cert/coupon field in the Order Payment Method file. Required if a coupon/credit payment method is defined in the gc_type field.

• If this value is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not check the value of the gift_certificate_amount field.

• If this value does not match a record in the Coupon Redemption file, the system creates a coupon or credit payment method on the order; however, the Dynamic Creation of Coupons (B21) system control value must be set to Y, or the order will be in error because of an Invalid coupon.

gift_certificate_amount

numeric

9.2

The amount of the coupon/credit payment method.

If there is a valid, unredeemed gift certificate/coupon number in the gift_certificate_number field on the order message, the system uses the amount specified for this number in the Coupon Redemption file and does not use the amount defined in the gift_certificate_amount field.

expiration_date

alpha

8

The date the coupon/credit payment method expires.

hold_id

alpha

2

If a hold reason code is included, the system checks that the order hold reason code is valid. If the code is valid, the system puts the order on hold; otherwise, the order goes into error status.

Updates the OHD OHR Sys hold reason field in the Order Header file.

Available in version: 5.0 or later of CWDirect.

ar_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the accounts receivable payment method on the order.

This code must be a valid accounts receivable pay type (payment category 3).

See Selecting or Creating Bill-to Customers in E-Commerce Orders for information on how a bill-to customer is added to an accounts receivable order.

Available in version: 6.0 or later of CWDirect.

po_number

alpha

15

For each ship-to on the order, the system checks the ship_to_po_number first; if there is no PO number specified, the system uses the order-level po_number.

Updates the Purchase order # field in the Order Ship To file; see the Purchase order # at the Display Order Properties Screen. If the Verify Duplicate PO Numbers for A/R Orders (D80) system control value is set to Y and the purchase order number is a duplicate, the order will be in error with a reason of Duplicate PO#. Also, if the PO Required for A/R Orders (D79) system control value is set to Y and no purchase order number is specified, the order will be in error with a reason of Missing PO#-Req for A/R.

Available in version: 6.0 or later of CWDirect.

start_date

numeric

4

Indicates the first date when the card is effective. MMYY format. The Require start date flag for the pay type controls whether a start date is required for credit card pay types. If a start date is required and it is not provided in the message, the order will be in error with a reason of CC Expiration/Start Date.

Typically used for debit card or stored value card pay types. See Types of Credit Cards for more information.

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

card_issue_nbr

alpha

2

A sequential issue number, issued by the bank, indicating how many times the card has been replaced. The Require issue # flag for the pay type controls whether an issue number is required for credit card pay types. If an issue number is required and it is not provided in the message, the order will be in error with a reason of Invalid Card Issue#.

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

soc_sec_nbr

numeric

9

Used for a Bill Me Later pay type. Because the social security number is treated here as a numeric value, it should be zero-filled if just the last four digits are included. For example, if the customer enters 1234 as the last four digits of the social security number, this attribute should be set to 000001234 in order to update the Customer Sold To BML file correctly.

The social security number is not required if the customer already has a Bill Me Later account number, as shown at the Display Customer Order History Screen. However, if the customer does not already have a Bill Me Later account and the last four digits of the social security number are not provided, the order will be in error with a reason of Invalid social security number.

The system updates the Customer Sold To BML file with the social security number provided, so this information will be available when you send the order out for authorization.

See Bill Me Later Processing for more information.

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

bml_version

numeric

5

Used as the terms and conditions (T&C) code when creating an account for a customer with a Bill Me Later payment method. If a T&C code is not included in the message, the system uses the BML T&C version (web site)T&C web site specified for the Bill Me Later pay type. The terms and conditions code should be zero-filled in order to update the Customer Sold To BML file correctly. For example, a terms and conditions code of 123 should be passed as a bml_version of 00123. See Bill Me Later Processing for more information.

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

birthdate

numeric

8

Used for a Bill Me Later pay type. MMDDYYYY format. The date of birth should be zero-filled in order to update the Customer Sold To BML file correctly. For example, if the customer’s date of birth is August 25, 1953, the birth date should be 08251953.

The date of birth is not required if the customer already has a Bill Me Later account number, as shown at the Display Customer Order History Screen. However, if the customer does not already have a Bill Me Later account and the date of birth is not provided, the order will be in error with a reason of Invalid date of birth.

The system updates the Customer Sold To BML file with the birth date provided, so this information will be available when you send the order out for authorization.

See Bill Me Later Processing for more information.

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

check_type

numeric

2

Maps to the Pay type field in the Order Payment Method file.

Identifies the cash/check payment method on the order.

This code must be a valid cash/check pay type (payment category 1).

To create a cash/check payment method on the order, at minimum, you must enter the pre-paid pay type code in the check_type field and the amount in the check_amount field.

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

check_number

numeric

9

Updates the Check number field in the Order Payment Method file.

The number of the check. Used for cash/check payment methods.

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

check_amount

numeric

9.2

The amount of the check. Used for cash/check payment methods.If an amount is not defined, the system places the order on balance due hold.

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

checking_account

alpha

20

The checking account number. Used for cash/check payment methods.

Updates the Checking account field in the Order Payment Method file.

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

routing_number

numeric

9

The routing number defined for the check. Used for cash/check payment methods.

Updates the Routing number field in the Order Payment Method file.

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

cash_control_number

numeric

5

The cash control number assigned to the check. Used for cash/check payment methods.

Updates the Cash control number field in the Order Payment Method file.

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

pin_id

numeric

9

Informational-only; used for cash/check payment methods.

Updates the Pin storage field in the Order Payment Method file. The Pin storage field is not currently implemented.

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

authentication_value

alpha

40

A code received from an authentication service, such as Visa’s Verified by Visa program or MasterCard’s SecureCode program, indicating whether the card authentication password the cardholder entered on the web storefront was approved for the credit card. See Credit Card Authentication Service for more information.

Updates the Authentication value field in the Order Payment Method file.

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

ecommerce_indicator

alpha

4

This value represents either:

• An electronic commerce indicator code, received from an authentication service such as Visa’s Verified by Visa program or MasterCard’s SecureCode program, indicating the level of security provided for a credit card transaction placed over the internet.

• A value indicating if the order was placed on a web storefront. Valid values are:

YES = The order was placed over the web storefront.

NO = The order was not placed over the web storefront.

Updates the Ecomm Indic field in the Order Payment Method file.

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

E-Commerce Payment Message: Sample XML

A sample of the E-Commerce Payment Message (CWPayment) in XML format is presented below.

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

- <Payments>

<Payment company_code="555" order_id="7613" order_number="555" nbr_paytypes="03" cc_exp_month="" cc_exp_year="" ar_type="09" />

<Payment company_code="555" order_id="7613" order_number="555" nbr_paytypes="03" cc_name="VISA" cc_type="04" cc_number="4788250000121443" cc_exp_month="09" cc_exp_year="2005" cc_sec_value="5522" cc_sec_presence="1" auth_amount="000002500" />

<Payment company_code="555" order_id="7613" order_number="555" nbr_paytypes="03" cc_name="MASTERCARD" cc_type="05" cc_number="5500545454545345" cc_exp_month="06" cc_exp_year="2006" auth_amount="000005000" />

</Payments>

</Message>

E-Commerce Payment Message: Sample NVP

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

company_code=555;order_id=7613;order_number=7613;nbr_paytypes=1;cc_name=VISA;cc_type=04;cc_number=4788250000121443;cc_exp_month=09;cc_exp_year=2005;cc_sec_value=5522;cc_sec_presence=1;gc_type=10;gift_certificate_number=88555;gift_certificate_amount=10000;

E-Commerce New Order Response Message (CWOrderResponse)

 

The EC_ORDERS job, started through Working with E-Commerce Job Control (EJCT), sends a New Order Response message to the web storefront if the payment information for the new order is sent separately in the E-Commerce Payment Message (CWPayment).

For more information: See:

E-Commerce Order Creation for additional processing information

E-Commerce New Order Response Message: Sample XML

E-Commerce New Order 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 New Order Response (EC_ORDERS) name/value pair message uses the following layout: name=value.

Example:

companycode=555

order_id=7557

offer_id=204

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 required.

Available in version: The Message element and all of its attributes is available for XML only.

source

alpha

 

Identifies the source of the XML message.

RDC indicates the XML message originates from CWDirect.

target

alpha

 

Identifies the target of the XML message.

WEB indicates the XML message is sent to the web storefront.

type

alpha

 

Identifies the type of information in the XML message.

Header

One Header element is required.

company_code

numeric

3

Identifies the company for the order.

From the CMP Company field in the Order Header file.

order_id

numeric

8

The order number assigned by CWDirect.

From the Order # field in the Order Header file.

offer_id

alpha

3

Identifies the offer on the order.

order_number

alpha

32

From the E-commerce order number in the Order Header Extended file. This field is labeled the Web order number at the Display Order Properties Screen.

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.

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.

sub_total

numeric

9.2

The merchandise total on the order ship to, after applying any repricing or discounts.

From the OST Merch field in the Order Ship To file.

discount_total

numeric

9.2

The discount total on the order ship to.

The system subtracts the offer price from the selling price for each order line to determine the total discount.

shipping

numeric

7.2

The total freight charges for the order ship to.

From the OST Freight field in the Order Ship To file.

additional_shipping

numeric

7.2

The total additional freight for the order ship to.

From the Add’l freight field in the Order Ship To file.

tax

numeric

7.2

The total tax for the order ship to.

From the OST Tax field in the Order Ship To file.

additional_charges

numeric

7.2

The total additional charges for the order ship to.

From the OST Add’l charges field in the Order Ship To file.

handling

numeric

7.2

The total handling charges for the order ship to.

From the OST Handling field in the Order Ship To file.

order_total

numeric

11.2

The total of all merchandise, shipping, charges, handling, and tax for the order ship to.

gst

numeric

7.2

The total Canadian Goods and Service Tax, if any, that applies to the order shipping address. The GST and PST are included in the tax total.

From the OST GST field in the Order Ship To file.

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

pst

numeric

7.2

The total Canadian Provincial Services Tax, if any, that applies to the order shipping address. The GST and PST are included in the tax total.

From the OST PST field in the Order Ship To file.

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

customer_number

numeric

9

The number identifying the sold to customer on the order.

From the Customer # field in the Order Header file.

ind_number

numeric

3

The number identifying the individual customer on the order.

From the OHE Placer field in the Order Header Extended file.

Available in version: 6.0 or later of CWDirect.

ar_number

numeric

7

The number identifying the bill to customer on the order.

From the CBT Account # field in the Order Header file.

Available in version: 6.0 or later of CWDirect.

free_giftr

alpha

30

Free gift message on the order.

Detail

ship_to_number

numeric

3

The number identifying the ship to address on the order.

From the Ship to # field in the Order Ship To file.

Available in version: 5.0 or later of CWDirect.

sku

numeric

7

The short SKU code for 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.

The pickup_type, pickup_system_location, and pickup_location 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

alpha

2

Indicates that the item is flagged for store fulfillment. Valid values are:

SP = flagged for store pickup

SS = flagged for store shipment

Passed only for a store fulfillment; see Merchandise Locator and Store Fulfillment API through .NET for an overview.

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

pickup_system_

location

alpha

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.

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

pickup_location

alpha

10

A code identifying the location where the customer will pick up the item, or that will ship the item. Passed only for a store fulfillment request.

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

list_price

numeric

7.2

The unit price of the item. Not included for free gift or no-charge items.

From the ODT Price field in the Order Detail file.

status

alpha

50

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)

Item is backordered (BO)

X reserved (1, partial backorder)

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.

reserved_warehouse

numeric

3

The warehouse where the item is reserved.

Passed only if the item is reserved.

From the ODT Whs warehouse field in the Order Detail file.

reserved_quantity

numeric

5

Passed only if the item is reserved. May be less than the order_quantity.

From the ODT Qty reserved field in the Order Detail file.

Promotion

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.

The Promotion element is included only if the Write Promotional Information to the Order Response Message (J38) system control value and Apply End of Order Discounts during Repricing (J37) system control value are set to Y.

Available in version: The Promotion element and all of its attributes is available in version 10.0 or later of CWDirect for XML only.

promotion_ship_to_number

numeric

3

The order ship to number associated with the end of order promotion.

From the Ship to # in the Order Discount Audit file.

promotion_type_

code

alpha

2

A code used to identify the type of promotion applied to the order.

Valid values are:

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 Discounts and Promotions for more information about each promotion type.

From the Promotion type field in the Order Discount Audit file.

promotion_type_

code_desc

alpha

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, 0.00 displays.

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

alpha

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, indicating a discount to the order.

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

alpha

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

alpha

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

alpha

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

alpha

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

alpha

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

alpha

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, 0.00 displays.

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.

E-Commerce New Order Response Message: Sample XML

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

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

<Header company_code="555" order_id="7614" offer_id="204" order_number="555" bill_me_later_ind="N" sub_total="000004500" shipping="0000140" additional_shipping="0000200" tax="0000675" order_total="00000005515" customer_number="000000496" ar_number="0000080" />

- <Details>

<Detail ship_to_number="001" sku="1745" item_id="2004ITEM1" list_price="0002500" status="In stock and reserved!" reserved_warehouse="204" reserved_quantity="00001" />

<Detail ship_to_number="001" sku="1748" item_id="2004ITEM2" list_price="0001000" status="In stock and reserved!" reserved_warehouse="204" reserved_quantity="00001" />

<Detail ship_to_number="001" sku="1750" item_id="2004ITEM3" list_price="0001000" status="In stock and reserved!" reserved_warehouse="204" reserved_quantity="00001" />

</Details>

</Message>

E-Commerce New Order Response Message: Sample NVP

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

company_code=555;order_id=7615;offer_id=204;order_number=555;bill_me_later_ind=N;sub_total=000000500;shipping=0000140;additional_shipping=0000200;tax=0000075;order_total=00000000915;customer_number=000000496;ar_number=0000080;ship_to_number=001;sku=1745;item_id=2004ITEM1;list_price=0000500;status=In stock and reserved!;reserved_warehouse=204;reserved_quantity=00001;

SO10_02x CWDirect 18.0 August 2015 OTN