Generic Customer API

Purpose: Use the generic customer API to add or change customers based on XML messages from an external system.

Note: You cannot use the Generic Customer API to delete a customer.

Oracle Retail Customer Engagement customer integration: If you use the Oracle Retail Customer Engagement customer integration, when you create or change a customer through the generic customer API, the new or changed customer information is also sent to Oracle Retail Customer Engagement so that the name, address, email address, phone numbers, and contact permissions in the two systems are synchronized. See the Customer Engagement Customer Integration for more information.

In this chapter:

Customer API Setup

- System Control Values used by the Customer API

- Default Customer for Customer API

- CWCustomer or CWMessageIn Web Service

Determining Whether to Add or Change a Customer

Adding a Customer using the Customer API

- Required Attributes for Add Requests

- Duplicate Checking for Add Requests

- Error Checking for Add Requests

- Send Response for Add Request?

- Fixing Errors and Reprocessing an Add Request

Changing a Customer using the Customer API

- Required Attributes for Change Requests

- Determining the Customer to Update

- Using a Default Customer as a Guideline for Change Requests

- Error Checking for Change Requests

- Send Response for Change Request?

- Fixing Errors and Reprocessing a Change Request

Sample Customer API XML Messages

- Customer Message: Successful Add Request

- Customer Message: Duplicate Add Request

- Customer Message: Failure Add Request

- Customer Message: Successful Change Request

- Customer Message: Failure Change Request

- Customer Message: Failure Delete Request

Inbound Customer Message (CWCustomerIn)

Outbound Customer Response Message (CWCustomerOut)

For more information: See Working with Customer API (WCAI) to review, work with, delete, or resubmit customer API requests that are in error.

Customer API Setup

Before you can use the Generic Customer API, you must complete the necessary setup.

System Control Values used by the Customer API

Default Customer for Customer API

Message Log used by the Customer API

CWCustomer or CWMessageIn Web Service

System Control Values used by the Customer API

System Control Value

Description

Assign Alternate Customer # (I88)

Indicates whether the system should automatically assign an alternate customer number when creating a customer through the customer API or any other means. However, if there is a cst_interface_cust_nbr specified in the Add request, the system does not assign a different alternate customer number, but uses the specified number instead.

Default Customer for Customer API (I90)

Indicates the customer to use as a guideline to determine which fields can be cleared if they are not specified in a Change request.

Perform Address Standardization in Customer API (I99)

Indicates whether to use EDQ to standardize the customer’s address before processing an Add or Change request through the Customer API. See Experian Data Quality (EDQ) Address Validate API for an overview and required setup.

Validate Prefix (I27)

If this system control value is selected, the system validates the prefix code included in the request against the Prefix table; see Working with Prefix Codes (WPFX).

Require Customer Class in OE, WCAT, and WCST (H85)

If this system control value is selected, a customer class must be included in an Add request (or use the default defined in the Default Customer Class in Order Entry (D63) system control value) or the system will place the message in error.

Bypass Customer API Edit (L93)

If this system control value is selected, customer API transactions bypass validation when creating or changing a customer with an original source code of XSTORE.

The following system control values provide default values to apply to an Inbound Customer Message (CWCustomerIn).

Default Country for Customer Address (B17) system control value

If an Add request does not include a country, the system defaults the country code from this system control value.

Default Customer Class in Order Entry (D63)

If an Add request does not include a customer class, the system defaults the customer class from this system control value.

Default Mail Name (D10)

• If an Add request does not include a mail name or it is invalid, the system defaults the mail name from this system control value.

• If an Add request does not include a mail code or mail name, the system defaults the mail code from this 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 mail name from this system control value.

Default Rent Name (D11)

• If an Add request does not include a rent name or it is invalid, the system defaults the rent name from this 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 rent name from this system control value.

Default Associate Code (D09)

If an Add request does not include an associate flag, the system defaults the associate flag from this system control value.

Default Item History Tracking (B18)

If an Add request does not include an item history tracking setting, the system defaults the setting from this system control value; if this system control value is blank, the system sets item history tracking to blank.

Default Delivery Code for New Order Entry Customers (D13)

If an Add request does not include a delivery type, the system defaults the delivery code from:

1. The Zip/City/State record for the postal code in the cst_zip tag.

2. The Default Delivery Code for New Order Entry Customers (D13) system control value.

Default Opt In/Opt Out Flag (G97)

If an Add request does not include an email status, the system defaults the Opt in/out setting from this system control value.

Default Customer for Customer API

Use Creating and Updating Sold-to Customers (WCST) to configure the customer defined as the Default Customer for Customer API (I90). The default customer determines which fields can be cleared if they are not specified in a Change request.

For each field that is not provided in the Inbound Customer Message (CWCustomerIn), the Customer API checks the corresponding field for the default customer.

• If that field contains any data in the default customer record, then the Customer API does not clear the information in that field for the customer being updated. Example: The default customer has data in the home phone number field. The Customer API receives a change request through the CWCustomerIn message. No home phone number is specified in the CWCustomerIn message, and the specified customer currently has a home phone number on record. The Customer API does not clear (blank out) the customer’s home phone number.

• If that field does not contain data in the default customer record, then the Customer API clears that field when updating the customer. Example: The default customer does not have data in the home phone number field. The Customer API receives a change request through the CWCustomerIn message. No home phone number is specified in the CWCustomerIn message, and the specified customer currently has a home phone number on record. The Customer API clears (blanks out) the customer’s home phone number.

Note: It does not matter what the data is in the corresponding field for the default customer record; the process simply checks to see whether there is any data.

Important: While defining a default customer is not required for the Generic Customer API, create it to avoid errors when processing a Change CWCustomerIn request.

For more information: See the Default Customer for Customer API (I90) for a discussion.

Message Log used by the Customer API

Order Management System writes the Inbound Customer Message (CWCustomerIn) to the Application Log if its Logging Level is set to INFO or lower.

CWCustomer or CWMessageIn Web Service

You can use the CWCustomer web service or the CWMessageIn web service to process CWCustomerIn XML messages received from an external system and to send the CWCustomerOut XML message back to the external system. With either web service the type in the Inbound Customer Message (CWCustomerIn) must be CWCustomerIn.

