Inbound Customer Message (CWCustomerIn)

 

The CWCustomer or CWMessageIn Web Service processes this message and populates the Customer API Work tables. See Adding a Customer using the Customer API for more information, and see Generic Customer API for an overview.

Special characters: Certain special characters cannot be defined in an attribute of an XML message except through the use of replacement text strings. See Translating Special Characters for a list of special characters and their corresponding replacement text string.

Attribute length: If a value defined for an attribute is greater than the allowed number of positions, the system does not place the message in error, and instead truncates the value to the maximum allowed positions. For example, if the maximum length for an attribute is 2 and you define a value that is 3 positions, the system truncates the value to 2 positions. If the attribute requires a valid value, the truncated value must be valid or the message will be placed in Error status.

Sample message: See Sample Customer API XML Messages.

Attribute Name

Type

Length

Comments

Message

One Message element is required.

source

alpha

20

Informational.

target

alpha

20

Informational.

type

alpha

20

Required. Must be CWCustomerIn.

resp_qmgr

alpha

48

Informational.

resp_q

alpha

48

Informational.

CustSoldTo

One CustSoldTo element is required.

cst_ company

numeric

3

Required.

A code for the company where the customer creation or update should take place.

Company codes are defined in and validated against the Company table.

Updates CMP Company in the Customer Sold To table.

cst_action_type

alpha

1

Optional.

Informational value that indicates the type of action to take; however, regardless of the value defined, the system determines whether to create a new customer or change an existing one. See Determining Whether to Add or Change a Customer.

A = Add

C = Change

Error: If set to D, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid action type. You cannot delete a customer through the Generic Customer API.

cst_send_response

alpha

1

Optional.

Y = Send the Outbound Customer Response Message (CWCustomerOut).

N or any other value = Do not send the Outbound Customer Response Message.

cst_duplicate

alpha

1

Not used for a Change request.

Valid values are:

S = Check for duplicates and if single match found, update customer.

A = Check for duplicates and if multiple matches found, update best match customer.

Y = Check for duplicates and if match found, do not update customer.

N or not passed = No duplicate checking.

See Duplicate Checking for Add Requests for a complete discussion.

cst_salesman_nbr

numeric

7

Optional.

Validated against the Salesman table.

Error: If the request includes an invalid salesman number, the system places the message in error in Working with Customer API (WCAI) with the error reason Salesman not found.

Updates Salesman # in the Customer Sold To table; see Salesrep # (Sales representative number) on the First Create Sold To Customer Screen.

cst_interface_cust_nbr

alpha

15

Optional for an Add request.

Required for a Change request if a cst_cust_nbr and cst_relate_id are not defined; see Determining the Customer to Update.

Add request:

• If a cst_interface_cust_nbr is specified, assign this number to the new customer both at the customer level (the Alt cust (Alternate customer number)) and in the Customer Sold To Xref table.

• If no cst_interface_cust_nbr is specified and the Assign Alternate Customer # (I88) system control value is selected, the system assigns the next available alternate customer number to the new customer.

Updates Interface cust code in the Customer Sold To table and creates a record in the Customer Sold To Xref table if it does not already exist; see Alt cust (Alternate customer number) on the Second Create Customer Sold To Screen and in Working with Alternate Customer Number Cross-References.

cst_cust_nbr

numeric

9

Do not include for an Add request.

Required for a Change request if a cst_interface_cust_nbr and cst_relate_id are not defined; see Determining the Customer to Update.

Indicates the customer number to update.

Error: If the request includes an invalid customer number, the system places the message in error in Working with Customer API (WCAI) with the error reason Customer is not valid.

Corresponds to the Customer # in the Customer Sold To table.

cst_language

alpha

3

Optional.

Validated against the Language table (fast path = WLAN).

Error: If the request includes an invalid language code, the system places the message in error in Working with Customer API (WCAI) with the error reason Language not found.

Updates Language Code in the Customer Sold To table; see the Language field on the First Create Sold To Customer Screen.

cst_job_title

alpha

25

Optional.

Updates Job title in the Customer Sold To table; see the Job title field on the Second Create Customer Sold To Screen.

cst_prefix

alpha

3

Optional.

Validated against the Prefix table if the Validate Prefix (I27) system control value is selected; see Working with Prefix Codes (WPFX).

Error: If the Validate Prefix (I27) system control value is selected and the request includes an invalid prefix code, the system places the message in error in Working with Customer API (WCAI) with the error reason Prefix Code not found.

Updates Prefix in the Customer Sold To table; see the Prefix field on the First Create Sold To Customer Screen.

cst_fname

alpha

15

Optional.

Updates First Name in the Customer Sold To table; see the First Name field on the First Create Sold To Customer Screen.

cst_minitial

alpha

1

Optional.

Updates Initial in the Customer Sold To table; see the Initial field on the First Create Sold To Customer Screen.

cst_lname

alpha

25

Required for an Add request if a cst_company_name is not defined.

Required for a Change request if a cst_company_name is not defined and a Default Customer for Customer API (I90) is not set up.

Error: If an Add request does not include a last name or company, the system places the message in error in Working with Customer API (WCAI) with the error reason Both Last name and Company name cannot be blank. Note: This error also occurs for a Change request if a Default Customer for Customer API (I90) has not been defined.

Updates Last Name in the Customer Sold To table; see the Last Name field on the First Create Sold To Customer Screen.

cst_suffix

alpha

