Phonelist.pm Module

Introduction

PhoneList.pm is a mod_perl module for Apache that works with Evergreen to generate callings lists for patron holds or overdues. It outputs a csv file that can be fed into an auto-dialer script to call patrons with little or no staff intervention. It is accessed and configured via a special URL and passing any parameters as a Query String on the URL. The parameters are listed in the table below.

Table 1. Parameters for the phonelist program:

user

Your Evergreen login. Typically your library’s circ account. If you leave this off, you will be prompted to login.

passwd

The password for your Evergreen login. If you leave this off you will be prompted to login.

ws_ou

The ID of the system or branch you want to generate the list for (optional). If your account does not have the appropriate permissions for the location whose ID number you have entered, you will get an error.

skipemail

If present, skip patrons with email notification (optional).

addcount

Add a count of items on hold (optional). Only makes sense for holds.

overdue

Makes a list of patrons with overdues instead of holds. If an additional, numeric parameter is supplied, it will be used as the number of days overdue. If no such extra parameter is supplied, then the default of 14 days is used.

The URL is

A couple of examples follow:

The above example would sign in as user circuser with password of password and get a list of patrons with holds to call who do not have email notification turned on. It would run at whatever branch is normally associated with circuser.

The above example would do more or less the same, but you would be prompted by your browser for the user name and password.

If your browser or download script support it, you may also use conventional HTTP authentication parameters.

The above logs in as user with password and runs overdues for location ID 2.

The following sections provide more information on getting what you want in your output.

Adding Parameters

If you are not familiar with HTTP/URL query strings, the format is quite simple.

You add parameters to the end of the URL, the first parameter is separated from the URL page with a question mark (?) character. If the parameter is to be given an extra value, then that value follows the parameter name after an equals sign (=). Subsequent parameters are separated from the previous parameter by an ampersand (&).

Here is an example with 1 parameter that has no value:

An example of 1 argument with a value:

An example of 2 arguments, 1 with a value and 1 without:

Any misspelled or parameters not listed in the table above will be ignored by the program.

Output

On a successful run, the program will return a CSV file named phone.csv. Depending on your browser or settings you will alternately be prompted to open or save the file. Your browser may also automatically save the file in your Downloads or other designated folder. You should be able to open this CSV file in Excel, LibreOffice Base, any other spread sheet program, or a text editor.

If you have made a mistake and have mistyped your user name or password, or if you supply a ws_ou parameter with an ID where your user name does not have permission to look up holds or overdue information, then you will get an error returned in your browser.

Should your browser appear to do absolutely nothing at all. This is normal. When there is no information for you to download, the server will return a 200 NO CONTENT message to your browser. Most browsers respond to this message by doing nothing at all. It is possible for there to be no information for you to retrieve if you added the skipemail option and all of your notices for that day were sent via email, or if you ran this in the morning and then again in the afternoon and there was no new information to gather.

The program does indicate that it has already looked at a particular hold or overdue and will skip it on later runs. This prevents duplicates to the same patron in the same run. It will, however, create a duplicate for the same patron if a different item is put on hold for that patron in between two runs.

The specific content of the CSV file will vary if you are looking at holds or overdues. The specific contents are described in the appropriate sections below.

Holds

The phonelist program will return a list of patrons with items on hold by default, so long as you do not use the overdue parameter. You may optionally get a number of items that patron currently has on hold by adding the addcount parameter.

As always, you can add the skipemail parameter to skip patrons with email notifications of their overdues, see Skipping patrons with email notification of holds as described below.

Table 2. Columns in the holds CSV file:

Name

Patron’s name first and last.

Phone

Patron’s phone number.

Barcode

Patron’s barcode.

Count

Number of items on hold, if addcount parameter is used, otherwise this column is not present in the file.

Overdues

If you add the overdue parameter, you can get a list of patrons with overdue items instead of a list of patrons with items on the hold shelf. By default, this will give you a list of patrons with items that are 14 days overdue. If you’d like to specify a different number of days you can add the number after the parameter with an equals sign:

The above will retrieve a list of patrons who have items that are 21 days overdue at the location with ID of 2.

The number of days is an exact lookup. This means that the program will look only at patrons who have items exactly 14 days or exactly the number of days specified overdue. It does not pull up any that are less than or greater than the number of days specified.

As always, you can add the skipemail parameter to skip patrons with email notifications of their overdues, see Skipping patrons with email notification of holds as described below.

Table 3. Columns in the overdues CSV file:

Name

Patron’s name first and last.

Phone

Patron’s phone number.

Barcode

Patron’s barcode.

Titles

A colon-separated list of titles that the patron has overdue.

Skipping patrons with email notification of holds

Skipping patrons who have email notification for their holds or overdues is very simple. You just need to add the skipemail parameter on the URL query string. Doing so will produce the list without the patrons who have email notification for overdues, or for all of their holds. Please note that if a patron has multiple holds available, and even one of these holds requests a phone-only notification, then that patron will still show on the list. For this option to exclude a patron from the holds list, the patron must request email notification on all of their current holds. In practice, we find that this is usually the case.

Using the ws_ou parameter

Generally, you will not need to use the ws_ou parameter when using the phonelist program. The phonelist will look up the branch where your login account works and use that location when generating the list. However, if you are part of a multi-branch systems in a consortium, then the ws_ou parameter will be of interest to you. You can use it to specify which branch, or the whole system, you wish to search when running the program.

Automating the download

If you’d like to automate the download of these files, you should be able to do so using any HTTP programming toolkit. Your client must accept cookies and follow any redirects in order to function.