+1 (717) 461-8095 /+263 (775) 937-458 /+263 (777) 337 348 enquiries@bibliotechzw.com

Adding new patrons can be a pretty laborious and mind-numbing task, especially if you have hundreds or thousands of them. If you already have a list of library user details that you want to add as patrons in your library (for example, schools, colleges and universities usually have student registration lists readily available) you can use that existing list, with a few modifications of course.

In this tutorial we will show you how to import patrons into Koha easily.

Koha uses .csv files to import patron records into your system. If you have your patron details in an Excel (.xls or .xlsx) or OpenOffice Spreadsheet (.ods), you can edit the headings of your columns to match the Koha fields or use this Koha starter csv file KohaPatronImport_StarterCSV.csv which has the necessary fields already mapped out for you.

In this tutorial, we are going to show you how to import patrons using an existing Excel spreadsheet.

Screenshot 2016-06-07 11.22.09
  • Facebook
  • Twitter
  • LinkedIn

As you can see, our student record list has three columns (fields) – Student Surname, First Name and Title. But Koha uses different field names, which are as follows (all lower case):

‘title’, ‘surname’, ‘firstname’, ‘dateofbirth’, ‘initials’, ‘othernames’, ‘sex’, ‘relationship’, ‘guarantorid’, ‘streetnumber’, ‘streettype’, ‘address’, ‘address2’, ‘city’, ‘state’, ‘zipcode’, ‘country’, ‘phone’, ‘phonepro’, ‘mobile’, ’email’, ’emailpro’, ‘fax’, ‘B_streetnumber’, ‘B_streettype’, ‘B_address’, ‘B_address2’, ‘B_city’, ‘B_state’, ‘B_zipcode’, ‘B_country’, ‘B_phone’, ‘B_email’, ‘contactnote’, ‘altcontactfirstname’, ‘altcontactsurname’, ‘altcontactaddress1’, ‘altcontactaddress2’, ‘altcontactaddress3’, ‘contactname’, ‘contactfirstname’, ‘contacttitle’, ‘altcontactstate’, ‘altcontactzipcode’, ‘altcontactcountry’, ‘altcontactphone’, ‘cardnumber’, ‘branchcode’, ‘categorycode’, ‘sort1’, ‘sort2’, ‘dateenrolled’, ‘dateexpiry’, ‘opacnote’, ‘borrowernotes’, ‘userid’, ‘password’, ‘flags’, ‘gonenoaddress’, ‘lost’, ‘debarred’, ‘debarredcomment’, ‘smsalertnumber’, ‘privacy’,

So first, we have to rename our columns/fields to match the Koha field mapping. We change “Student Surname” to “surname”, “First Name” to “firstname” and “Title” to “title”.

Screenshot 2016-06-07 11.27.15
  • Facebook
  • Twitter
  • LinkedIn

But Koha requires other fields to be present before you import your patron list, namely ‘userid’, ‘branchcode’, ‘categorycode’ and ‘cardnumber’, where:

  • cardnumber is the patron’s permanent cardnumber. This must be a unique value. Our system already has cardnumbers up to 300, so we will start from 301.
  • categorycode (PT) is the category which you want to add your new patron to. Go to Home › Administration › Patron categories to see which category codes you have. The value you are looking for is under “Code”
  • branchcode (BIBL) is the code given to your particular library branch. Go to Home › Administration › Libraries and groups to find the value (under “Code”)
  • userid can be anything but it must be unique. In this case we are simply combining the patrons first name and surname to create the userid (Excel has a handy feature called “concatenate” which helps you to do this easily.

Add these fields into your csv file (column order doesn’t really matter).

Screenshot 2016-06-07 11.39.22
  • Facebook
  • Twitter
  • LinkedIn

That’s all you need in order to import your patron list into Koha. You can add extra fields (listed above) according to your library’s particular needs.

Now save the Excel file as a CSV (MS-DOS) file.

Screenshot 2016-06-07 11.41.35
  • Facebook
  • Twitter
  • LinkedIn

To import the file, do the following:

  • Go to Home › Tools › Import patrons
  • Under “Import Patrons” > “Select the file to import”, click “choose file”
  • Select the .csv file that you saved

Screenshot 2016-06-07 11.42.51
  • Facebook
  • Twitter
  • LinkedIn

  • Scroll down to the bottom of the page
  • If you want to update existing patrons (Koha will either use the cardnumber or userid to match patrons depending on your selection at the top of the page), then select “Overwrite the existing one with this”
  • Otherwise, leave it at the default selection, which is to ignore the incoming records

Screenshot 2016-06-07 11.43.39
  • Facebook
  • Twitter
  • LinkedIn

  • Click Import
  • If there are any errors in the file, Koha will show you which records had errors and were not imported.

Screenshot 2016-06-07 11.45.55
  • Facebook
  • Twitter
  • LinkedIn

And that’s it. A process that would have taken you hours and hours can be done within minutes!

Do you want to keep up to date with new tutorials? Subscribe for the latest updates and more! If you have any comments, questions or suggestions, leave a comment below!

 

Subscribe To Our Newsletter

Join our mailing list to receive the latest special offers and news updates from our team.

You have Successfully Subscribed!

Share This