3

Optional.

Updates Suffix in the Customer Sold To table; see the Suffix field on the First Create Sold To Customer Screen.

cst_company_name

alpha

30

Required for an Add request if a cst_lname is not defined.

Required for a Change request if a cst_company_name is not defined and a Default Customer for Customer API (I90) is not set up.

Error: If an Add request does not include a last name or company, the system places the message in error in Working with Customer API (WCAI) with the error reason Both Last name and Company name cannot be blank. Note: This error also occurs for a Change request if a Default Customer for Customer API (I90) has not been defined.

Updates Company name in the Customer Sold To table; see the Company field on the First Create Sold To Customer Screen.

Note: Standard address validation applies.

cst_street_addr

alpha

32

Required for an Add request.

Required for a Change request if a Default Customer for Customer API (I90) is not defined.

Shipping to a Post Office Box

To ship to a Post Office Box, enter POST OFFICE BOX, POST BOX, or any variation of PO BOX (with or without spaces or non-alphabet characters, such as P.O. BOX), and the box number in the customer’s street address. During order processing, the system validates that the carrier can ship to a post office box (as defined in the Ship Via table).

Example: Enter P.O. Box 9999 in the Street field to indicate delivery to a post office box instead of a home or company address.

Note: If you type POST OFFICE BOX, POST BOX, or any variation of PO BOX in the customer’s street address during order entry or through the Order API, the system automatically selects the PO box field for the customer. However, if you remove this text from the customer’s street address, the system does not automatically unselect the PO box flag.

Note: When you create a customer outside of order processing, you need to select the PO box field manually.

Error: If an Add request does not include a street address, the system places the message in error in Working with Customer API (WCAI) with the error reason Street Address cannot be blank. Note: This error also occurs for a Change request if a Default Customer for Customer API (I90) has not been defined.

Updates Street Address in the Customer Sold To table; see the Street field on the First Create Sold To Customer Screen.

cst_addr_line_2

alpha

32

Optional.

Updates Address line 2 in the Customer Sold To table and Address line 3 and Address line 4 in the Customer Sold To Extended table; see the three additional Address fields on the First Create Sold To Customer Screen.

cst_addr_line_3

alpha

32

cst_addr_line_4

alpha

32

cst_apt

alpha

10

Optional.

Updates Apartment in the Customer Sold To table; see the Apt/suite (Apartment/suite) field on the First Create Sold To Customer Screen.

cst_city

alpha

25

Required for an Add request.

Required for a Change request if a Default Customer for Customer API (I90) is not defined.

Error: If an Add request does not include a city, the system places the message in error in Working with Customer API (WCAI) with the error reason City cannot be blank. Note: This error also occurs for a Change request if a Default Customer for Customer API (I90) has not been defined.

Updates City in the Customer Sold To table; see the City field on the First Create Sold To Customer Screen.

cst_state

alpha

2

Required for an Add request if the cst_country requires a state; otherwise, optional.

Optional for a Change request.

State codes are defined in and validated against the State table.

Errors:

• If an Add request does not include a state code and the specified cst_country requires a state, the system places the message in error in Working with Customer API (WCAI) with the error reason State is required for this country.

• If you define an invalid state code for the specified cst_country, the system places the message in error in Working with Customer API (WCAI) with the error reason State not found for country.

Updates State in the Customer Sold To table; see the St (State) field on the First Create Sold To Customer Screen.

cst_zip

alpha

10

Required for an Add request if the cst_country requires a postal code.

Optional for a Change request.

Postal codes are defined in and validated against the SCF table.

Errors:

• If the cst_country requires a postal code and an Add request does not include a postal code, the system places the message in error in Working with Customer API (WCAI) with the error reason Zip cannot be blank.

• If the cst_country requires a postal code and you define a postal code that does not exist in the SCF table, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid SCF entered.

• If the cst_country requires a postal code and you define a postal code that exists in the SCF table, but whose valid states do not match the state defined for the customer, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid state for zip.

• If the cst_country does not require a postal code and you define a postal code, no validation of the postal code occurs.

Updates Zip and Postal Code Scan in the Customer Sold To table; see the Postal code field on the First Create Sold To Customer Screen.

cst_country

alpha

3

Required for an Add request if the Default Country for Customer Address (B17) system control value is blank.

Optional for a Change request.

Default: If an Add request does not include a country, the system defaults the value from the Default Country for Customer Address (B17) system control value.

Validated against the Country table; see Setting Up the Country Table (WCTY).

Error: If the request includes an invalid country code, the system places the message in error in Working with Customer API (WCAI) with the error reason Country is not valid.

Updates Country in the Customer Sold To table; see the Country field on the First Create Sold To Customer Screen.

cst_day_phone

alpha

14

Optional.

Updates CS # Phone and CS# Extension in the Customer Sold To Phone # table for CS# Phone # type D (day), E (eve), and F (fax); see the related Phone # (Day, Eve, Fax or Mbl) and Ext (Extension) fields on the Second Create Customer Sold To Screen.

Note:

• The system formats phone numbers according to the rules in effect for the cst_country passed in the message.See Work with Telephone Number Format Screen for more information.

• The Third Phone Number Type (L53) system control value determines whether the third phone number is labeled the Fax or Mobile number on screens and reports.

• If you define a phone extension, you must also include the corresponding phone number.

cst_day_ext

alpha

4

cst_eve_phone

alpha

14

cst_eve_ext