Web service authentication? Use the Working with Web Service Authentication (WWSA) menu option to define a valid user for basic web service authentication. If you use Oracle Identity Cloud Service for password authentication, in addition to creating the web service authentication user in Work with Web Service Authentication (WWSA), you must also create a corresponding user profile in Oracle Identity Cloud Service and assign the user to the corresponding web service role defined for the Order Management application.

CWCustomer Web Service

CWMessageIn Web Service

CWCustomer Web Service

The CWCustomer web service allows an external system to post the CWCustomerIn XML message directly to Order Management System and receive responses without the need of the CUSTOMR_IN job in Working with Integration Layer Processes (IJCT) or any queues.

If you are using the CWCustomerIn RESTful web service: You POST inbound CWCustomerIn messages to the web service’s URI, or endpoint, of the RESTful service. The individual URL for the CWCustomerIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/SerenadeREST/CWCustomerIn, where server:port identifies the application server where the RESTful service is located and CWCustomerIn is the name of the web service to call.

If you are using the CWCustomerIn SOAP-based web service: The endpoint specified in the CWCustomerIn.wsdl file is where you need to post messages in order for the CWCustomerIn web service to process them. The endpoint is typically set to http://server:port/CWDirectCPService/services/CWCustomer, where server:port identifies the application server where the wsdl is located and CWCustomer is the name of the web service to call.

The CWCustomerIn SOAP-based web service requires that inbound messages be embedded in SOAP envelope tags. A sample XML message embedded in a SOAP envelope is presented below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://dom.w3c.org">

<soapenv:Header />

<soapenv:Body>

<dom:performAction type="xsd:string">

<![CDATA[

 

<Message source="external" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="2" cst_send_response="Y" cst_duplicate="Y" cst_cust_nbr="14442" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="2Carnie" cst_minitial="" cst_lname="Loll" cst_suffix="" cst_company_name="" cst_street_addr="21 Ball Street" cst_addr_line_2="" cst_addr_line_3="" cst_apt="" cst_city="Westborough" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="5085550100" cst_day_ext="1234" cst_eve_phone="5085550101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="N" cst_rent_name="N" cst_seed_name="N" cst_rent_email="N" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="" cst_curr_mail_type="" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="N" cst_cancel_bo="N" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="" cst_pop_window_2="" cst_item_hist_tracking="2" cst_do_not_fax="N" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_currency="USD" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="1tkwan@thisone.com" cst_email_primary="Y" cst_email_status="O1" cst_display_name="1Tyne Kwan"/>

<CustEmail cst_email_seq="2" cst_email_address="2tkwan@example.com" cst_email_primary="N" cst_email_status="O2" cst_display_name="2Tyne Kwan"/>

<CustEmail cst_email_seq="3" cst_email_address="3tkwan@example.com" cst_email_primary="N" cst_email_status="O3" cst_display_name="3Tyne Kwan"/>

</CustEmails>

</CustSoldTo>

</Message>

 

]]>

</dom:performAction>

</soapenv:Body>

</soapenv:Envelope>

CWMessageIn Web Service

You can use the CWMessageIn Web Service to route messages for the Generic Customer API if you prefer to use a single endpoint for all messages rather than using the separate endpoint specified for the CWCustomerIn message.

The CUSTOMR_IN integration layer process can remain inactive and a queue is not required if the target is CUSTCRT_IN in the XML message.

If you are using the CWMessageIn RESTful web service: You POST inbound CWMessageIn messages to the web service’s URI, or endpoint, of the RESTful service. The individual URL for the CWMessageIn RESTful service uses the following format: http://server:port/SerenadeSeam/sxrs/application/CWMessageIn, where server:port identifies the application server where the RESTful service is located and CWMessageIn is the name of the web service to call.

If you are using the CWMessageIn SOAP-based web service: The endpoint specified in the CWMessageIn.wsdl file is where you need to post messages in order for the CWMessageIn web service to process them. The endpoint is typically set to http://server:port/CWDirectCPService/services/CWMessageIn, where server:port identifies the application server where the wsdl is located and CWMessageIn is the name of the web service to call.

The CWMessageIn SOAP-based web service requires that inbound messages be embedded in SOAP envelope tags. A sample XML message embedded in a SOAP envelope is presented below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://dom.w3c.org">

<soapenv:Header />

<soapenv:Body>

<dom:performAction type="xsd:string">

<![CDATA[

 

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="2" cst_send_response="Y" cst_duplicate="Y" cst_cust_nbr="14442" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="Mary" cst_minitial="" cst_lname="Johnson" cst_suffix="" cst_company_name="" cst_street_addr="21 Walnut Street" cst_addr_line_2="" cst_addr_line_3="" cst_apt="" cst_city="Westborough" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="5085550100" cst_day_ext="1234" cst_eve_phone="5085550101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="N" cst_rent_name="N" cst_seed_name="N" cst_rent_email="N" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="" cst_curr_mail_type="" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="N" cst_cancel_bo="N" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="" cst_pop_window_2="" cst_item_hist_tracking="2" cst_do_not_fax="N" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_currency="USD" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="1tkwan@example.com" cst_email_primary="Y" cst_email_status="O1" cst_display_name="1Tyne Kwan"/>

<CustEmail cst_email_seq="2" cst_email_address="2tkwan@example.com" cst_email_primary="N" cst_email_status="O2" cst_display_name="2Tyne Kwan"/>

<CustEmail cst_email_seq="3" cst_email_address="3tkwan@example.com" cst_email_primary="N" cst_email_status="O3" cst_display_name="3Tyne Kwan"/>

</CustEmails>

</CustSoldTo>

</Message>

 

]]>

</dom:performAction>

</soapenv:Body>

</soapenv:Envelope>

Determining Whether to Add or Change a Customer

The system uses the following logic to determine whether to add a new customer or change an existing one when it receives an Inbound Customer Message (CWCustomerIn).

Note: The cst_action_type attribute indicates whether the Inbound Customer Message (CWCustomerIn) is an Add or Change request; however, this attribute is informational only and Order Management System uses the customer information in the message to determine whether to create a new customer or change an existing one.

The system considers an Inbound Customer Message (CWCustomerIn) an Add request if:

