Aeon Alma Barcode Lookup System Addon

Aeon Alma Barcode Lookup System Addon

Name

Alma Barcode Lookup Addon

Version

1.1.0

Author

Atlas Systems, Inc.

Description

An addon that takes an item barcode, performs an item search against the Alma API, and imports its results.

Custom Fields Support

No

Developers

This addon is available for developers to modify and extend. Developers are encouraged to submit changes to this addon by forking the git repository from https://github.com/AtlasSystems/AlmaBarcodeLookup and creating a pull request.

Download

Configuration

Addon settings are configured in the Manage Addons form.

Setting

Default

Type

Description

Setting

Default

Type

Description

Alma API URL

 

String

The URL to the Alma API.

Alma API Key

 

String

API key used for interacting with the Alma API.

Allow Overwrite with Blank Value

True

Boolean

If turned on, empty values from the API response will overwrite any existing data. Note: Non-empty responses will always overwrite existing data.

Fields to Import

CallNumber, ISXN,

Title, Author,

Edition, Place,

Pages, and Publisher

String

This is a comma separated lists of the fields to import from the API response into the current product. The name of each field corresponds to the MappingName located in the DataMapping.lua file.

Field to Perform Lookup With

{Default}

String

This is the field in which the barcode is read from. You may specify a custom field or leave it as {Default} which will use the field outlined in DataMapping.lua.

The first value is the table in the database and the second value is the column.

Examples: {Default} (uses the field outlined in the DataMapping), Item.ItemBarcode, Transaction.ItemInfo1, or Transaction.Location

Data Mappings

Below are the default data mappings from the API response to Ares, Aeon, and ILLiad and the default location of the barcodes for each product. These data mappings can be changed in the DataMapping.lua file.

Caution

Be sure to backup the DataMappings.lua file before making modifications Incorrectly configured mappings may cause the addon to stop functioning correctly. 

FAQ

How to change the field that the barcode is read from?

The setting that determines the field that the barcode is read from is located in the addon's settings as "Field to Perform Lookup With". It takes in the word {Default} or the table name and the column name separated by a '.'.

By default it is {Default} which tells the addon to get the field from the DataMapping.lua file.

How to change the mappings of an API Lookup Response to Aeon, Ares, or ILLiad's field?

To modify the mappings in this addon, you must edit the DataMapping.lua file. Each mapping is an entry on the DataMapping.FieldMapping[Product Name] table.

Example data mapping table:

DataMapping.FieldMapping["Ares"] = {};
table.insert(DataMapping.FieldMapping["Ares"], {
MappingName = "CallNumber",
ImportField = "Item.Callnumber",
ObjectType = "item",
ObjectMapping = "call_number"
});

To modify the Aeon, Ares, or ILLiad field the API response item will go into, change the ImportField value to desired field. The ImportField formula is "{Table Name}.{Column Name}".

To modify the API response item to go into a particular Aeon, Ares, or ILLiad field, change the ObjectMapping value to the desired API XML node name.

How to change a mapping's name?

The mapping names can be modified to fit the desired use case. Just change the MappingName value to the desired name and be sure to include the new MappingName value in the "Fields to Import" setting, so the addon knows to import that particular mapping.

How to change the Default Barcode Field?

The default barcode field is defined in the DataMapping.BarcodeFieldMapping[{Product}] table within the DataMapping.lua file. To change the mapping, modify the respective variable to the "{Table}.{Column}" of the new field to be mapped to.

Addon Files

config.xml

The addon configuration file.

DataMapping.lua

The data mapping file contains mappings for the items that do not typically change from site to site.

AlmaLookup.lua

Handles the Alma-specific lookup logic

Main.lua

The Main.lua is the main file for the addon. It handles the initialization of the addon.

AlmaApi.lua

The AlmaApi file is used to make API calls against the Alma API

Utility.lua

The Utility file is used for common lua functions

LookupUtility.lua

Handles generic lookup logic that can be used between services

WebClient.lua

Used for making web client requests.