Tech Blog

Allow fulfillment staffs to access routing information.

Allow fulfillment staffs to access routing information.

Some library asked whether there is a possibility to show routing information to fulfillment staffs. The routing function in ALMA means the periodical is routed to some faculties or interested users in some sequence in library. If you don’t care fulfillment staffs to see the budget information in POL, you can allocate “Selector role” to fulfillment staffs. If you want fulfillment staff merely see grain level information from POL, such as routing information, not other contents, POL API may be the helpful way.

First step, you need to create an API key with Acquisition read only authority.  There are two POL APIs we use. The first one is “Retrieve PO-Lines” API by which you search for MMS id or other keyword to get POL number. The PHP code below gives the choice of searching for MMS id. If you have the requirements to search for other choices, such as title, it is easy to change the code. The 2nd one is “Get PO-Line” API which you search for POL number obtained/acquired by running “Retrieve PO-Lines” API, and receives the routing information affiliated with the corresponding POL number.

Hence, there are two search boxes in this PHP code, and 2 steps to get routing information. The first step is to search MMS id in first search box to get POL number and copy it. The 2nd step is to paste the POL number obtained from 1st step into the 2nd search box and get routing information.

The returned routing information is like below.

The only place which needs a change in codes (get_pol_no.php and get_pol_content.php) is that you need to put your institution’s API key into the appropriate place, like below.

Then, you put the files into Apache server and it will run. The codes and files are in GitHub

The code passed the test in Windows 7+ Apache2.4 + PHP 5.6.26 or above.

Good luck.

Leave a Reply