Importing library patrons into Follett

Follett/Destiny has its own documentation on the process of importing patrons into its online database, which is not very helpful.

Below are instructions on how you actually do it, based on trial and error and various calls to customer service for more details on the process that aren't actually documented anywhere.

Getting the Site Short Name

First of all, log in as the administrator for your account and click on List all sites, and then select the site you want to import into.

Click Back Office, and then on the left side bar that appears, click Site Configuration. On the row of tabs, find and click Site Info.

You should find your site's Short Name there. You will need to note that name for later.

Here's where things get confusing.

Even though you'll see an Import Patrons option on the left sidebar, apparently (according to customer service) you're not supposed to use that to import patrons.

Creating the XML to upload, method 1

You may want to do method 2 first so you can see what an example XML file looks like, but once you do that, you can also just create the XML directly out of PowerSchool to save you steps (and so you don't need a Windows machine every time you want to do an export/import). Here's an example PowerSchool custom page that creates the XML. Obviously, tweak to suit your own school's needs.

Note that you may see in your web browser what appear to be extra spaces in the XML file. Once you download it to your computer and open it with a text editor, the spaces should be gone, though.

Creating the XML to upload, method 2

This is the long method, but you may want to do this at least once so you have a template for the shorter method mentioned above.

First, you want to create a .csv file like this:

Site Short Name,Barcode,District ID,Last Name,First Name,Middle Name,Nickname,Patron Type,Access Level,Asset Group,Status,Gender,Homeroom,Grade Level,Card Expires,Acceptable Use Policy on File,Is Teacher,User Defined 1,User Defined 2,User Defined 3,User Defined 4,User Defined 5,Graduation Year,Birth Date,User Name,Password,Email 1,Email 2,Address 1 Line 1,Address 1 Line 2,Address 1 City,Address 1 State,Address 1 Postal Code,Address 1 Phone 1,Address 1 Phone 2,Address 2 Line 1,Address 2 Line 2,Address 2 City,Address 2 State,Address 2 Postal Code,Address 2 Phone 1,Address 2 Phone 2
YOURSITESHORTNAME,ABUNCHOFUNIQUEBARCODES,,ALASTNAME,AFIRSTNAME,AMIDDLENAME,,,,,,F,,9,,,,,,,,,2021,20030101,SOMEUSERNAME,,SOMEEMAIL@YOURSCHOOL.EDU,,,,,,,,,,,,,,,
Obviously, fill it with real data. The YOURSITESHORTNAME would be the Short Name you looked up earlier, and that will be the same for all patron records. The bar codes should be unique. In theory, I think you can auto-assign them, but we had some issues with that, so just pick some unique IDs that are 14 characters or fewer (numbers work). Dates need to be in the YYYYMMDD format.

For some reason, though, you can't just straight upload the .csv—you have to convert it to XML first using a special converter application that runs only on Windows. You can find the converter in this bundle. In order for it to run, you'll have to download and install the latest Java.

When you launch up the converter, click the Browse button next to Choose CSV file to transform and find your .csv file.

You will likely have a header row (and should), so be sure to change Data begins on row to 2 instead of 1.

In the Field Mapping tab, you'll unfortunately have to manually map each field, even though your column headers match exactly what the Destiny field names are. Just pick the appropriate field for each one in the drop-down menu for the CSV Input Field column.

In the Patron Matching tab, select Site short name & Barcode for Math patrons using their.

Then click the Save button so you won't have to re-match the fields every time you want to do an upload.

Finally, click Run, and it will create an uploadable .xml file.

Uploading the XML

One more counterintuitive thing: you don't upload through your administrator login. There's a separate login just for importing, which you'll have to get from Follett/Destiny. Log in with that login and click on District. Then click on Back Office. On the sidebar, find and click on Update Patrons.

Then, next to Update File, click Choose File and find your .xml file. Click Update Patrons and then wait for the upload to finish. To check on the progress, continually click Job Manager (on the sidebar).

Avoiding a .csv error with PrinterGenerator

PrinterGenerator is one of the automated scripts for adding printers to Munki.

It's pretty cool—you just put together a .csv of your printers and their IP addresses, and then run the script on the .csv, and all the pkginfo files for the printers will generate.

I did run into one snag, though, which is using Office on a Mac to generate the .csv. I got this error:

_csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?

I found out from Stack Overflow that, apparently, saving as a .csv may generate that Python error, but if you save as a Windows Comma Separated (.csv), it works just fine.

Exporting a .csv of users out of Active Directory

Even though I found many tutorials on how to export Active Directory users from a group into a comma-separated values text file, none did exactly what I wanted (specify an organizational unit, get only the active users, get the first and last name and the email address out).

I had to do a little bit of trial and error (I'm not a PowerShell guru), but I ended up with this for a working PowerShell command:

get-aduser -searchbase "ou=organizationalunit,ou=organizationalunit,dc=domaincomponent,dc=domaincomponent" -filter 'enabled -eq $true' -properties department| select-object name,department,givenName,surname,userPrincipalName | export-csv c:\Users\username\Desktop\temp.csv

I believe there is an actual email or emailaddress or windowsemailaddress attribute, but the one, at least for our system, that gave me a usable email address (and not gobbledygook) was userPrincipalName. Your mileage may vary.

Google Maps’ “an error occurred, your last action was reverted” import error

If you're importing a .csv (or .xlsx) file into a Google Maps map, you may have seen an error like an error occurred, your last action was reverted.

Unfortunately, there doesn't seem to be official word on all the situations under which that happens and what the estimated timeframe is for a full fix (even if the functionality isn't fixed, a more informative error message would certainly help).

Here are a couple of threads on the matter:
Creating New Layer in My Maps "An error occurred, your last action was reverted"
Error Importing Spreadsheet: "An Error occurred, your last action was reverted."

I don't know that this will work for all or even most situations, but we had this come up here once, and the issue was selecting too many address/location fields.

So, if you've had experience checking all the fields and it working, sometimes it does appear to work. Other times, if you check all the fields... importtogooglemaps01
... you may later get this error before the import finishes... importtogooglemaps02

importtogooglemaps03
In our particular situation, checking only the box with the location/address appeared to make the error go away (and make the import successful).