<& /elements/header.html, 'Customer package import' &> Import a file containing customer packages.

<& /elements/form-file_upload.html, 'name' => 'PackageImportForm', 'action' => 'process/cust_pkg-import.html', 'num_files' => 1, 'fields' => [ 'agentnum', 'pkgbatch', 'format' ], 'message' => 'Customer package import successful', 'url' => $p."search/cust_pkg.cgi?pkgbatch=$pkgbatch", 'onsubmit' => "document.PackageImportForm.submitButton.disabled=true;" &> <% &ntable("#cccccc", 2) %> <& /elements/tr-select-agent.html, #'curr_value' => '', #$agentnum, 'label' => "Agent", 'empty_label' => 'Select agent', &> Format <& /elements/file-upload.html, 'field' => 'file', 'label' => 'Filename', &>
Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.

Default format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire

Default with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire

Default with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire

All dates format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, order_date, start_date, setup, bill, last_bill, susp, adjourn, resume, cancel, expire, contract_end, dundate

All dates with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, order_date, start_date, setup, bill, last_bill, susp, adjourn, resume, cancel, expire, contract_end, dundate

All dates with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, order_date, start_date, setup, bill, last_bill, susp, adjourn, resume, cancel, expire, contract_end, dundate

Account service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, username, _password, domsvc

Account service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, username, _password, domsvc

Account service with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, username, _password, domsvc

Phone service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, phonenum, sip_password, pin

Phone service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, phonenum, sip_password, pin

Phone service with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, phonenum, sip_password, pin

Bulk phone service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, start_phonenum-end_phonenum, sip_password, pin

Bulk phone service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, start_phonenum-end_phonenum, sip_password, pin

Bulk phone service with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, countrycode, start_phonenum-end_phonenum, sip_password, pin

External service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, id, title

External service with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, id, title

External service with existing location format has the following field order: custnum<%$req%>, locationnum, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, id, title

Location format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>

Location with agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>

Location with agent_custid and agent_pkgid format has the following field order: agent_custid<%$req%>, agent_pkgid, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>

Location, quantity and price customizations with phone service format has the following field order: custnum<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>, quantity, setup_fee, recur_fee, invoice_details, countrycode, phonenum, sip_password, pin

Location, quantity and price customizations with phone service and agent_custid format has the following field order: agent_custid<%$req%>, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>, quantity, setup_fee, recur_fee, invoice_details, countrycode, phonenum, sip_password, pin

Location, quantity and price customizations with phone service and agent_custid and agent_pkgid format has the following field order: agent_custid<%$req%>, agent_pkgid, pkgpart<%$req%>, discountnum, start_date, setup, bill, last_bill, susp, adjourn, cancel, expire, address1<%$req%>, address2, city<%$req%>, state<%$req%>, zip<%$req%>, country<%$req%>, quantity, setup_fee, recur_fee, invoice_details, countrycode, phonenum, sip_password, pin

<%$req%> Required fields (for address fields, required if an address is specified)

Field information:
<& /elements/footer.html &> <%once> my $req = qq!*!; <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); my $pkgbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);