• the message does not include a cst_cust_nbr (sold to customer number), cst_interface_cust_nbr (alternate customer number), or cst_relate_id (Oracle Retail Customer Engagement ID).

• the message includes a cst_relate_id (Oracle Retail Customer Engagement ID) but no cst_cust_nbr (sold to customer number) and the cst_relate_id does not match an existing customer.

• the message includes a cst_interface_cust_nbr (alternate customer number) but no cst_cust_nbr (sold to customer number) or cst_relate_id (Oracle Retail Customer Engagement ID) and the cst_interface_cust_nbr does not match an existing customer based on the records in the Customer Sold To Xref table.

See Adding a Customer using the Customer API for processing details. Note: After determining an Inbound Customer Message (CWCustomerIn) is an Add request, the system determines whether the customer information in the Add request matches an existing customer, and based on the cst_duplicate flag in the Add request, may update the existing customer; see Duplicate Checking for Add Requests.

If the Inbound Customer Message (CWCustomerIn) does not meet the requirements for an Add request, the system considers the message a Change request; see Changing a Customer using the Customer API for processing details.

Adding a Customer using the Customer API

When Order Management System determines the Inbound Customer Message (CWCustomerIn) is an Add request (see Determining Whether to Add or Change a Customer), the system creates the customer based on the information provided in the message.

Required Attributes for Add Requests

Duplicate Checking for Add Requests

- Duplicate Check S: If Single Match Found, Update Customer

- Duplicate Check A: If Multiple Matches Found, Update Best Match Customer

- Duplicate Check Y: If Any Match Found, Do Not Update Customer

- Duplicate Check N: Do Not Perform Duplicate Checking

Error Checking for Add Requests

Send Response for Add Request?

Fixing Errors and Reprocessing an Add Request

Bypass validation? If the Bypass Customer API Edit (L93) system control value is selected, customer API transactions bypass validation when creating or changing a customer with an original source code of XSTORE. For Add requests, the system bypasses all edits except Duplicate Checking for Add Requests.

Required Attributes for Add Requests

To create a customer, at minimum you must define the following attributes in the Inbound Customer Message (CWCustomerIn):

type = CWCustomerIn

cst_ company

cst_lname or cst_company_name

cst_street_addr

cst_city

cst_state if the cst_country requires a state; otherwise, optional

cst_zip if the cst_country requires a postal code; otherwise, optional

cst_country unless a default is defined in the Default Country for Customer Address (B17) system control value

cst_cust_class if the Require Customer Class in OE, WCAT, and WCST (H85) system control value is selected; otherwise, optional

cst_email_status unless a default is defined in the Default Opt In/Opt Out Flag (G97) system control value

EDQ address interface: The system first submits a customer address to EDQ for address standardization if the Perform Address Standardization in Customer API (I99) system control value is selected and you use the Experian Data Quality (EDQ) Address Validate API. The address standardization is applied before any duplicate checking or other edits, and takes place only if there is a single matching address (the EDQ Address Response Match Level is Verified). See Experian Data Quality (EDQ) Address Validate API for an overview and required setup.

Duplicate Checking for Add Requests

Before creating a customer, the system determines whether the customer information in an Add request matches an existing customer.

Types of duplicate checking: The cst_duplicate flag defines how the system checks for duplicates:

Duplicate Check S: If Single Match Found, Update Customer

Duplicate Check A: If Multiple Matches Found, Update Best Match Customer

Duplicate Check Y: If Any Match Found, Do Not Update Customer

Duplicate Check N: Do Not Perform Duplicate Checking

Duplicate Check S: If Single Match Found, Update Customer

The system performs the following logic when the cst_duplicate flag is set to S.

1.

Check for duplicates: The system determines whether the customer information specified in the Add request matches an existing customer using:

Match code: The system checks for duplicates using the match code. If there are no existing customers with the same match code as the customer information in the Add request, the system does not consider the Add request a duplicate and proceeds to check the message for errors (see Error Checking for Add Requests); otherwise,

Remote Order values: If there are existing customers with the same match code as the customer information in the Add request, the system uses the Remote Order Values (F70) as a guideline to check for duplicates. For example, if these values indicate that the customer’s first name does not need to be an exact match, the system does not consider this type of customer information to constitute a match, and continues to the next step. Note: When matching on street address or address line 2, the system does not include the roadway descriptive in the match if it is the last word in the address line; see Exact Match Required on Street Address for Remote Orders (F73) and Exact Match Required on Address Line 2 for Remote Orders (F75) for a list of road descriptives the system excludes.

2.

Single match found? If a single duplicate match is found, the system updates the existing customer with the information in the Inbound Customer Message (CWCustomerIn). See Changing a Customer using the Customer API.

If the cst_send_response flag in the request is set to:

Y: the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Success. The updated customer information is provided in the CustSoldTo element. See Sample Customer API XML Messages.

N: the system does not send the CWCustomerOut message.

3.

Multiple matches found? If the system finds multiple duplicate existing customers based on the match code and Remote Order Values (F70), the system does not create or update any customers.

If the cst_send_response flag in the request is set to:

Y: the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Duplicate. The first duplicate customer record that the system found is provided in the CustSoldTo element, and any additional duplicate customers are provided in a Duplicate element. See Sample Customer API XML Messages.

N: the system does not send the CWCustomerOut message.

Duplicate Check S Example: The Inbound Customer Message (CWCustomerIn) contains the following customer information:

Julie Roberts

1234 Sample Street

Westborough, MA 01581

Email jroberts@example.com

508-555-0100

 

Order Management System finds a single customer with the same match code and an exact match based on the Remote Order Values (F70).

Customer 13962:

Juliette Roberts

1234 Sample Street

Westborough, MA 01581

Email jroberts@example2.com

508-555-0101

 

Because a single match is found and the cst_duplicate flag is set to S, the system validates the information in the Inbound Customer Message (CWCustomerIn) and updates customer 13962 if the validation is successful. If the cst_send_response flag in the request is set to Y, the system sends the updated customer information in the Outbound Customer Response Message (CWCustomerOut).

Duplicate Check S Flowchart:

Duplicate Check A: If Multiple Matches Found, Update Best Match Customer

The system performs the following logic when the cst_duplicate flag is set to A.