alpha

4

cst_fax_phone

alpha

14

cst_fax_ext

alpha

4

cst_mail_name

alpha

1

Optional.

Valid values are:

Y = Mail catalogs to the customer.

N = Do not mail catalogs to the customer.

Default:

• If an Add request does not include a mail name or it is invalid, the system defaults the value from the Default Mail Name (D10) system control value.

• If a Change request does not include a mail name or it is invalid and a Default Customer for Customer API (I90) is not defined, the system defaults the value from the Default Mail Name (D10) system control value.

Error: If a request includes an invalid mail flag and the system places the message in error in Working with Customer API (WCAI) for some other reason, the system validates the mail name setting and displays an error if it is invalid: Mail flag must be Y or N.

Updates Mail name? in the Customer Sold To table; see the Mail flag on the First Create Sold To Customer Screen.

cst_rent_name

alpha

1

Optional.

Valid values are:

Y = You can sell the customer's name to another company.

N = Do not sell the customer's name to another company.

Default:

• If an Add request does not include a rent name or it is invalid, the system defaults the value from the Default Rent Name (D11) system control value.

• If a Change request does not include a rent name or it is invalid and a Default Customer for Customer API (I90) is not defined, the system defaults the value from the Default Rent Name (D11) system control value.

Error: If a request includes an invalid rent flag and the system places the message in error in Working with Customer API (WCAI) for some other reason, the system validates the rent flag setting and displays an error if it is invalid: Rent flag must be Y or N.

Updates Rent name? in the Customer Sold To table; see the Rent flag on the First Create Sold To Customer Screen.

cst_seed_name

alpha

1

Optional.

Valid values are:

Y = This customer is a seed.

N = This customer is not a seed.

Error: If a request includes an invalid seed flag, the system places the message in error in Working with Customer API (WCAI) with the error reason Seed flag must be Y or N.

Updates Seed name? in the Customer Sold To table; see the Seed flag on the Second Create Customer Sold To Screen.

cst_rent_email

alpha

1

Optional.

Set to Y, N or blank.

Updates Rent E-Mail in the Customer Sold To table.

Note: This flag is not displayed on any screens, and the system does not validate the value in the message.

cst_original_source

alpha

9

Optional.

Validated against the Source table; see Working with Source Codes (WSRC).

If the original source code is XSTORE, the system looks at the setting of the Bypass Customer API Edit (L93) system control value to determine if this transaction should bypass validation.

Error: If a request includes an invalid source code, the system places the message in error in Working with Customer API (WCAI) with the error reason Source code does not exist.

Updates Original Source in the Customer Sold To table; see the Original source code field on the Second Create Customer Sold To Screen.

cst_current_source

alpha

9

Optional.

Validated against the Source table; see Working with Source Codes (WSRC).

Error: If a request includes an invalid source code, the system places the message in error in Working with Customer API (WCAI) with the error reason Source code does not exist.

Updates Source code in the Customer Sold To table; see the Current source code field on the Second Create Customer Sold To Screen.

cst_hold_bypass_

fraud

alpha

1

Optional. No validation.

H = Hold; the system places the customer's orders on hold automatically so you can review, then manually release each order.

B = Bypass; orders for the customer are not included in the A/R credit check function in order entry; however, the customer is still subject to other fraud-checking, as described in for the Fraud Checking (A68) system control value.

F = Fraud; the system places the customer's orders on “fraud” hold automatically so you can review each order and release it as needed.

• blank = Regular customer.

Note: If a request includes a value other than H, B, or F, the system processes the message and does not place it in error.

Updates Hold/Bypass/Fraud in the Customer Sold To table; see the Hold/bypass/fraud field on the First Create Sold To Customer Screen.

cst_orig_mail_type

alpha

1

Optional.

Valid values are:

B = Buyer; a customer who places an order (the “sold-to” customer).

C = Catalog Request; a person who requested a catalog.

R = Recipient; the customer who receives the order (also known as the Ship To customer).

S = Suspect; a customer whose name you acquired through a telemarketing effort or a public or industry listing, or a customer who places an order that is then rejected.

L = Rental.

Errors:

• If an Add request specifies an invalid mail type, the system processes the message and leaves the field blank.

• If a Change request specifies an invalid mail type, the system processes the message and updates the field to blank unless a value is specified for the Default Customer for Customer API (I90).

Updates Original mail type in the Customer Sold To table; see the Original mail type field on the Second Create Customer Sold To Screen.

cst_curr_mail_type

alpha

1

Optional.

Valid values are:

B = Buyer; a customer who places an order (the “sold-to” customer).

C = Catalog Request; a person who requested a catalog.

R = Recipient; the customer who receives the order (also known as the Ship To customer).

S = Suspect; a customer whose name you acquired through a telemarketing effort or a public or industry listing, or a customer who places an order that is then rejected.

L = Rental.

Errors:

• If an Add request specifies an invalid mail type, the system processes the message and leaves the field blank.

• If a Change request specifies an invalid mail type, the system processes the message and updates the field to blank unless a value is specified for the Default Customer for Customer API (I90).

Updates Current mail type in the Customer Sold To table; see the Current mail type field on the Second Create Customer Sold To Screen.

cst_tax_exempt

alpha

1

Optional.

Valid values are:

E = Exempt; the customer is not required to pay tax on purchases. If the order is shipping to a Canadian address, it is exempt from both GST and PST. If set to E you must also define a cst_exempt_certificate.

