1 <% include("/elements/header.html",'Batch Contacts Import') %>
3 Import a file containing customer contact records.
6 <& /elements/form-file_upload.html,
7 'name' => 'ContactImportForm',
8 'action' => 'process/contact-import.cgi',
10 'fields' => [ 'custbatch', 'format' ],
11 'message' => 'Customer contacts import successful',
12 'onsubmit' => "document.ContactImportForm.submitButton.disabled=true;",
15 <% &ntable("#cccccc", 2) %>
17 <INPUT TYPE="hidden" NAME="custbatch" VALUE="<% $custbatch %>"%>
20 <TH ALIGN="right">Format</TH>
22 <SELECT NAME="format">
23 <OPTION VALUE="default" SELECTED>Default
28 <% include( '/elements/file-upload.html',
30 'label' => 'Filename',
35 <TD COLSPAN=2 ALIGN="center" STYLE="padding-top:6px">
36 <INPUT TYPE = "submit"
50 Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.
53 Default Format has the following field order:
55 <i>custnum<%$req%>, last<%$req%>, first<%$req%>, title<%$req%>, comment, selfservice_access, emailaddress, workphone, mobilephone, homephone</i>
60 You must include a customer number and either a last name, first name or title.
64 <li><i>custnum</i>: This is the customer number of the customer the contact is attached to.</li>
66 <li><i>last</i>: Last name for contact.</li>
68 <li><i>first</i>: First name for contact.</li>
70 <li><i>title</i>: Optional title for contact.</li>
72 <li><i>comment</i>: Optional comment for contact.</li>
74 <li><i>selfservice_access</i>: Empty for no self service access or Y if granting self service access.</li>
76 <li><i>emailaddress</i>: Email address for contact.</li>
78 <li><i>workphone</i>: Work phone number for contact. Format xxxxxxxxxx</li>
80 <li><i>mobilephone</i>: Mobile phone number for contact. Format xxxxxxxxxx</li>
82 <li><i>homephone</i>: Home phone number for contact. Format xxxxxxxxxx</li>
88 <% include('/elements/footer.html') %>
92 my $req = qq!<font color="#ff0000">*</font>!;
98 unless $FS::CurrentUser::CurrentUser->access_right('Import');
100 my $custbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);