1.

Check for duplicates: The system determines whether the customer information specified in the Add request matches an existing customer using:

Match code: The system checks for duplicates using the match code. If there are no existing customers with the same match code as the customer information in the Add request, the system does not consider the Add request a duplicate and proceeds to check the message for errors (see Error Checking for Add Requests); otherwise,

Remote Order values: If there are existing customers with the same match code as the customer information in the Add request, the system uses the Remote Order Values (F70) as a guideline to check for duplicates. For example, if these values indicate that the customer’s first name does not need to be an exact match, the system does not consider this type of customer information to constitute a match, and continues to the next step.

2.

Single match found? If a single duplicate match is found, the system updates the existing customer with the information in the Inbound Customer Message (CWCustomerIn). See Changing a Customer using the Customer API.

If the cst_send_response flag in the request is set to:

Y: the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Success. The updated customer information is provided in the CustSoldTo element. See Sample Customer API XML Messages.

N: the system does not send the CWCustomerOut message.

3.

Multiple matches found? If the system finds multiple duplicate existing customers based on the match code and Remote Order Values (F70), the system updates the first customer match (this is the customer with the highest customer number) with the information in the Inbound Customer Message (CWCustomerIn). See Changing a Customer using the Customer API.

If the cst_send_response flag in the request is set to:

Y: the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Success. The updated customer information is provided in the CustSoldTo element. See Sample Customer API XML Messages.

N: the system does not send the CWCustomerOut message.

Duplicate Check A Example: The Inbound Customer Message (CWCustomerIn) contains the following customer information:

Robert Smith

1234 Sample Street

Westborough, MA 01581

Email rsmith@example.com

508-555-0100

 

Order Management System finds multiple customers with the same match code and exact match based on the Remote Order Values (F70). The first customer match (the customer with the highest customer number) is customer 14551:

Bob Smith

1234 Sample Street

Westborough, MA 01581

Email rsmith@example.com

508-555-0100

 

Because customer 14551 has been identified as the best match and the cst_duplicate flag is set to A, the system validates the information in the Inbound Customer Message (CWCustomerIn) and updates customer 14551 if the validation is successful. If the cst_send_response flag in the request is set to Y, the system sends the updated customer information in the Outbound Customer Response Message (CWCustomerOut).

Duplicate Check A Flowchart:

Duplicate Check Y: If Any Match Found, Do Not Update Customer

The system performs the following logic when the cst_duplicate flag is set to Y.

1.

Check for duplicates: The system determines whether the customer information specified in the Add request matches an existing customer using:

Match code: The system checks for duplicates using the match code. If there are no existing customers with the same match code as the customer information in the Add request, the system does not consider the Add request a duplicate and proceeds to check the message for errors (see Error Checking for Add Requests); otherwise,

Remote Order values: If there are existing customers with the same match code as the customer information in the Add request, the system uses the Remote Order Values (F70) as a guideline to check for duplicates. For example, if these values indicate that the customer’s first name does not need to be an exact match, the system does not consider this type of customer information to constitute a match, and continues to the next step.

2.

Duplicates found? If the system finds one or more duplicate existing customers based on the match code and Remote Order Values (F70), the system does not create or update any customers.

If the cst_send_response flag in the request is set to:

Y: the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Duplicate. The first duplicate customer record (this is the duplicate with the highest customer number) that the system found is provided in the CustSoldTo element, and any additional duplicate customers are provided in a Duplicate element. See Sample Customer API XML Messages.

N: the system does not send the CWCustomerOut message.

Duplicate Check Y Flowchart:

Duplicate Check N: Do Not Perform Duplicate Checking

If the cst_duplicate flag is N or any other value, the system does not perform any duplicate checking based on name and address.

Error Checking for Add Requests

After completing any duplicate checking, or if the cst_duplicate setting in the Add request is N, the system determines if the Add request contains any errors:

No errors: The system creates the customer. If the cst_send_response flag in the request is Y, the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Success. The response indicates the customer name, address, and customer number created. See Sample Customer API XML Messages.

Errors: If any of the required values for a customer are missing or invalid, the system places the message in error in Working with Customer API (WCAI). If the cst_send_response flag in the request is Y, the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Failure. See Sample Customer API XML Messages.

For more information: See the Inbound Customer Message (CWCustomerIn) for complete information on field edits and possible errors.

Error Checking for Add Requests:

Send Response for Add Request?

If the cst_send_response flag is Y, the system generates an Outbound Customer Response Message (CWCustomerOut) such as the following:

Customer Message: Successful Add Request if the add request was successful

Customer Message: Duplicate Add Request if the add request failed duplicate checking

Customer Message: Failure Add Request if the add request failed

Fixing Errors and Reprocessing an Add Request

You can use the Change Customer API Screen in Working with Customer API (WCAI) to identify and correct errors related to an Add request. When you advance to the Change Customer API screen and select OK, the system indicates any errors in the Add request. You can then correct the error and reprocess the request to create the customer, or delete the request if you do not want to create the new customer.

Changing a Customer using the Customer API

When Order Management System determines the Inbound Customer Message (CWCustomerIn) is a Change request (see Determining Whether to Add or Change a Customer), the system updates the customer based on the information provided in the message.

Required Attributes for Change Requests

Determining the Customer to Update

Using a Default Customer as a Guideline for Change Requests

Error Checking for Change Requests

Send Response for Change Request?

Fixing Errors and Reprocessing a Change Request

Bypass validation? If the Bypass Customer API Edit (L93) system control value is selected, customer API transactions bypass validation when creating or changing a customer with an original source code of XSTORE. For Change requests, the system bypasses all edits except Customer Does not Exist.

Required Attributes for Change Requests

To change a customer, at minimum you must define the following attributes in the Inbound Customer Message (CWCustomerIn):

type = CWCustomerIn

cst_cust_nbr, cst_relate_id, OR cst_interface_cust_nbr; see Determining the Customer to Update

• If a Default Customer for Customer API (I90) is defined and you do not define a value for an attribute, the system uses this customer to determine whether to update the field for the customer to blank or to retain the customer’s existing value. See Using a Default Customer as a Guideline for Change Requests.

If a Default Customer for Customer API (I90) is not defined, you must also define the following attributes:

