Chapter 78: E-Commerce Customer Creation and Updates | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 79: E-Commerce Order Reject |
E-Commerce Name/Address Change Message (CWAddressChg)
The EC_CST_UPD job, started through Working with E-Commerce Job Control (EJCT) creates and updates customers through the e-commerce interface. The main purposes of this job:
• receive and process name and address updates for sold to, bill to, or individual customers. For example, a customer may wish to change address information if he or she moved.
• receive and process new sold to customers. For example, a customer may wish to register on the web storefront without requesting a catalog or entering an order. You cannot create a new bill to customer or individual. Note: Creating sold to customers is available for XML messages only, not name/value pair messages.
For more information: See:
• E-Commerce Customer Creation and Updates for additional processing information.
• E-Commerce Name/Address Change Message: Sample XML
• E-Commerce Name/Address Change Message: Sample NVP
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Name/Value Pair layout: The e-commerce name/address change (EC_CST_UPD) name/value pair message uses the following layout: name=value.
Example:
companycode=555
customer_number=204
new_fname=BERNADETTE
The Attribute Name column in the table below indicates the name part of the name/value pair. The Comments column indicates the data to enter in the value part of the name/value pair. A note displays in the Comments column if the field is only available in the XML message.
Note: If a field is included in the name/value pair message, the field must be included in the order shown below. However, if the field is empty, the field does not need to be sent.
Attribute Name |
Type |
Length |
Comments |
One Message element is required. Available in version: The Message element and all of its attributes is available for XML only. |
|||
source |
alpha |
|
Identifies the source of the XML message. WEB indicates the XML message is from the web storefront. Required. |
target |
alpha |
|
Identifies the target of the XML message. RDC indicates the XML message is sent to CWDirect. Required. |
type |
alpha |
|
Identifies the type of information in the XML message. CWAddressChg indicates the message contains a name/address change. Required. |
One AddressChg element is required. |
|||
company_code |
numeric |
3 |
The company where the customer is located. Maps to the CMP Company field in the Customer Sold To file. Required. |
customer_number |
numeric |
9 |
A number that represents a sold to customer. Maps to the CST Customer # field in the Customer Sold To file. A customer sold to number is required if you are updating a sold to customer, bill to customer or individual customer. Leave this field blank if you are creating a new sold to customer. |
processing_type |
alpha |
1 |
Indicates if the customer information passed should create a new customer or update an existing customer. Valid values: C (create sold to customer, send response): The system creates a new sold to customer, using the name and address information in the message and also sends an E-Commerce Name/Address Change Response Message (CWCchgResponse) back to the web storefront. Note: You cannot create a new bill to customer or individual customer. U (update customer, send response): The system updates an existing sold to customer (using the customer_number), bill to customer (using the ar_number), or individual customer (using the ind_number) and also sends an E-Commerce Name/Address Change Response Message (CWCchgResponse) back to the web storefront. |
|
|
|
blank or a value other than C or U (update customer, no response): The system updates the existing sold to, bill to, and/or individual, but does not send an E-Commerce Name/Address Change Response Message (CWCchgResponse) back to the web storefront. See Customer Creation/Update Logic in E-Commerce Name/Address Change for more information. Available in version: 7.0 or later of CWDirect for XML only. |
The new fields are used to create a new sold to customer or update an existing sold to customer. You must define a complete, valid address in these fields. See Creating/Updating Sold To Customers in E-Commerce Customer Updates for more processing information. |
|||
new_prefix |
alpha |
3 |
The new prefix to assign to the sold to customer. Maps to the NAM Prefix field in the Customer Sold To file. Available in version: 7.0 or later of CWDirect for XML only. |
new_fname |
alpha |
15 |
The new first name to assign to the sold to customer. Maps to the NAM First name field in the Customer Sold To file. |
new_initial |
alpha |
1 |
The new middle initial to assign to the sold to customer. Maps to the NAM Initial field in the Customer Sold To file. Available in version: 6.0 or later of CWDirect. |
new_lname |
alpha |
25 |
The new last name to assign to the sold to customer. Maps to the NAM Last name field in the Customer Sold To file. |
new_suffix |
alpha |
3 |
The new suffix to assign to the sold to customer. Maps to the NAM Suffix field in the Customer Sold To file. Available in version: 7.0 or later of CWDirect for XML only. |
new_company |
alpha |
30 |
The new company name to assign to the sold to customer. Maps to the NAM Company name field in the Customer Sold To file. |
new_busres |
alpha |
1 |
The new delivery code to assign to the sold to customer. Valid values: B = Business. R = Residence. Maps to the NAM Delivery code field in the Customer Sold To file. |
new_address1 |
alpha |
32 |
The new street address to assign to the sold to customer address. Maps to the NAM Street address field in the Customer Sold To file. |
new_address2 |
alpha |
32 |
The new second address line to assign to the sold to customer address. Maps to the NAM Address line 2 field in the Customer Sold To file. |
new_address3 |
alpha |
32 |
The new third address line to assign to the sold to customer address. Maps to the NAM Address line 3 field in the Customer Sold To Extended file. |
new_address4 |
alpha |
32 |
The new fourth address line to assign to the sold to customer address. Maps to the NAM Address line 4 field in the Customer Sold To Extended file. |
new_apartment |
alpha |
10 |
The new apartment/suite number to assign to the sold to customer address. Maps to the NAM Apartment field in the Customer Sold To file. Available in version: 6.0 or later of CWDirect. |
new_city |
alpha |
25 |
The new city to assign to the sold to customer address. Maps to the NAM City field in the Customer Sold To file. |
new_state |
alpha |
2 |
The new state code to assign to the sold to customer address. Maps to the NAM State field in the Customer Sold To file. |
new_zip |
alpha |
10 |
The new postal code to assign to the sold to customer address. Maps to the NAM Zip field in the Customer Sold To file. |
new_country |
alpha |
3 |
The new country code to assign to the sold to customer address. Maps to the RPR Country field in the Customer Sold To file. |
new_email |
alpha |
50 |
The new email address to assign to the sold to customer. Maps to the E-mail field in the Customer Sold To file. |
new_day_phone |
alpha |
14 |
The new day phone number to assign to the sold to customer. The system formats the number as specified at the Work with Telephone Number Format Screen. Maps to the Phone field in the Customer Sold To Phone # file whose CS# Phone # type field is D. |
new_eve_phone |
alpha |
14 |
The new evening phone number to assign to the sold to customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. Maps to the Phone field in the Customer Sold To Phone # file whose CS# Phone # type field is E. |
new_fax_phone |
alpha |
14 |
The new fax number to assign to the sold to customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. Maps to the Phone field in the Customer Sold To Phone # file whose CS# Phone # type field is F. Available in version: 7.0 or later of CWDirect for XML only. |
allow_rent |
alpha |
1 |
Indicates whether to include the customer’s name in lists you sell to other companies. Valid values: Y = Sell the customer’s name to other companies. N = Do not sell the customer’s name to other companies. Maps to the CST Rent name? field in the Customer Sold To file. |
allow_email |
alpha |
1 |
This field is not currently implemented. Maps to the CST Rent e-mail field in the Customer Sold To file. |
allow_mail |
alpha |
1 |
Indicates whether the customer receives future catalogs. Valid values: Y = Mail catalogs to the customer. N = Do not mail catalogs to the customer. Maps to the CST Mail name? field in the Customer Sold To file. |
new_opt_in |
alpha |
2 |
The preferred method of correspondence for the primary email address. Valid values: O1 (Email): Email is the preferred method of correspondence. O2 (Order-only email): Use email for order-related correspondence only; generate a spool file for other correspondence. O3 (No email): Do not use email for any correspondence; generate a spool file instead. O4 (Do not ask the customer): Do not ask the customer for his/her email address. Maps to the CST E-Mail status field in the Customer Sold To file. Available in version: 7.0 or later of CWDirect for XML only. |
new_user_field_1 |
alpha |
10 |
A user field defined for the sold to customer. If this field is left blank for a sold to customer update, the system will not update the existing value to blank. Maps to the User field 1 field in the Customer Sold To Extended file. Available in version: 7.0 or later of CWDirect for XML only. |
new_user_field_2 |
alpha |
10 |
A user field defined for the sold to customer. If this field is left blank for a sold to customer update, the system will not update the existing value to blank. Maps to the User field 2 field in the Customer Sold To Extended file. Available in version: 7.0 or later of CWDirect for XML only. |
new_user_field_3 |
alpha |
10 |
A user field defined for the sold to customer. If this field is left blank for a sold to customer update, the system will not update the existing value to blank. Maps to the User field 3 field in the Customer Sold To Extended file. Available in version: 7.0 or later of CWDirect for XML only. |
new_user_field_4 |
alpha |
10 |
A user field defined for the sold to customer. If this field is left blank for a sold to customer update, the system will not update the existing value to blank. Maps to the User field 4 field in the Customer Sold To Extended file. Available in version: 7.0 or later of CWDirect for XML only. |
The ind fields are used to update an existing individual customer. You must define a complete, valid address in these fields. See Updating Individuals in E-Commerce Customer Updates for more processing information. |
|||
ind_number |
numeric |
3 |
A number that represents an individual customer. Maps to the CIF Customer individual # field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_dept |
alpha |
3 |
A code that represents the individual’s department within the organization. Maps to the CIF Department field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_position |
alpha |
3 |
A code that represents the individual’s position within the organization. Maps to the CIF Position field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_prefix |
alpha |
3 |
The prefix of the individual customer. Maps to the CIF name prefix field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_fname |
alpha |
15 |
The first name of the individual customer. Maps to the CIF First name field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_initial |
alpha |
1 |
The middle initial of the individual customer. Maps to the CIF Middle initial field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_lname |
alpha |
25 |
The last name of the individual customer. Maps to the CIF Last name field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_suffix |
alpha |
3 |
The suffix of the individual customer. Maps to the CIF Name suffix field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_day_phone |
alpha |
14 |
The day phone number assigned to the individual customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. If you enter, change, or delete the individual customer phone number and the Use Computer Telephony Integration (F26) system control value is set to Y, the system creates a record in the CTI Telephone Scan file. Maps to the Day phone field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_eve_phone |
alpha |
14 |
The evening phone number assigned to the individual customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. If you enter, change, or delete the individual customer phone number and the Use Computer Telephony Integration (F26) system control value is set to Y, the system creates a record in the CTI Telephone Scan file. Maps to the Eve phone field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_fax_phone |
alpha |
14 |
The fax number assigned to the individual customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. Maps to the Fax phone field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_email_address |
alpha |
50 |
The email address assigned to the individual customer. Maps to the CIF E-Mail address field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_opt_in |
alpha |
2 |
The preferred method of correspondence for the individual’s email address. Valid values: O1 (Email): Email is the preferred method of correspondence. O2 (Order-only email): Use email for order-related correspondence only; generate a spool file for other correspondence. O3 (No email): Do not use email for any correspondence; generate a spool file instead. O4 (Do not ask the customer): Do not ask the customer for his/her email address. Maps to the CIF Opt in/opt out field in the Customer Individual file. Available in version: 7.0 or later of CWDirect for XML only. |
ind_mail_flag |
alpha |
1 |
Indicates if the individual receives future catalogs. Y = Mail catalogs to the individual. N = Do not mail catalogs to the individual. Maps to the CIF Mail flag field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_rent_flag |
alpha |
1 |
Indicates whether to include the individual’s name in lists you sell to other companies. Y = Sell the individual’s name to another company. N = Do not sell the individual’s name to another company. Maps to the CIF Rent flag field in the Customer Individual file. Available in version: 6.0 or later of CWDirect. |
ind_user_field_1 |
alpha |
10 |
A user field defined for the individual customer. If this field is left blank for an individual customer update, the system will not update the existing value to blank. Maps to the CIF User field 1 field in the Customer Individual file. Available in version: 7.0 or later of CWDirect for XML only. |
ind_user_field_2 |
alpha |
10 |
A user field defined for the individual customer. If this field is left blank for an individual customer update, the system will not update the existing value to blank. Maps to the CIF User field 2 field in the Customer Individual file. Available in version: 7.0 or later of CWDirect for XML only. |
ind_user_field_3 |
alpha |
10 |
A user field defined for the individual customer. If this field is left blank for an individual customer update, the system will not update the existing value to blank. Maps to the CIF User field 3 field in the Customer Individual file. Available in version: 7.0 or later of CWDirect for XML only. |
ind_user_field_4 |
alpha |
10 |
A user field defined for the individual customer. If this field is left blank for an individual customer update, the system will not update the existing value to blank. Maps to the CIF User field 4 field in the Customer Individual file. Available in version: 7.0 or later of CWDirect for XML only. |
The ar fields are used to update an existing bill to customer. You must define a complete, valid address in these fields. See Updating Bill To Customers in E-Commerce Customer Updates for more processing information. Note: If you update a bill to customer and also create or update a sold to customer in the same message, the system does not assign the bill to customer to the sold to customer. |
|||
ar_number |
numeric |
7 |
A number that represents a bill to customer. Maps to the CBT Account # field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_prefix |
alpha |
3 |
The prefix assigned to the bill to customer. Maps to the Prefix field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_fname |
alpha |
15 |
The first name assigned to the bill to customer. Maps to the First name field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_initial |
alpha |
1 |
The middle initial assigned to the bill to customer. Maps to the Initial field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_lname |
alpha |
25 |
The last name assigned to the bill to customer. Maps to the Last name field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_suffix |
alpha |
3 |
The suffix assigned to the bill to customer. Maps to the Suffix field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_company_name |
alpha |
30 |
The company name assigned to the bill to customer. Maps to the Company name field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_street_address |
alpha |
32 |
The street address of the bill to customer address. Maps to the Street address field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_address_2 |
alpha |
32 |
The second address line of the bill to customer address. Maps to the Address line 2 field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_address_3 |
alpha |
32 |
The third address line of the bill to customer address. Maps to the Address line 3 field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_address_4 |
alpha |
32 |
The fourth address line of the bill to customer address. Maps to the Address line 4 field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_apt |
alpha |
10 |
The apartment/suite number of the bill to customer address. Maps to the Apartment field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_city |
alpha |
25 |
The city of the bill to customer address. Maps to the City field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_state |
alpha |
2 |
The state code of the bill to customer address. Maps to the State field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_country |
alpha |
3 |
The country code of the bill to customer address. Maps to the RPR Country field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_zip |
alpha |
10 |
The postal code of the bill to customer address. Maps to the Zip field in the Customer Bill To file. Available in version: 6.0 or later of CWDirect. |
ar_day_phone |
alpha |
14 |
The day phone number assigned to the bill to customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. Maps to the Phone field in the Customer Bill To Phone # file whose CB# Phone # type field is D. Available in version: 6.0 or later of CWDirect. |
ar_eve_phone |
alpha |
14 |
The evening phone number assigned to the bill to customer. The system formats the number, as specified at the Work with Telephone Number Format Screen. Maps to the Phone field in the Customer Bill To Phone # file whose CB# Phone # type field is E. Available in version: 6.0 or later of CWDirect. |
ar_fax_phone |
alpha |
14 |
The fax number assigned to the bill to customer. Maps to the Phone field in the Customer Bill To Phone # file whose CB# Phone # type field is F. The system formats the number, as specified at the Work with Telephone Number Format Screen. Available in version: 6.0 or later of CWDirect. |
ar_email_address |
alpha |
50 |
The email address assigned to the bill to customer. Maps to the CBT Email address field in the Customer Bill To file. Available in version: 7.0 or later of CWDirect for XML only. |
ar_opt_in |
alpha |
2 |
The preferred method of correspondence for the bill to’s email address. Valid values: O1 (Email): Email is the preferred method of correspondence. O2 (Order-only email): Use email for order-related correspondence only; generate a spool file for other correspondence. O3 (No email): Do not use email for any correspondence; generate a spool file instead. O4 (Do not ask the customer): Do not ask the customer for his/her email address. Maps to the CBT Opt in/opt out field in the Customer Bill To file. Available in version: 7.0 or later of CWDirect for XML only. |
ar_print_statement |
alpha |
1 |
Controls whether the system prints a statement on open balances, and open and paid receipts for the customer. Y = Print an accounting statement. N = Do not print an accounting statement. Maps to the CBT Print statement? field in the Customer Bill To file. |
The CustOwnerships element, if provided, can include one or more CustOwnership elements. Available in version: The CustOwnership element and all of its attributes is available in version 8.0 or later of CWDirect for XML only. |
|||
cust_own_ID |
alpha |
10 |
A code that represents a product the customer owns or previously owned. Maps to the Ownership ID field in the Customer Ownership file. |
cust_own_desc |
alpha |
40 |
A description of the product. Maps to the Description field in the Customer Ownership file. |
cust_own_active |
alpha |
1 |
Indicates if the customer currently owns the product. Y = The customer currently owns the product. N = The customer previously owned the product. Maps to the Act field in the Customer Ownership file. |
cust_own_entry_date |
numeric |
8 |
The date the customer ownership record was created, in MMDDYYYY format. Maps to the Entry date field in the Customer Ownership file. |
cust_own_confirm_date |
numeric |
8 |
The most recent date when the customer confirmed ownership of the product, in MMDDYYYY format. Maps to the Confirm date field in the Customer Ownership file. |
E-Commerce Name/Address Change Message: Sample XML
A sample of the E-Commerce Name/Address Change Message (CWAddressChg) in XML format is presented below.
- <Message source="RDC" target="WEB" type="CWAddressChg">
- <AddressChg company_code="555" processing_type="C" new_fname="PAUL" new_lname="LAFOND" new_busres="R" new_address1="PETERSHAM ROAD" new_city="TEMPLETON" new_state="MA" new_zip="01468" new_country="USA" new_day_phone="6173235527" new_eve_phone="5087618560" new_fax_phone="5556667777" allow_rent="1" allow_email="1" allow_mail="1" new_opt_in="03" ind_user_field_3="induserfld3">
- <CustOwnerships>
<CustOwnership cust_own_ID="FRDFCS04" cust_own_desc="2004 FORD FOCUS" cust_own_active="Y" />
</CustOwnerships>
</AddressChg>
</Message>
E-Commerce Name/Address Change Message: Sample NVP
A sample of the E-Commerce Name/Address Change Message (CWAddressChg) in name/value pair format is presented below. Each name/value pair is separated by a semi-colon (;).
company_code=555;ar_number=3;ar_prefix=MS;ar_fname=LINDA;ar_initial=J;ar_lname=LETENDRE;ar_street_address=217 TAMARACK DRIVE;ar_city=SPRINGFIELD;ar_state=MA;ar_country=USA;ar_zip=01129;ar_day_phone=1234568888;ar_eve_phone=4445556666;ar_fax_phone=5556667777;ar_print_statement=Y;
E-Commerce Name/Address Change Response Message (CWCchgResponse)
If the processing_type field in the E-Commerce Name/Address Change Message (CWAddressChg) contains a C or U, the EC_CST_UPD job sends an e-commerce name/address change response message back to the web storefront.
Available in version: The Name/Address Change Response message is available in version 7.0 or later of CWDirect for XML only.
For more information: See:
• E-Commerce Customer Creation and Updates for additional processing information.
• E-Commerce Name/Address Change Response Message: Sample XML.
• XML Messages for a table that provides links to the DTD, schema, and a sample XML layout for each XML message.
Attribute Name |
Type |
Length |
Comments |
One Message element is required. |
|||
source |
alpha |
|
Identifies the source of the XML message. RDC indicates the XML message is from CWDirect. Required. |
target |
alpha |
|
Identifies the target of the XML message. WEB indicates the XML message is sent to the web storefront. Required. |
type |
alpha |
|
Identifies the type of information in the XML message. CWCchgResponse indicates the message contains a name/address change response. Required. |
One CWCchgResponse element is required. |
|||
company_code |
numeric |
3 |
The company where the customer was created or updated. From the CMP Company field in the Customer Sold To file. Required. |
customer_number |
numeric |
9 |
The sold to customer number that was created or updated. 000000000000000 displays if a sold to customer was not created or updated, for example, a customer number was passed for a customer create or an existing sold to customer was not found for a customer update. From the CST Customer # field in the Customer Sold To file. Required. |
response_type |
alpha |
1 |
Indicates if the customer was created or updated. C = The customer was created. U = The customer was updated. blank = A customer was not created or updated. |
bill_me_later_ind |
alpha |
1 |
Indicates if the customer has an existing Bill Me Later account. Valid values: Y = The customer has an existing Bill Me Later account. N = The customer does not have an existing Bill Me Later account. The system determines the setting of this flag based on whether there is an account number in the Customer Sold To BML file for the sold to customer. Available in version: 8.5 or later of CWDirect. |
E-Commerce Name/Address Change Response Message: Sample XML
A sample of the E-Commerce Name/Address Change Response Message (CWCchgResponse) in XML format is presented below.
- <Message source="RDC" target="IDC" type="CWCchgResponse">
<CWCchgResponse company_code="555" customer_number="000000394" response_type="U" bill_me_later_ind="N" />
</Message>
Chapter 78: E-Commerce Customer Creation and Updates | Contents | SCVs | Search | Glossary | Reports | XML | Index | Chapter 79: E-Commerce Order Reject |
SO10_03x CWDirect 18.0 August 2015 OTN