WS
To import your customers database to VirtualNewspaper system you have to upload one .CSV file to the FTP we provided.
Rules to follow
Structure table "customers" for file YYYYMMDD_customers.csv
(*) = mandatory
| FIELD | FORMAT | NOTE |
|---|---|---|
| id (*) | int(11) | Auto-incremental Id for the table "customers" |
| email (*) | mediumtext | Email of the user |
| password (*) | mediumtext | Customer password in Plain MD5 format or clear, if available. |
| surname | mediumtext | Customer surname |
| name | mediumtext | Customer name |
| date_of_birth | date | Customers date of birth - (yyyy-MM-dd) |
| place_of_birth | varchar(300) | Customer place of birth |
| gender | varchar(30) | Customer gender (M = Male / F = Female) |
| company_name | mediumtext | Company Name |
| company_address | varchar(255) | Company Address |
| company_postcode | varchar(255) | Company Postal Code |
| company_city | varchar(255) | Company City |
| company_region | varchar(255) | Company Region |
| company_country | varchar(255) | Company Country |
| company_telephone | varchar(255) | Company Telephone |
| company_fax | varchar(255) | Company Fax |
| company_vat | varchar(200) | Company VAT |
| vat | mediumtext | Customer VAT |
| fiscal_code | mediumtext | Customer Fiscal Code |
| address | mediumtext | Customer Addess |
| postcode | mediumtext | Customer Postal Code |
| city | mediumtext | Customer City |
| region | mediumtext | Customer Region |
| country | mediumtext | Customer Country |
| telephone | mediumtext | Customer Telephone |
| fax | mediumtext | Customer Fax |
| newsletter | int(11) | Contains "0" if the customer doesn't want receive newsletters, 1 if the customer wants to receive the newsletter only from the publisher, 2 if the customer wants to receive the newsletter only from third parties and not from the publisher, 3 if the customer wants to receive newsletters from anyone. |
| registration_date | date | Customer registration date (yyyy-MM-dd) |
| username | mediumtext | Customer username *Deprecated field, then contain the email address* |
| job | mediumtext | Customer job |
| code | varchar(50) | Virtualcom internal use |
| external_id | int(11) | Virtualcom internal use |
| place_of_birth | varchar(150) | *Deprecated field* |
| type | varchar(255) | *Deprecated field* |
| category | varchar(300) | Customer category eg. "Paper subscriber" |
| last_update | datetime | Virtualcom internal use (yyyy-MM-dd hh:mm:ss) |
| marital_status | varchar(50) | *Deprecated field* |
| mobile_phone | varchar(50) | Customer mobile phone |
| annual_income | varchar(255) | *Deprecated field* |
| Ing_company | varchar(50) | Company Address longitude |
| lat_company | varchar(50) | Company Address latitude |
| formatted_address_company | varchar(500) | Company Address |
| administrative_area_level_1_company | varchar(200) | Company Google Administrative Area 1 (https://developers.google.com/maps/documentation/javascript/places) |
| administrative_area_level_2_company | varchar(200) | Company Google Administrative Area 2 (https://developers.google.com/maps/documentation/javascript/places) |
| administrative_area_level_3_company | varchar(200) | Company Google Administrative Area 3 (https://developers.google.com/maps/documentation/javascript/places) |
| Ing | varchar(50) | Customer Address longitude |
| lat | varchar(50) | Customer Address latitude |
| formatted_address | varchar(500) | Customer Address |
| administrative_area_level_1 | varchar(200) | Customer Google Administrative Area 1 (https://developers.google.com/maps/documentation/javascript/places) |
| administrative_area_level_2 | varchar(200) | Customer Google Administrative Area 2 (https://developers.google.com/maps/documentation/javascript/places) |
| administrative_area_level_3 | varchar(200) | Customer Google Administrative Area 3 (https://developers.google.com/maps/documentation/javascript/places) |
| custom1 | varchar(300) | Field to collect additional data |
| custom2 | varchar(300) | Field to collect additional data |
| custom3 | varchar(300) | Field to collect additional data |
| custom4 | varchar(300) | Field to collect additional data |
| custom5 | varchar(300) | Field to collect additional data |
| custom6 | varchar(300) | Field to collect additional data |
| custom7 | varchar(300) | Field to collect additional data |
| custom8 | varchar(300) | Field to collect additional data |
| custom9 | varchar(300) | Field to collect additional data |
| custom10 | varchar(300) | Field to collect additional data |
| citycode | varchar(255) | Italian customer city code by ISTAT |
| citycode_company | varchar(255) | Italian company city code by ISTAT |
| deleted | tinyint(1) | Virtualcom internal use, for default set to "0" |
| active | tinyint(4) | Virtualcom internal use, for default set to "1" |
| public_authority | tinyint(1) | Italian Public Authority, by default set to "0" which is not public authority |
| cup | varchar(30) | Codice Unico Progetto: Public Authority detail, by default set to "" |
| cig | varchar(30) | Codice Identificativo Gara: Public Authority detail, by default set to "" |
| cupa | varchar(30) | Codice Ufficio Pubblica Amministrazione: Public Authority detail, by default set to "" |
Example for file YYYYMMDD_customers.csv with 3 customers
310714,"customer1@virtualnewspaper.it","25f9e794323b453885f5181f1b624d0b","","","1900-01-01","","","","","","","","","","","","","","","","","","","","",0, "2013-07-15","customer1@virtualnewspaper.it","","","0","","","","2013-07-15 16:05:43", "","","","","","","","","","","","","","","","","","","","","","","","","","","",0,1,0,"","","" 310715,"customer2@virtualnewspaper.it","25f9e794323b453885f5181f1b624d0b","","","1900-01-01","","","","","","","","","","","","","","","","","","","","",0, "2013-07-15","customer2@virtualnewspaper.it","","","0","","","","2013-07-15 16:05:43", "","","","","","","","","","","","","","","","","","","","","","","","","","","",0,1,0,"","","" 310716,"customer3@virtualnewspaper.it","25f9e794323b453885f5181f1b624d0b","","","1900-01-01","","","","","","","","","","","","","","","","","","","","",0, "2013-07-15","customer3@virtualnewspaper.it","","","0","","","","2013-07-15 16:05:43", "","","","","","","","","","","","","","","","","","","","","","","","","","","",0,1,0,"","",""