G = GST Only; the customer is a Canadian customer and subject to the Goods and Services Tax on purchases only, not PST.

N = Non Taxable; the system determines the customer’s tax status in order entry based on whether you enter a Resale/Exempt # and on the shipping address.

P = PST Only; the customer is a Canadian customer and subject to the Provincial Services Tax only, not GST.

R = Resale; the customer is a reseller and not subject to tax. If the order is shipping to a Canadian address, it is exempt from both GST and PST. If set to R you must also define a cst_exempt_certificate.

T = Standard Tax; the customer is subject to all taxes. Canadian customers are subject to both GST and PST tax.

• blank = Not defined.

 

 

 

Errors:

• If you define an invalid value, the system places the message in error in Working with Customer API (WCAI); however, no error message displays and the system allows you to reprocess the request without correcting the error.

• If set to E or R and you do not specify a cst_exempt_certificate, the system places the message in error in Working with Customer API (WCAI) with the error reason Tax exemption certification number required.

Updates Tax exempt status in the Customer Sold To table; see the Tax exempt status field on the Second Create Customer Sold To Screen.

cst_exempt_

certificate

alpha

15

Required for an Add request if the cst_tax_exempt tag is E or R.

Error: If you do not define an exempt certificate and the cst_tax_exempt setting is E or R, the system places the message in error in Working with Customer API (WCAI) with the error reason Tax exemption certification number required.

Updates Exempt certificate in the Customer Sold To table; see the Exempt certificate field on the Second Create Customer Sold To Screen.

cst_exempt_expiry

numeric

7

Optional.

MMDDYYYY format; converted to YYMMDD format in database.

Updates Exempt expiry date in the Customer Sold To table; see the Exempt expiry (Tax exempt certificate expiration date) field on the Second Create Customer Sold To Screen.

cst_associate

alpha

1

Optional. No validation.

Y = The customer is an associate customer.

N = The customer is not an associate customer.

Default: If an Add request does not include an associate flag, the system:

• defaults the value to N if the message is from XStore.

• defaults the value from the Default Associate Code (D09) system control value if the message is not from XStore.

Note: If a request includes a value other than Y or N, the system processes the message and does not place it in error.

Updates Associate customer? in the Customer Sold To table; see the Associate flag on the Second Create Customer Sold To Screen.

cst_cancel_bo

alpha

1

Optional. No validation.

Y = Cancel backordered items automatically with the first shipment on the order.

N = Do not cancel backordered items.

Note: If a request includes a value other than Y or N, the system processes the message and does not place it in error.

Updates Auto cancel B/O? in the Customer Sold To table; see the Auto cancel B/O (Automatic cancel backorder) flag on the First Create Sold To Customer Screen.

cst_commercial

alpha

1

Optional. No validation.

Y = This is a commercial customer.

N = This is a non-commercial customer.

Note: If a request includes a value other than Y or N, the system processes the message and does not place it in error.

Updates Commercial? in the Customer Sold To table; see the Commercial flag on the First Create Sold To Customer Screen.

cst_cust_type

alpha

3

Optional. No validation.

Updates Customer type in the Customer Sold To table; see the Type field on the First Create Sold To Customer Screen.

cst_discount_pct

numeric

5.2

Optional. 999.99 format.

Discount percent amount, including decimals.

Note:

• If an Add request contains a discount greater than 5 positions with a 2-place decimal, the system defaults 0.00.

• If a Change request contains a discount greater than 5 positions with a 2-place decimal, the system retains the customer’s existing value.

Updates Discount % in the Customer Sold To table; see the Price discount % field on the Second Create Customer Sold To Screen.

cst_entry_date

alpha

7

Optional for an Add or Change request.

MMDDYYYY format; converted to CYYMMDD format in database.

Default: If an Add request does not include an entry date or it is not in MMDDYYYY format, the system defaults the current date.

Updates Entry date in the Customer Sold To table; see the Entered date on the First Create Sold To Customer Screen.

cst_inactive

alpha

1

Optional. No validation.

Y = Customer is inactive.

N = Customer is active.

Note: If a request includes a value other than Y or N, the system processes the message and does not place it in error.

Updates Inactive? in the Customer Sold To table; see the Inactive flag on the First Create Sold To Customer Screen.

cst_bypass_

reservation

alpha

1

Optional. No validation.

Y = The customer bypasses reservation.

N = The system reserves inventory in the normal way for all orders for this customer, unless the customer is assigned to a customer class flagged to bypass reservation.

Note: If a request includes a value other than Y or N, the system processes the message and does not place it in error.

Updates Bypass Reservation in the Customer Sold To table; see the Bypass res (Bypass reservation) flag on the First Create Sold To Customer Screen.

cst_pop_window_1

alpha

20

Optional. No validation.

Updates Pop-Up Window #1-4 in the Customer Sold To table; see the Pop up window messages 1-4 messages on the Second Create Customer Sold To Screen.

cst_pop_window_2

alpha

20

cst_pop_window_3

alpha

20

cst_pop_window_4

alpha

20

cst_price_column

numeric

2

Optional. No validation.

Updates Price column in the Customer Sold To table; see the Price column field on the Second Create Customer Sold To Screen.

cst_item_hist_

tracking

alpha

1

Optional. No validation.

1 = No Item Tracking.

2 = Sold To Tracking Only.

3 = Sold To + Ship To Tracking.