- cst_ company

- cst_lname or cst_company_name

- cst_street_addr

- cst_city

- cst_state if the cst_country requires a state; otherwise, optional

- cst_zip if the cst_country requires a postal code; otherwise, optional

- cst_country unless a default is defined in the Default Country for Customer Address (B17) system control value

- cst_cust_class if the Require Customer Class in OE, WCAT, and WCST (H85) system control value is selected; otherwise, optional

- cst_email_status unless a default is defined in the Default Opt In/Opt Out Flag (G97) system control value

Experian Data Quality (EDQ) address interface: The system first submits a customer address to EDQ for address standardization if the Perform Address Standardization in Customer API (I99) system control value is selected and you use the Experian Data Quality (EDQ) Address Validate API. The address standardization is applied before any duplicate checking or other edits, and takes place only if there is a single matching address (the EDQ Address Response Match Level is Verified). See Experian Data Quality (EDQ) Address Validate API for an overview and required setup.

Determining the Customer to Update

The system uses the cst_cust_nbr, cst_interface_cust_nbr, and cst_relate_id included in the Inbound Customer Message (CWCustomerIn) to determine the customer to update.

If the message includes a customer number only: If the message includes a cst_cust_nbr but no cst_interface_cust_nbr or cst_relate_id:

Match: If the cst_cust_nbr matches an existing customer, Order Management System selects this customer for update.

No match: If the cst_cust_nbr does not match an existing customer, Order Management System places the request in E (error) status. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the message includes a customer number and alternate customer number: If the message includes a cst_cust_nbr and cst_interface_cust_nbr but no cst_relate_id:

Match: If the cst_cust_nbr matches an existing customer, Order Management System selects this customer for update and adds the cst_interface_cust_nbr to the Customer Sold To Xref table if it does not already exist.

No match: If the cst_cust_nbr does not match an existing customer, Order Management System places the request in E (error) status. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the message includes a customer number and Relate ID: If the message includes a cst_cust_nbr and cst_relate_id, the system uses the following logic.

Does matching Order Management System customer have Relate ID?

Do other Order Management System customers have Relate ID?

Results:

If the cst_cust_nbr matches an existing customer, but the customer is not associated with the specified cst_relate_id...

and other customers are not associated with the specified cst_relate_id...

Order Management System selects this customer for update and updates the Relate ID in the Customer Sold To table with the cst_relate_id included in the message. If the message also contains a cst_interface_cust_nbr, the system adds the cst_interface_cust_nbr to the Customer Sold To Xref table if it does not already exist.

and one or more other customers are associated with the specified cst_relate_id...

Order Management System places the message in E Error status for the reason Relate ID matched multiple customers. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the cst_cust_nbr matches an existing customer, and the customer is associated with the specified cst_relate_id...

regardless of whether other customers are associated with the specified cst_relate_id...

Order Management System selects this customer for update and retains the Relate ID in the Customer Sold To table since it matches the cst_relate_id included in the message. If the message also contains a cst_interface_cust_nbr, the system adds the cst_interface_cust_nbr to the Customer Sold To Xref table if it does not already exist.

If the cst_cust_nbr matches an existing customer, but the customer’s Relate ID does not match the specified cst_relate_id...

and other customers are not associated with the specified cst_relate_id...

Order Management System selects this customer for update and updates the Relate ID in the Customer Sold To table with the cst_relate_id included in the message. If the message also contains a cst_interface_cust_nbr, the system adds the cst_interface_cust_nbr to the Customer Sold To Xref table if it does not already exist.

and other customers are associated with the specified cst_relate_id...

Order Management System places the message in E Error status for the reason Relate ID matched multiple customers. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the cst_cust_nbr does not match an existing customer...

regardless of whether other customers are associated with the specified cst_relate_id...

Order Management System places the request in E (error) status. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the message includes a Relate ID and no customer number: If the message includes a cst_relate_id but no cst_cust_nbr:

No match: If the cst_relate_id does not match an existing customer, Order Management System considers the message an Add request; see Adding a Customer using the Customer API.

Single match: If the cst_relate_id matches a single customer, Order Management System selects this customer for update. If the message also contains a cst_interface_cust_nbr, the system adds the cst_interface_cust_nbr to the Customer Sold To Xref table if it does not already exist.

Multiple match: If the cst_relate_id matches more than one customer, Order Management System places the request in E Error status for the reason Relate ID matched multiple customers. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

If the message includes an alternate customer number and no customer number or Relate ID: If the message includes a cst_interface_cust_nbr but no cst_cust_nbr or cst_relate_id:

No match: If the cst_interface_cust_nbr does not match an existing customer based on the records in the Customer Sold To Xref table, Order Management System considers the message an Add request; see Adding a Customer using the Customer API.

Single match: If the cst_interface_cust_nbr matches a single customer based on the records in the Customer Sold To Xref table, Order Management System selects this customer for update.

Multiple match: If the cst_interface_cust_nbr matches multiple customers based on the records in the Customer Sold To Xref table, Order Management System places the request in E Error status for the reason Alternate customer # matched multiple customers. You cannot correct this type of error through Working with Customer API (WCAI); you must delete the message in error and either resend the message or manually update the customer in Creating and Updating Sold-to Customers (WCST).

Note: Regardless of the setting of the Display Alternate Customer Cross Reference Window (I84) system control value, the system attempts to match the cst_interface_cust_nbr to any of the alternate customer numbers stored in the Customer Sold To Xref table and does not try to match the cst_interface_cust_nbr to the alternate customer number stored in the Customer Sold To table.

For more information: See Working with Alternate Customer Number Cross-References for more information on the Customer Sold To Xref table.

Using a Default Customer as a Guideline for Change Requests

The system uses the customer defined in the Default Customer for Customer API (I90) system control value to identify which fields can be cleared if they are not specified in a Change request.

For each field that is not provided in the Inbound Customer Message (CWCustomerIn), the Customer API checks the corresponding field for the default customer.

• If that field contains any data in the default customer record, then the Customer API does not clear the information in that field for the customer being updated.

• If that field does not contain data in the default customer record, then the Customer API clears that field when updating the customer.

Note: It does not matter what the data is in the corresponding field for the default customer record; the process simply checks to see whether there is any data.

