If you already have a populated website with a number of user records, and you want some or all of your existing users to be given client records in nBill, you can achieve this using the import feature. You can also import clients from a CSV file, and export clients to a CSV file.

To access the Client import/export page, select Configuration­->Import/Export-­>Clients from the main menu as shown in figure 3.12.

Figure 3.12.1 - Accessing the Client Import/Export Page


This brings you to the Client Import/Export page shown in figure 3.12.2.

Figure 3.12.2 - Client Import/Export

Import

To create client records in nBill for all of your Joomla! or Wordpress users, click on the 'Import All' button. If there is already a client record associated with a user, it will be left alone. Super Administrator users are ignored.

If you want to pick certain users to be imported as clients, click on the 'Select Users' button. This will take you to a separate screen that allows you to select the users you want to import, as shown in figure 3.12.3.

Figure 3.12.3 - Select Users to Import

This list excludes Super Administrator users, and any users that are already associated with a client record. Check the boxes next to the users you want to import, and click on the 'Import' toolbar button. If you have more than one page of users, you will have to do each page separately (easiest to set the number of records to display [using the dropdown at the bottom of the page] to 50 or more, and use the checkbox at the top on the title row to select all records, if required).

Importing from a CSV file

You can import client records from a CSV ("comma separated values") file, but you must be careful to follow the instructions provided by clicking on the 'Client CSV Import Help Text' link which you can get to by clicking on the help icon next to the 'Import CSV' button (the link opens a popup window which tells you what fields will be recognised and the format your file must adhere to). See figure 3.12.4 below.

Figure 3.12.4 - Accessing the Import Help Text

Tip: The CSV import feature can also be used to update client records, as well as to create new ones.

To import your file, click on 'Browse...' to select the CSV file on your computer, and click on 'Import CSV' to upload it and import the records.

Technical Note: When you import a CSV file, nBill will first try to locate an existing client record for each entry in the CSV file. If the CSV includes an 'id' column, the client record with that id will be updated. If there is no 'id' column, but there is an 'email_address' column, and a client already exists with that e­mail address, the client record with that e­mail address will be updated. If no existing client record is found, a new client record will be inserted.

If the CSV file includes a 'user_id' column, the client record will be associated with the Joomla! or Wordpress user record for that user id. If there is no 'user_id' column, but there is an 'email_address' column, and an existing user already has the same e-mail address, the client record will be associated with that Joomla! or Wordpress user.

If there is no 'user_id' column, and no existing user matches the record's e-mail address but there is a 'username' column and a 'password' column, nBill will create a new Joomla! or Wordpress user, and associate it with the client record. If the value in the 'password' column is 32 characters long and is capable of being base64 decoded (ie. it is alpha-numeric only), it will be assumed that the password is already MD5 hashed, and it will not be hashed again.

If a 'country' column is included, the value must be a valid 2-character ISO code. If no 'country' column is included, or the value is blank, the client record(s) will be set to the same country as the default vendor.

Export

To export your client list to a CSV file, simply click on the 'Download CSV' link. You cannot export your nBill client records directly to create Joomla! or Wordpress user records because each one needs its own unique username and password.

Tip: You can create Joomla! or Wordpress users based on your client records, either by editing the client records individually and selecting to create a new user for the client (which will prompt you for a username and password to assign to it), or by exporting your clients to a CSV file, adding username and password columns to it manually and populating them with the usernames and passwords you want to use, then importing the CSV file.