Default: If an Add request does not include an item history tracking setting, the system defaults the value from the Default Item History Tracking (B18) system control value; if this system control value is blank, the system sets item history tracking to blank.

Note: If a Change request includes a value other than 1, 2, or 3, and a Default Customer for Customer API (I90) has not been defined, the system sets item history tracking to blank.

Updates CST item history tracking? in the Customer Sold To table; see the Track item history field on the First Create Sold To Customer Screen.

cst_vat_nbr

alpha

20

Optional. No validation.

Updates VAT number in the Customer Sold To table; see the VAT number field on the Second Create Customer Sold To Screen.

cst_do_not_fax

alpha

1

Optional. No validation.

Y = Do not fax.

N = Fax.

Default: If a request includes a value other than Y or N, the system sets the do not fax flag to blank.

Updates Do Not Fax in the Customer Sold To table; however this field is not currently implemented. See the Do not fax flag on the First Create Sold To Customer Screen.

cst_deliverable

alpha

1

Optional. No validation.

Updates Deliverable Code in the Customer Sold To table. This field is not currently implemented or displayed on any screen.

cst_delivery_type

alpha

1

Optional.

Valid values:

B = Business rate table determines shipping charges.

R = Residential rate table determines shipping charges.

N = No distinction between business and residence.

Default: If an Add request does not include a delivery type, the system:

3. Defaults the delivery code in the Zip/City/State table defined for the postal code in the cst_zip tag.

4. Defaults the value from the Default Delivery Code for New Order Entry Customers (D13) system control value.

Error: If a request includes an invalid delivery type, the system places the message in error in Working with Customer API (WCAI) with the error reason Del code must be B, N, or R.

Updates Delivery code in the Customer Sold To table; see the Delivery code flag on the First Create Sold To Customer Screen.

cst_email_status

alpha

2

Optional. No validation.

O1 = Email; email is the preferred method of correspondence.

O2 = Order-Only Email; use email for order-related correspondence only; generate a document for other correspondence.

O3 = No email; do not use email for any correspondence; generate a document instead.

O4 = Do Not Ask; do not ask the customer for his/her email address. The system does not generate any email correspondence to the customer, even if an email address is specified.

Default: If no cst_email_status is specified here, the cst_email_status from the CustEmail element for the primary email defaults; and if no cst_email_status is specified for the primary email, the system uses the value from the Default Opt In/Opt Out Flag (G97) system control value for both Opt in/out flag settings.

Error: If an Add request contains an invalid Opt in/Opt out setting, the system processes the message and does not place it in error; however, you will need to correct the error in Work with Customers (WCST).

Note: If a Change request contains an invalid Opt in/Opt out setting, the system retains the customer’s existing value.

Updates E-mail status in the Customer Sold To table; see the Opt in/Opt out flag on the First Create Sold To Customer Screen.

cst_account_nbr

numeric

7

Optional.

Validated against the Customer Bill To table; see Creating and Updating Bill-to Customers (WCBT).

Error: If you define an invalid customer bill to number, the system places the message in error in Working with Customer API (WCAI) with the error reason Customer bill to not found.

Updates CBT Account # in the Customer Sold To table; see the Bill to field on the Second Create Customer Sold To Screen.

cst_cust_class

alpha

2

Optional unless the Require Customer Class in OE, WCAT, and WCST (H85) system control value is selected; then, required.

Validated against the Customer Class table; see Setting Up the Customer Class Table (WCCL).

Default: If an Add request does not include a customer class, the system defaults the value from the Default Customer Class in Order Entry (D63) system control value.

Note: If a Change request does not include a customer class and a customer class is not defined for the Default Customer for Customer API (I90), the system sets the customer class to blank. If the Require Customer Class in OE, WCAT, and WCST (H85) system control value is selected, the system will not fail the message; however the system will require a customer class if you select to change the customer in Work with Customers (WCST).

Errors:

• If an Add request does not include a customer class and the Require Customer Class in OE, WCAT, and WCST (H85) system control value is selected, the system places the message in error in Working with Customer API (WCAI) with the error reason Customer Class required.

• If the request includes an invalid customer class, the system places the message in error in Working with Customer API (WCAI) with the error reason Customer class does not exist.

Updates Customer class in the Customer Sold To table; see the Class field on the First Create Sold To Customer Screen.

cst_cust_company

alpha

3

Optional.

Validated against the Customer Company table; see Setting Up the Customer Company Table (WCCO).

Error: If the message includes an invalid customer company, the system places the message in error in Working with Customer API (WCAI) with the error reason Customer Company not found.

Updates Customer company in the Customer Sold To table; see the Parent comp (Parent company) field on the First Create Sold To Customer Screen.

cst_mail_code

alpha

3

Optional.

Default:

• If a request does not include a mail code, the system uses the value passed in the cst_mail_name attribute (either Y or N).

• If an Add request does not include a mail code or mail name, the system defaults the value from the Default Mail Name (D10) system control value.

Validated against the Mail/Call Code table, where it must have a Type of M; see Working with Mail/Call Codes (WMCC). Note: The system does not validate the value against the Mail/Call Code table until the customer has been created or updated in Work with Customers (WCST); however if the message contains another error that you must correct in Working with Customer API (WCAI), the system will validate the mail code field in Work with Customer API (WCAI) and display the error reason Mail/Call Code not found.

Updates Mail code in the Customer Sold To table; see the Mail code flag on the First Create Sold To Customer Screen.

