Skip to content

UCSCLibrary/alma-letters

 
 

Repository files navigation

Alma Letters

Customized XSL letter templates for Ex Libris Alma, forked from cuny-libraries/alma-letters

CLI Tool

This repository includes a command-line tool to sync letters between your local files and Alma via the Configuration API.

Installation

pipx install .

Configuration

Create a .env file from the template:

cp .env.example .env

Add your API keys (read/write access to Configuration API required):

ALMA_API_KEY_SANDBOX=your_sandbox_key
ALMA_API_KEY_PRODUCTION=your_production_key
ALMA_REGION=na

Available regions: na, eu, ap, aps, ca, cn

Commands

Export letters from Alma:

alma-letters

Push changes to Alma:

alma-letters push --env sandbox      # Test in sandbox first
alma-letters push --env production   # Requires confirmation

View available letters:

alma-letters --debug

Configuration Files

  • letters.txt — Letter codes to sync (one per line)
  • components.txt — Component codes to sync (one per line)

Lines starting with # are comments.

Resources

Letters with non-obvious codes

Letter Code Letter Name
Borrowing Activity Letter FulUserBorrowingActivityLetter
Courtesy Letter FulUserLoansCourtesyLetter
Loan Receipt Letter FulLoanReceiptLetter
Loan Status Notice FulItemChangeDueDateLetter
On Hold Shelf Letter FulPlaceOnHoldShelfLetter
On Hold Shelf Reminder Letter FulOnHoldShelfReminderLetter
Overdue Notice Letter FulUserOverdueNoticeLetter
Return Receipt Letter FulReturnReceiptLetter

Identifying a letter code

To get the letter code in Alma, navigate to Configuration > General > Letters Configuration. Then find the letter and click on its title to open the edit screen. Now click on the Letter Examples button near the top of the modal window. If the list only includes "DefaultLetter.xml", then click the Add from system letters button and pick from any option you see. The name of the example in the list (other than DefaultLetter.xml) is the Alma system code for the letter.

Ex Libris Documentation

Community

Technical

About

Repository of Alma letter templates used at the UCSC Library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • XSLT 94.0%
  • Python 6.0%