Default Customer Examples:

If the Default Customer has:

and the Change Request:

The system:

The first, middle and last name populated

does not include a first, middle or last name

Retains the first, middle, and last name of the customer being updated in the Change request

includes a last name but no first or middle name

Updates the last name and retains the first and middle name of the customer being updated in the Change request

The last name populated, but the first and middle name are blank

does not include a first, middle or last name

Retains the last name and clears the first and middle name of the customer being updated in the Change request

includes a last name but no first or middle name

Updates the last name and clears the first and middle name of the customer being updated in the Change request

For more information: See the Default Customer for Customer API (I90) for a discussion.

Error Checking for Change Requests

After Determining the Customer to Update, the system determines if the Change request contains any errors:

No errors: The system updates the customer. If the cst_send_response flag in the request is Y, the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Success. The response indicates the customer name, address, and customer number updated. See Sample Customer API XML Messages.

Errors: If any of the required values for a customer are missing or invalid, the system places the message in error in Working with Customer API (WCAI). If the cst_send_response flag in the request is Y, the system generates the Outbound Customer Response Message (CWCustomerOut) with a cst_action_result of Failure. See Sample Customer API XML Messages.

Note: A Change request does not normally go into error status because of missing information, because the use of the Default Customer for Customer API (I90) usually prevents essential information from being cleared from an existing customer record.

For more information: See the Inbound Customer Message (CWCustomerIn) for complete information on field edits and possible errors.

Error Checking for Change Requests:

Send Response for Change Request?

If the cst_send_response flag is Y, the system generates an Outbound Customer Response Message (CWCustomerOut) such as the following:

Customer Message: Successful Change Request if the change request was successful

Customer Message: Failure Change Request if the change request failed

Fixing Errors and Reprocessing a Change Request

You can use the Change Customer API Screen in Working with Customer API (WCAI) to identify and correct errors related to a Change request. When you advance to the Change Customer API screen and select OK, the system indicates any errors in the Change request. You can then correct the error and reprocess the request to update the customer, or delete the request if you do not want to process the update.

Sample Customer API XML Messages

Customer Message: Successful Add Request

Customer Message: Duplicate Add Request

Customer Message: Failure Add Request

Customer Message: Successful Change Request

Customer Message: Failure Change Request

Customer Message: Failure Delete Request

Customer Message: Successful Add Request

A sample CWCustomerIn Add request that successfully creates a customer is presented below. See Adding a Customer using the Customer API for more information.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="K" cst_send_response="Y" cst_duplicate="N" cst_cust_nbr="" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="Helen" cst_minitial="" cst_lname="Smith" cst_suffix="" cst_company_name="" cst_street_addr="10 Walnut Street" cst_addr_line_2="Line 2" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Westborough" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0102" cst_eve_ext="5678" cst_fax_phone="5085550103" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="K" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="10112009" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="kbrown@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1Tyne Kwan" />

<CustEmail cst_email_seq="2" cst_email_address="ssullivan@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2Tyne Kwan" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="" cst_udf_text="" cst_udf_nbr="" cst_udf_date="" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="09:47:42">

<CustSoldTo cst_company="7" cst_cust_nbr="139" cst_action_type="A" cst_action_result="Success" cst_fname="HELEN" cst_lname="SMITH" cst_street_name="10 SULLIVAN STREET" cst_addr_line_2="LINE 2" cst_city="WESTBOROUGH" cst_state="MA" cst_zip="01581" cst_country="USA" cst_match_code="HELSMI10S015" cst_ghost="N" />

</Message>

Customer Message: Duplicate Add Request

A sample CWCustomerIn Add request where the system finds a duplicate customer is presented below. The cst_duplicate tag defines how the system performs duplicate checking; see Duplicate Checking for Add Requests for more information.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="K" cst_send_response="Y" cst_duplicate="S" cst_cust_nbr="" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="Hellen" cst_minitial="" cst_lname="Smith" cst_suffix="" cst_company_name="" cst_street_addr="10 Walnut St" cst_addr_line_2="" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Westborough" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0102" cst_eve_ext="5678" cst_fax_phone="5085550103" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="10112009" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="kbrown@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1HSmith" />

<CustEmail cst_email_seq="2" cst_email_address="ssullivan@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2HSmith" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="" cst_udf_text="" cst_udf_nbr="" cst_udf_date="" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="10:04:46">

<CustSoldTo cst_company="7" cst_cust_nbr="141" cst_action_type="DUP" cst_action_result="Duplicate" cst_fname="HELLEN" cst_lname="SMITH" cst_street_name="10 SULLIVAN ST" cst_city="WESTBOROUGH" cst_state="MA" cst_zip="01581" cst_country="USA" cst_match_code="HELSMI10S015" cst_ghost="N">

<Duplicates>

<Duplicate dup_cust_nbr="140" dup_fname="HELEN" dup_lname="SMITH" dup_street_name="10 SULLIVAN ST" dup_city="WESTBOROUGH" dup_state="MA" dup_zip="01581" dup_country="USA" dup_match_code="HELSMI10S015" dup_ghost="N" />

</Duplicates>

</CustSoldTo>

</Message>

Customer Message: Failure Add Request

A sample CWCustomerIn Add request that is placed in error in Working with Customer API (WCAI) is presented below. See Adding a Customer using the Customer API for more information.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="" cst_send_response="Y" cst_duplicate="S" cst_cust_nbr="" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="Helen" cst_minitial="R" cst_lname="Smith" cst_suffix="" cst_company_name="" cst_street_addr="10 Rose Street" cst_addr_line_2="" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Westboro" cst_state="MASS" cst_zip="01581" cst_country="US" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="kbrown@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1H Smith" />

<CustEmail cst_email_seq="2" cst_email_address="aluna@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2H Smith" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="1" cst_udf_text="date" cst_udf_nbr="101112" cst_udf_date="101112" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="10:12:43">

<CustSoldTo cst_company="7" cst_action_type="A" cst_action_result="Failure" />

</Message>

Customer Message: Successful Change Request