cst_call_code

alpha

3

Optional.

Validated against the Mail/Call Code table, where it must have a Type of C; see Working with Mail/Call Codes (WMCC).

Error: If a request includes a value that does not exist in the Mail/Call Code table for a Type of C, the system places the message in error in Working with Customer API (WCAI) with the error reason Mail/Call Code not found.

Updates Call code in the Customer Sold To table; see the Call code flag on the First Create Sold To Customer Screen.

cst_change_user

alpha

10

Ignored by an Add request.

Optional for a Change request.

Default: If a user ID is not defined in a Change request, CUSTOMERIN defaults, regardless if a changed by user is defined for the Default Customer for Customer API (I90).

Validated against the User table unless CUSTOMERIN defaults; see Working with User Records (WUSR).

Error: If a Change request contains an invalid user ID, the system places the message in error in Working with Customer API (WCAI) with the error reason User does not exist.

Updates Changed by user in the Customer Sold To table. This field is not displayed on the screen.

cst_create_user

alpha

10

Optional for an Add request.

Ignored by a Change request.

Default: If a user ID is not defined in an Add request, CUSTOMERIN defaults.

Validated against the User table unless CUSTOMERIN defaults; see Working with User Records (WUSR).

Error: If an Add request contains an invalid user ID, the system places the message in error in Working with Customer API (WCAI) with the error reason User does not exist.

Updates Created by User in the Customer Sold To table. This field is not displayed on the screen.

cst_currency

alpha

3

Optional.

Validated against the Currency table; see Working with Currency (WCUR).

Error: If the request contains an invalid currency code, the system places the message in error in Working with Customer API (WCAI) with the error reason Currency not found.

Updates Currency code in the Customer Sold To table; see the Currency field on the First Create Sold To Customer Screen.

cust_po_box

alpha

1

Optional. No validation.

Y = The address is a Post Office box.

N = The address is not a Post Office box.

Shipping to a Post Office Box

To ship to a Post Office Box, enter POST OFFICE BOX, POST BOX, or any variation of PO BOX (with or without spaces or non-alphabet characters, such as P.O. BOX), and the box number in the customer’s street address. During order processing, the system validates that the carrier can ship to a post office box (as defined in the Ship Via table).

Example: Enter P.O. Box 9999 in the Street field to indicate delivery to a post office box instead of a home or company address.

Note: If you type POST OFFICE BOX, POST BOX, or any variation of PO BOX in the customer’s street address during order entry or through the Order API, the system automatically selects the PO box field for the customer. However, if you remove this text from the customer’s street address, the system does not automatically unselect the PO box flag.

Note: When you create a customer outside of order processing, you need to select the PO box field manually.

Default: If an Add request does not include a PO box flag or it is invalid, N defaults.

Updates PO Box? in the Customer Sold To table; see the PO box field on the First Create Sold To Customer Screen.

cst_warehouse

numeric

3

Optional.

Validated against the Warehouse table; see Creating and Maintaining Warehouses (WWHS).

Error: If the request contains an invalid warehouse code, the system places the message in error in Working with Customer API (WCAI) with the error reason Warehouse does not exist.

Updates Warehouse in the Customer Warehouse table; see the Restock Warehouse field on the Second Create Customer Sold To Screen.

cst_user_field_1

alpha

10

Optional.

Updates User field 1-4 in the Customer Sold To Extended table; see the User fields (1-4) on the Second Create Customer Sold To Screen.

cst_user_field_2

alpha

10

cst_user_field_3

alpha

10

cst_user_field_4

alpha

10

cst_reserve_

warehouse

numeric

3

Optional.

Validated against the Warehouse table; see Creating and Maintaining Warehouses (WWHS).

Errors:

• If the request contains an invalid warehouse code, the system places the message in error in Working with Customer API (WCAI) with the error reason Warehouse does not exist.

• If the warehouse is not an allocatable warehouse (the Allocatable flag for the warehouse is selected), the system places the message in error in Working with Customer API (WCAI) with the error reason Reserve Warehouse must be an allocatable warehouse.

Updates Reserve Warehouse in the Customer Sold To table; see the Reserve Warehouse field on the Second Create Customer Sold To Screen.

Available in XML version: Version 2.0 in CWSerenade 2.5 or later.

cst_van_route

alpha

4

Optional.

Validated against the Warehouse Van Route table; see Work with Van Routes Screen.

Errors:

• If the request contains a van route that is not valid for the Reserve warehouse, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid Van Route for Reserve Warehouse.

• If the request contains a van route and a Reserve warehouse is not specified, the system places the message in error in Working with Customer API (WCAI) with the error reason Reserve Warehouse required for Van Route.

Updates Reserve Whs Van route in the Customer Sold To table; see the Van Route field on the Second Create Customer Sold To Screen.

Available in XML version: Version 2.0 in CWSerenade 2.5 or later.

cst_van_route_seq

numeric

4

Optional.

Error: If the request contains a van sequence number and a Van route is not specified, the system places the message in error in Working with Customer API (WCAI) with the error reason Van Route required for Van Route Sequence #.

Updates Reserve Whs Van route seq # in the Customer Sold To table; see the Van Sequence # field on the Second Create Customer Sold To Screen.

Available in XML version: Version 2.0 in CWSerenade 2.5 or later.

cst_price_group

alpha

4

Optional.

Validated against the Customer Price Group table; see Working with Customer Price Groups (WCPG).

