Cp Customer Data

Frequency

Currently every 15 minutes, and if no changes then do not upload an empty file.

Could be faster (like every five minutes)

Could be in real time (every single change triggers an individual file upload), but would require changes to my code.


Upload Location

•••••••••••••••••.ftp.azurewebsites.windows.net/upload2*

Full path, username, and password will be provided privately.

* '2' suffix is only during testing, and will be dropped.


File Name Convention

cust_YYYYMMDD_HHMMSS.xml
example: cust_20200826_163002.xml is Aug 26th, 2020 at 4:30:02pm


What to Include in the File

Only customers who have been added and/or modified since the last export should be included in the file. Note that a customer record can be modified by editing the customer fields (such as updating their address or phone number) as well as by making a purchase (which updates their loyalty points and activity).

Files are processed in date/time order once they are uploaded, so it's important that changes made in CounterPoint are uploaded in the order that they are made.


File Format

XML

Could switch to JSON, but would require changes to my code.

Definitely want some type of key/value data format (not csv)

<?xml version="1.0" encoding="utf-8"\?>
<DOCUMENT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" POSVersion="1.2.3.1">
	<CUSTOMERS>
		<CUSTOMER ecomm_cust_id="" cust_no="1-1002146" cust_type="C" cust_name_type="P" name="" salutation="" first_name="John" last_name="Smith" full_name="Smith, John" address1="123 Main ST" address2="" address3="" city="PHOENIX" state="AZ" postal_code="85017" country="" comment="" category="TEACHER" sales_rep="HSE" store_id="1" tax_code="" tax_exempt_no="" terms_code="NET" ship_via_code="" shipping_zone="" loyalty_program="BASIC" loyalty_card_no="100017471" loyalty_points_bal="14" contact1="" phone1="9991234567" mobile_phone1="" email_address1="customer@gmail.com" contact2="" phone2="" mobile_phone2="" email_address2="" is_ecomm_cust="Y" opt_in_email="N" tax_exempt_dat="0001-01-01T00:00:00" ar_acct_no="1210-00" ecomm_created_cust="N" ecomm_lst_ord_dt="0001-01-01T00:00:00" />
		<CUSTOMER 
			ecomm_cust_id="" 
			cust_no="1-1002429" 
			cust_type="C" 
			cust_name_type="P" 
			name="" 
			salutation="" 
			first_name="Jane" 
			last_name="Doe" 
			full_name="Doe, Jane" 
			address1="" 
			address2="" 
			address3="" 
			city="" 
			state="AZ" 
			postal_code="85006" 
			country="USA" 
			comment="" 
			category="TEACHER" 
			sales_rep="HSE" 
			store_id="1" 
			tax_code="" 
			tax_exempt_no="" 
			terms_code="" 
			ship_via_code="" 
			shipping_zone="" 
			loyalty_program="BASIC" 
			loyalty_card_no="" 
			loyalty_points_bal="36" 
			contact1="" 
			phone1="1234567890" 
			mobile_phone1="" 
			email_address1="customer@yahoo.com" 
			contact2="" 
			phone2="" 
			mobile_phone2="" 
			email_address2="" 
			is_ecomm_cust="N" 
			opt_in_email="N" 
			tax_exempt_dat="0001-01-01T00:00:00" 
			ecomm_created_cust="N" 
			ecomm_lst_ord_dt="0001-01-01T00:00:00" 
		/>
	</CUSTOMERS>
</DOCUMENT>


Sample

Sample XML Data

XML Viewer