A sample CWCustomerIn Change request that successfully updates a customer is presented below. See Changing a Customer using the Customer API for more information.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="" cst_send_response="Y" cst_duplicate="S" cst_cust_nbr="111" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="James" cst_minitial="R" cst_lname="Jones" cst_suffix="" cst_company_name="" cst_street_addr="10 River St" cst_addr_line_2="" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Templeton" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="jamesJ@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1J Jones" />

<CustEmail cst_email_seq="2" cst_email_address="jjones@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2J Jones" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="1" cst_udf_text="date" cst_udf_nbr="101112" cst_udf_date="101112" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="10:25:29">

<CustSoldTo cst_company="7" cst_cust_nbr="111" cst_action_type="C" cst_action_result="Success" cst_prefix="MR." cst_fname="JAMES" cst_minitial="R" cst_lname="JONES cst_street_name="10 RIVER ST" cst_city="TEMPLETON" cst_state="MA" cst_zip="01581" cst_country="USA" cst_match_code="JAMCRO10D015" cst_ghost="N" />

</Message>

Customer Message: Failure Change Request

A sample CWCustomerIn Change request that is placed in error in Working with Customer API (WCAI) is presented below. See Changing a Customer using the Customer API for more information.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="" cst_send_response="Y" cst_duplicate="S" cst_cust_nbr="111" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="James" cst_minitial="R" cst_lname="Jones" cst_suffix="" cst_company_name="" cst_street_addr="10 River St" cst_addr_line_2="" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Templeton" cst_state="MA" cst_zip="01581" cst_country="US" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="jjones@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1J Jones" />

<CustEmail cst_email_seq="2" cst_email_address="jamesj@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2J Jones" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="1" cst_udf_text="date" cst_udf_nbr="101112" cst_udf_date="101112" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="10:35:50">

<CustSoldTo cst_company="7" cst_cust_nbr="111" cst_action_type="C" cst_action_result="Failure" />

</Message>

Customer Message: Failure Delete Request

A sample CWCustomerIn Delete request that is placed in error in Working with Customer API (WCAI) is presented below.

Note: If the cst_action_type in an Inbound Customer Message (CWCustomerIn) is D, the system places the message in error in Working with Customer API (WCAI) with the error reason Invalid Type. You cannot delete a customer through the Generic Customer API.

CWCustomerIn: See Inbound Customer Message (CWCustomerIn) for message details.

<Message source="cwi" target="CUST35" type="CWCustomerIn" resp_qmgr="QM_cwi_QA4">

<CustSoldTo cst_company="007" cst_action_type="D" cst_send_response="Y" cst_duplicate="S" cst_cust_nbr="111" cst_salesman_nbr="" cst_interface_cust_nbr="" cst_language="ENG" cst_job_title="" cst_relate_id="" cst_prefix="" cst_fname="James" cst_minitial="R" cst_lname="Jones" cst_suffix="" cst_company_name="" cst_street_addr="10 River St" cst_addr_line_2="" cst_addr_line_3="" cst_addr_line_4="" cst_apt="" cst_city="Templeton" cst_state="MA" cst_zip="01581" cst_country="USA" cst_day_phone="(508)555-0100" cst_day_ext="1234" cst_eve_phone="(508)555-0101" cst_eve_ext="5678" cst_fax_phone="5085550102" cst_fax_ext="9012" cst_mail_name="" cst_rent_name="" cst_seed_name="" cst_rent_email="" cst_original_source="" cst_current_source="" cst_hold_bypass_fraud="" cst_orig_mail_type="S" cst_curr_mail_type="B" cst_tax_exempt="" cst_exempt_certificate="" cst_exempt_expiry="" cst_associate="" cst_cancel_bo="K" cst_commercial="N" cst_cust_type="" cst_discount_pct="" cst_entry_date="" cst_inactive="N" cst_bypass_reservation="N" cst_pop_window_1="POP1" cst_pop_window_2="POP2" cst_pop_window_3="" cst_pop_window_4="" cst_price_column="" cst_item_hist_tracking="2" cst_vat_nbr="" cst_do_not_fax="N" cst_deliverable="" cst_delivery_type="" cst_email_status="O1" cst_account_nbr="" cst_cust_class="" cst_cust_company="" cst_mail_code="" cst_call_code="" cst_change_user="" cst_create_user="" cst_currency="USD" cust_po_box="" cst_warehouse="2" cst_user_field_1="USER1" cst_user_field_2="USER2" cst_user_field_3="USER3" cst_user_field_4="USER4" cst_reserve_warehouse="11" cst_van_route="" cst_van_route_seq="" cst_price_group="">

<CustEmails>

<CustEmail cst_email_seq="1" cst_email_address="jjones@example.com" cst_email_primary="Y" cst_email_status="O1" cst_email_format="" cst_display_name="1J Jones" />

<CustEmail cst_email_seq="2" cst_email_address="jamesj@example.com" cst_email_primary="N" cst_email_status="O2" cst_email_format="" cst_display_name="2J Jones" />

</CustEmails>

<CustUserDefinedFields>

<CustUserDefinedField cst_udf_seq="1" cst_udf_text="date" cst_udf_nbr="101112" cst_udf_date="101112" />

</CustUserDefinedFields>

<CustProfiles>

<CustProfile cst_profile_code="" cst_profile_value="" />

</CustProfiles>

</CustSoldTo>

</Message>

CWCustomerOut: See Outbound Customer Response Message (CWCustomerOut) for message details.

<Message source="OMS" target="CUST35" type="CWCustomerOut" date_created="2011-10-20" time_created="10:41:34">

<CustSoldTo cst_company="7" cst_cust_nbr="111" cst_action_type="D" cst_action_result="Failure" />

</Message>

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 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 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 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 (default for new customer) = 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 (default for new customer) = 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 Tax identification code 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 (the Tax code) in the Customer Sold To table; see the Tax code status field on the Second Create Customer Sold To Screen.

cst_exempt_

certificate

alpha

30

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.

Any combination of letters, numbers, or special characters is accepted.