Note:

• If an Add request contains an invalid price group code, the system does not place the message in error, and instead, leaves the Price Group field blank.

• If a Change request contains an invalid price group code, the system does not place the message in error, and instead, uses the Default Customer for Customer API to determine whether to retain the customer’s existing value.

Updates Price Group in the Customer Sold To table; see the Price group field on the Second Create Customer Sold To Screen.

cst_relate_id

alpha

32

Optional for an Add request.

Required for a Change request if a cst_cust_nbr and cst_interface_cust_nbr are not defined. See Determining the Customer to Update.

Note: If a Relate ID is not included in a Change request, the system retains the existing Relate ID, if any, defined for the customer.

Updates Relate ID in the Customer Sold To table. This field is not displayed on the Customer Sold To screens.

Available in XML version: Version 3.0 in CWSerenade 3.5 or later.

cst_suppress_sales_rep_email

alpha

1

Optional.

Defines whether Outbound Email (CWEmailOut) messages sent to this sold to customer are also sent to the email address of the salesrep assigned to the customer.

Y = Do not send Outbound Email (CWEmailOut) messages sent to the sold to customer to the email address of the salesrep assigned to the customer.

N = Send Outbound Email (CWEmailOut) messages sent to the sold to customer to the email address of the salesrep assigned to the customer.

Default: If this attribute is not included or is invalid, Y defaults.

Note: The system does not use the default customer for this attribute.

Updates Suppress Sales Rep Email Flag in the Customer Sold To table; see the Suppress Sales Rep Email field on the First Create Sold To Customer Screen.

Available in XML version: Version 4.0 in CWSerenade 3.5 or later.

CustEmail

The CustEmail element creates an email address for the customer. This is an optional element, and an Add or Change request can include multiple email addresses.

See Working with Customer Email Addresses for more information.

cst_email_seq

numeric

3

Required in an Add request if the message includes more than one email address; each email address in the message must include a unique sequence number.

Required in a Change request to identify the email address to update; if the sequence number does not match an existing email, the system creates a new email address for the customer.

When creating a new email address, the system assigns the next available sequence number for the customer in the Customer Sold To Email table to the new email address; for example, if the customer does not currently have an email address and the message includes two email addresses with a sequence number of 10 and 20, the system creates the email addresses and assigns them a sequence of 1 and 2.

Updates Sequence # in the Customer Sold To Email table.

cst_email_address

alpha

50

Required.

The email address to add or update. See Email Address Validation.

Errors: If the email address:

• is missing an @ sign, the system places the message in error in Working with Customer API (WCAI) with the error reason Email address is missing the @ sign.

• is missing a period after the @ sign, the system places the message in error in Working with Customer API (WCAI) with the error reason Email address is missing a dot (.) somewhere after the @ sign.

• is missing text before the @ sign, the system places the message in error in Working with Customer API (WCAI) with the error reason Email address is missing a non-blank character before the @ sign.

• is missing text between the @ sign and the period, the system places the message in error in Working with Customer API (WCAI) with the error reason Email address is missing at least one character between the @ sign and the period (.).

• is missing text after the period, the system places the message in error in Working with Customer API (WCAI) with the error reason Email address must have a non-blank character after the ’.’.

Updates Email Address in the Customer Sold To Email Address table; see the Email address field on the Work with Customer Email Address Screen. The email address flagged as primary also updates Email Address in the Customer Sold To table.

cst_email_primary

alpha

1

Optional.

Valid values are:

Y = the cst_email_address should be used as the primary email address.

N = the cst_email_address should not be used as the primary email address.

Note: Any other value is treated as N.

Add requests:

• If one email address is included in the message, regardless of the value in the cst_email_primary attribute, the system flags this email address as the primary email.

• If more than one email address is included in the message, and no email address is flagged as primary, the system flags the first email address as the primary email.

• If more than one email address is included in the message, and only one email address is flagged as primary, the system flags this email address as the primary email.

• If more than one email address is included in the message, and more than one email address is flagged as primary, the system flags the last email address whose cst_email_primary attribute is Y as the primary email.

 

 

 

Change requests:

If the customer does not currently have a primary email address:

• If one email address is included in the message, regardless of the value in the cst_email_primary attribute, the system flags this email address as the primary email.

• If more than one email address is included in the message, and no email address is flagged as primary, the system flags the first email address as the primary email.

• If more than one email address is included in the message, and only one email address is flagged as primary, the system flags this email address as the primary email.

• If more than one email address is included in the message, and more than one email address is flagged as primary, the system flags the last email address whose cst_email_primary attribute is Y as the primary email.

 

 

 

If the customer currently has a primary email address:

• If the message does not include an email address, the system retains the customer’s primary email address, regardless of whether there is data in the Email address field for the Default Customer for Customer API (I90).

• If the message includes one or more email addresses that are not flagged as primary, the system updates the Customer Sold To Email Address table with the new or updated email addresses, but does not update the customer’s primary email.

• If the message includes one email address flagged as primary, the system flags this email address as the primary email and updates the Primary field for the previous primary email address to N.

• If the message includes more than one email address flagged as primary, the system flags the last email address whose cst_email_primary attribute is Y as the primary email and updates the Primary field for the previous primary email address to N.

Updates Primary? in the Customer Sold To Email Address table; see the Primary field on the Work with Customer Email Address Screen.

cst_email_status

alpha

2

Optional.

