% include("/elements/header.html",'Batch Customer Import') %>
Import a CSV file containing customer records.
Extended file format is CSV, with the following field order: agent_custid, refnum<%$req%>, last<%$req%>, first<%$req%>, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country, daytime, night, ship_last, ship_first, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, payinfo<%$req%>, paycvv, paydate<%$req%>, invoicing_list, pkgpart, username, _password
Extended plus company file format is CSV, with the following field order: agent_custid, refnum<%$req%>, last<%$req%>, first<%$req%>, company, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country, daytime, night, ship_last, ship_first, ship_company, ship_address1, ship_address2, ship_city, ship_state, ship_zip, ship_country, payinfo<%$req%>, paycvv, paydate<%$req%>, invoicing_list, pkgpart, username, _password
<%$req%> Required fields
Field information:
  - agent_custid: This is the reseller's idea of the customer number or identifier.  It may be left blank.  If specified, it must be unique per-agent.
  
- refnum: Advertising source number - where a customer heard about your service.  Configuration -> Miscellaneous -> View/Edit advertising sources.  This field has special treatment upon import: If a string is passed instead
of an integer, the string is searched for and if necessary auto-created in the
advertising source table.
  
- payinfo: Credit card number, or leave this, paycvv and paydate blank for email/paper invoicing.
  
- paycvv: CVV2 number (three digits on the back of the credit card)
  
- paydate: Credit card expiration date, MM/YYYY or MM/YY (M/YY and M/YYYY are also accepted).
  
- invoicing_list: Email address for invoices, or POST for postal invoices.
  
- pkgpart: Package definition.  Configuration -> Provisioning, services and packages -> View/Edit package definitions
  
- username and _password are required if pkgpart is specified.
<% include('/elements/footer.html') %>
<%once>
my $req = qq!*!;
%once>
<%init>
die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Import');
%init>