Updates the Exempt certificate (the Tax identification code) in the Customer Sold To table; see the Tax identification 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 (labeled the Expiration date on screens) in the Customer Sold To table; see the Expiration date (Tax identification 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 original source code is XSTORE.

• defaults the value from the Default Associate Code (D09) system control value if the original source code is not 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:

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

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

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.

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_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: Version 2.0 in Order Management System 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: Version 2.0 in Order Management System 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: Version 2.0 in Order Management System 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

The Oracle Retail Customer Engagement ID.

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: Version 3.0 in Order Management System 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: Version 4.0 in Order Management System 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: 2.0 (release 2.5 of Order Management System).

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.

Outbound Customer Response Message (CWCustomerOut)

 

The CWCustomer or CWMessageIn Web Service generates this message as a response to the Inbound Customer Message (CWCustomerIn) if the cst_send_response is selected. See Adding a Customer using the Customer API and Changing a Customer using the Customer API for more information.

Special characters: Certain special characters cannot be defined for 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.

Sample message: See Sample Customer API XML Messages.

Attribute Name

Type

Length

Comments

Message

source

alpha

20

Informational.

target

alpha

20

Informational.

type

alpha

20

CWCustomerOut

resp_qmgr

alpha

48

Informational.

resp_q

alpha

48

Informational.

CustSoldTo

cst_company

numeric

3

The company indicated in the Inbound Customer Message (CWCustomerIn).

cst_cust_nbr

numeric

9

The customer number affected by the Inbound Customer Message (CWCustomerIn). In the case of a successful Add request, this is the customer number assigned by the system to the new customer.

From Customer # in the Customer Sold To table.

cst_action_type

alpha

1

Defines whether the system considered the Inbound Customer Message (CWCustomerIn) to be an Add or Change request.

A = Add request.

C = Change request.

cst_action_result

alpha

9

The result of the requested action. Possible results are:

Success = The update was completed successfully.

Failure = The request could not be completed due to errors. The response indicates the element and tag that caused the error.

Duplicate = The request could not be completed because the system found one or more duplicate customers. Used only for Add requests.

The customer name and address information included in the CustSoldTo element of the response message varies, based on whether the response is to an Add or Change request, and whether the request was successful:

Successful creation or change: This is the information sent in the Inbound Customer Message (CWCustomerIn). If the system performed any address standardization, the updated address is included.

Duplicate: This is the customer information for the duplicate customer if the system found one or more duplicate customers for an Add request. See Adding a Customer using the Customer API for a discussion.

Note: If there are multiple duplicate customers, additional duplicates are listed in the Duplicate element.

Change failure: The customer number identified for the Change request is included, but no additional customer information.

Add failure: No customer information is included.

See the Sample Customer API XML Messages for examples of each.

cst_prefix

alpha

3

The Prefix, if any, for the customer.

From Prefix in the Customer Sold To table.

cst_fname

alpha

15

The First Name, if any, for the customer.

From First Name in the Customer Sold To table.

cst_minitial

alpha

1

The Initial, if any, for the customer.

From Initial in the Customer Sold To table.

cst_lname

alpha

25

The Last Name, if any, for the customer.

From Last Name in the Customer Sold To table.

cst_suffix

alpha

3

The Suffix, if any, for the customer.

From Suffix in the Customer Sold To table.

cst_company_name

alpha

30

The Company, if any, for the customer.

From Company name in the Customer Sold To table.

cst_street_name

alpha

32

The Street for the customer.

From Street Address in the Customer Sold To table.

cst_addr_line_2

alpha

32

The three additional Address lines, if any, for the customer.

From Address line 2 in the Customer Sold To table and Address line 3 and Address line 4 in the Customer Sold To Extended table.

cst_addr_line_3

alpha

32

cst_addr_line_4

alpha

32

cst_apt

alpha

10

The Apt/suite (Apartment/suite), if any, for the customer.

From Apartment in the Customer Sold To table.

cst_city

alpha

25

The City for the customer.

From City in the Customer Sold To table.

cst_state

alpha

2

The St (State) for the customer.

From State in the Customer Sold To table.

cst_zip

alpha

10

The Postal code for the customer.

From Zip in the Customer Sold To table.

cst_country

alpha

3

The Country for the customer.

From Country in the Customer Sold To table.

cst_match_code

alpha

15

The Match code for the customer.

From Match Code in the Customer Sold To table.

cst_ghost

alpha

1

Indicates whether this customer record is a ghost, or a customer record that you can retain on the system after you purge duplicates. See the discussion of the Ghost flag for more information. Valid values are:

Y = The record is a ghost.

N = The record is not a ghost.

From Ghost? in the Customer Sold To table.

Alternate

cst_interface_cust_nbr

alpha

15

From Alternate customer # in the Customer Sold To XRef table. Each alternate customer number for the customer is included.

Duplicate

This information is included only if there are multiple duplicates for an Add request. See Adding a Customer using the Customer API for a discussion.

dup_cust_nbr

numeric

9

From Customer # in the Customer Sold To table.

dup_prefix

alpha

3

From Prefix in the Customer Sold To table.

dup_fname

alpha

15

From First Name in the Customer Sold To table.

dup_minitial

alpha

1

From Initial in the Customer Sold To table.

dup_lname

alpha

25

From Last Name in the Customer Sold To table.

dup_suffix

alpha

3

From Suffix in the Customer Sold To table.

dup_company_name

alpha

30

From Company name in the Customer Sold To table.

dup_street_name

alpha

32

From Street Address in the Customer Sold To table.

dup_addr_line_2

alpha

32

From Address line 2 in the Customer Sold To table.

dup_addr_line_3

alpha

32

From Address line 3 in the Customer Sold To Extended table.

dup_addr_line_4

alpha

32

From Address line 4 in the Customer Sold To Extended table.

dup_apt

alpha

10

From Apartment in the Customer Sold To table.

dup_city

alpha

25

From City in the Customer Sold To table.

dup_state

alpha

2

From State in the Customer Sold To table.

dup_zip

alpha

10

From Zip in the Customer Sold To table.

dup_country

alpha

3

From Country in the Customer Sold To table.

dup_match_code

alpha

15

From Match Code in the Customer Sold To table.

dup_ghost

alpha

1

Indicates whether this customer record is a ghost, or a customer record that you can retain on the system after you purge duplicates. See the discussion of the Ghost flag for more information. Valid values are:

Y = The record is a ghost.

N = The record is not a ghost.

From Ghost? in the Customer Sold To table.

CS03_24 OMSCS 18.1 April 2019 OTN