Valid values:

O1 = Email; email is the preferred method of correspondence.

O2 = Order-Only Email; use email for order-related correspondence only; generate a document for other correspondence.

O3 = No email; do not use email for any correspondence; generate a document instead.

O4 = Do Not Ask; do not ask the customer for his/her email address. The system does not generate any email correspondence to the customer, even if an email address is specified.

Default: If no cst_email_status is specified here, the cst_email_status from the CustSoldTo element defaults; and if no cst_email_status is specified in the CustSoldTo element, the system uses the value from the Default Opt In/Opt Out Flag (G97) system control value for both Opt in/out flag settings.

Errors: If the request contains an invalid email status or a default value was not found, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid sts in email file.

Updates Email Status in the Customer Sold To Email Address table; see the Opt in/out flag on the Work with Customer Email Address Screen.

cst_email_format

alpha

1

Optional. Indicates the customer’s preference regarding email format.

Valid values:

H = HTML

T = Text

Error: If the request contains an invalid email format, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid email format.

Note: If an email format is not defined for the Default Customer for Customer API (I90) and you do not pass an email format for an email address in a Change request, the system updates the email format to blank.

Updates Email Format in the Customer Sold To Email Address table; see the Format field on the Work with Customer Email Address Screen.

cst_display_name

alpha

50

Optional.

Note: If a display name is not defined for the Default Customer for Customer API (I90) and you do not pass a display name for an email address in a Change request, the system updates the display name to blank.

Updates Display Name in the Customer Sold To Email Address table; see the Display name field on the Work with Customer Email Address Screen.

CustUserDefinedField

The CustUserDefinedField element updates a user-defined field for the customer. This is an optional element, and an Add or Change request can include multiple user-defined fields.

The user-defined fields are created through Setting Up User-Defined Fields (WUDF). You can create fields for whatever type of additional information you want to define for a customer.

cst_udf_seq

numeric

3

Required.

The sequence number from the User Defined Fields Detail table that indicates which customer user-defined field to update with this message. The sequence number identifies whether you define text, a number, or date in the user-defined field.

Note:

• If the sequence number does not exist in the User Defined Field Detail table for File code CST, the system ignores the CustUserDefinedField element included in the message.

• If more than one CustUserDefinedField element contains the same sequence number:

Add request: the system processes the user defined fields up to the duplicate sequence number; the duplicate sequence number and any other user defined fields passed in the request after the duplicate are not processed.

Change request: the system updates the user-defined field for the customer using the value in the last CustUserDefinedField element processed for that sequence number.

Updates CSU UDD Seq # in the Cust Sold To User Field table; see the Key field on the Change User Field Screen.

cst_udf_text

alpha

30

Optional if the cst_udf_seq requires text; otherwise ignored.

Updates Text in the Cust Sold To User Field table for the specified user-defined sequence number; see the Text field on the Change User Field Screen.

cst_udf_nbr

numeric

16

Optional if the cst_udf_seq requires a number; otherwise ignored.

Updates Number in the Cust Sold To User Field table for the specified user-defined sequence number; see the Number field on the Change User Field Screen.

cst_udf_date

numeric

7

Optional if the cst_udf_seq requires a date; otherwise ignored.

MMDDYYYY format; converted to CYYMMDD format in database.

Default: If the cst_udf_seq requires a date and you leave the cst_udf_date attribute blank or it is not in MMDDYYYY format, the system defaults the current date.

Updates Date in the Cust Sold To User Field table for the specified user-defined sequence number; see the Date field on the Change User Field Screen.

CustProfile

The profile data, if any, included through this element updates the customer’s demographic data. This is an optional element, and an Add or Change request can include multiple customer profiles.

You can review a customer’s demographic data at the Work with Customer Profile Screen.

You define customer profile categories, such as age, income, or gender, and the valid values for each category through Setting Up Customer Profiles (WPFL).

Available in XML version: 2.0 (release 2.5 of CWSerenade).

cst_profile_code

numeric

3

A profile code to identify demographic data for the customer.

Required to create or update a customer profile record:

• If the profile code does not currently exist for the customer, the system creates a Customer Profile record for the customer.

• If the profile code already exists for the customer, the system updates its value.

Profile codes are defined in and validated against the Profile table; see Setting Up Customer Profiles (WPFL).

Error: If the profile code in the message does not exist in the Profile table, the system does not create a Customer Profile record and instead, creates a Customer Note record for the customer indicating the profile data in error; for example: Invalid Profile Data Code: 999-A, where 999 is the profile code and A is the profile value.

Updates Profile code in the Customer Profile table; see the Profile field on the Work with Customer Profile Screen.

cst_profile_value

alpha

1

The valid value set up for the Profile code.

Required to create or update a customer profile record:

• If the profile code does not currently exist for the customer, the system creates a Customer Profile record for the customer.

• If the profile code already exists for the customer, the system updates its value.

Profile data values are defined in and validated against the Profile Data table; see Setting Up Customer Profiles (WPFL) for setup information.

Error: If the profile value does not exist in the Profile Data table for the specified profile code, the system does not create a Customer Profile record and instead, creates a Customer Note record for the customer indicating the profile data in error; for example: Invalid Profile Data Code: 999-A, where 999 is the profile code and A is the profile value.

Updates PDA Profile data code in the Customer Profile table; see the Data field on the Work with Customer Profile Screen.

CS03_24 OROMS 5.0 2018 OTN