Rules for Self Booking

The Rules for Self Booking file contains the logical rules that determine whether a title can be self-booked by patrons. You can choose to allow patrons to self-book from WebPAC, from Course Reserves, or both. Rules can be based on information in the bibliographic or item record. For example, a library could permit self-booking only for titles with an ITYPE of '6' or location "resv".

In the character-based system, the option to book is offered as a menu choice. In WebPAC, the option to book appears by titles that are self-bookable per the Rules for Self Booking file.

The system checks the bibliographic record and all of its attached items against the rules in the Rules for Self Booking file. By default, no items are eligible for self-booking. If the bibliographic record and at least one item record test true for all rules, the system offers the option to book.

Checking the Loan Rule

After the system verifies that a self booking is not blocked by the Rules for Self Booking file, the system checks the following elements of the applicable loan rule to determine whether or not the patron can place the booking.

BOOKABLE
This element must be set to 'Y'.
CODE
This element cannot be set to 'A' (Absolute) or 'N' (Non-circulating).

If the loan rule meets these conditions, the system allows the self booking.

Data Elements

The file consists of one or more optional triggers, followed by the rule lines.

Triggers

Triggers control global aspects of self-booking, including the maximum number of titles that a patron can self-book and the system functions in which self-booking is to be offered. Triggers must be entered exactly as described below. Each trigger begins with the '@' character and appears complete on a line by itself. Use lowercase letters with no internal spacing and do not insert line breaks into the body of any trigger or its argument. Triggers should be the first elements in the Rules for Self Booking file.

@max_self_booking=<n>

This trigger specifies the maximum number of titles a patron is allowed to self-book at any one time. If the value is '0', then the self-booking menu option is never offered to patrons. The maximum value of the @max_self_booking trigger is "400".

@max_item_booking=<n>

This trigger specifies the maximum number of self-bookings the system allows a single patron to place on the same item. The trigger's value must be less than or equal to the value of the @max_self_booking trigger. If the trigger is not present in the Rules for Self Booking file, then the system behaves as if it were set to '1' (a patron can self-book a given title only once).

Maximum Number of Self-Bookings

The system limits self-booking to a maximum of 400 titles per patron. The @max_self_booking and @max_item_booking triggers must be set to a value of "400" or less.

@self_booking=<applications>

Specifies which application(s) offer the self-booking feature. This can be any combination of the following:

webpac Self-booking is offered in WebPAC
reserve Self-booking is offered in Course Reserves

To offer self-booking in more than one of these applications, separate each application name by a comma (e.g., @self_booking=reserve,webpac).

@max_item_booking_include_all_items=<true>

If this trigger is set to "true", the @max_item_bookings trigger specifies the maximum number of self-bookings a patron is allowed to place on the same title for all item records attached to the title's bibliographic record.

@max_item_booking_exclude_current=<true>

If this trigger is set to "true", the @max_item_bookings trigger does not include currently booked items towards the patron bookings count.

Rule Lines

The rules are read from the beginning of the file, continuing to the end. As the system reads each rule, if any of the associated records does not meet the conditions in that rule (i.e., the rule "tests false"), then the title cannot be self-booked. If all rules in the Rules for Self Booking file "test true" for all associated records, the title can be self-booked.

A maximum of thirty rules can appear in this file. Any combination of single and multiple line rules can count toward this maximum.

The structure of a rule line is:

      q|i||97| |~|r||IMESSAGE = 'in repair', not bookable.
      | || |  | | || |
      | || |  | | || `---  Comment
      | || |  | | |`---  Target2
      | || |  | | `---  Target1
      | || |  | `---  Operation Type
      | || |  `---  Rule
      | || `---  Fixflds Line#
      | |`---  Variable Tag
      | `---  Record Type
      `---  Logic Operator

Logic Operator

Contains a single character that controls the grouping of adjacent lines into one rule.

Possible values are:

Element
Value
Meaning
^ The condition on this line is ANDed with the condition on the following line.
v The condition on this line is ORed with the condition on the following line.
q Denotes the last line of the rule (i.e., quit).

Record Type

The type of record to which the rule applies. All condition lines for a given rule must contain the same record type, which can be one of the following:

Element
Value
Record Type
b bibliographic
i item

Variable Tag

Used for testing variable-length fields only. Specifies the field group tag of the variable-length field to test. This element is NULL or BLANK if the tested field is a fixed-length field.

  • To test a specific MARC tag within the field group, enter it into the Rule element.
  • If the record contains only MARC fields, a particular MARC field can be specified by entering M in the Variable Tag element and the MARC tag and, optionally, indicators into the Rule element.
  • See the list of Special Field Codes for information on additional fields that can be specified in this element.
NOTES
  • The Variable Tag element is rarely used in a self-booking rule. These rules are almost exclusively based on fixed-length field values, using the Fixflds Line# element.
  • Because self-booking is always used to book item records, the LINK REC field (tag '^') is not used. If no items are attached, the title is automatically excluded from self-booking.

Fixflds Line#

Used for testing fixed-length fields only. Specifies the line number of the fixed-length field in the fixed-length fields file. You can determine the number of a particular fixed length field by viewing the list displayed in the Long names for fixed length fields file. This element is NULL or BLANK if the tested field is a variable-length field.

Rule

If the Variable Tag element contains an III tag, this element can contain further specifications about the variable-length field to be tested; otherwise it is NULL or BLANK.

Values that can appear in this element are:

  • If the rule is testing a variable-length field, this element can contain a specific MARC tag with optional indicators in the form xxxii, where xxx is the MARC tag and ii is the optional MARC tag indicators (e.g., 04101). Only the specified MARC tag/indicator field will be tested.
  • If the record contains only MARC fields, a specific MARC tag can be tested by entering M in the Variable Tag element and the MARC tag with optional indicators into the Rule element (in the same xxxii format detailed above). Note that this cannot be used to test variable-length fields in records that contain a mix of MARC and non-MARC fields (for example, item records).

Operation Type

Logic that the data in the specified tag must meet for the rule to "test true". This defines the relationship that must exist between the data in the specified field in the tested record and the value(s) in the Target1 and Target2 elements that follow. Possible values are:

Operator Description
= Equal to
g Greater than or equal to
> Greater than
< Less than
l Less than or equal to
~ Not equal to
w Between
h Has
e Exists
n Does not exist

For all operation types other than w (between), the value against which to test the field is contained in the Target1 element. For the w operation type, the field's value must be between the values in the Target1 and Target2 elements.

Target1

Value against which to test the field. If this element is NULL, then the self-booking is denied if the field in the Variable Tag or Fixflds Line# element does not exist in the tested record. Wildcards are not supported.

Target2

Used with the w (between) operator only to specify the second value for the Variable Tag or Fixflds Line#. This element is NULL for other operators. Wildcards are not supported.

Comment

The system ignores any text in this element. This is used to enter comments into the rule line.

Editing the Rules for Self Booking File

  1. In the Select file drop-down menu in the ASAA function, choose Rules for Self Booking and then Select.
  2. See About the Rule Files for information on editing rule files.
  3. Enter your changes.

    Before saving changes to the Rules for Self Booking file, review Tips for Editing Rule Files to make sure your changes are correctly formatted and error-free.

  4. Choose OK.
  5. Select the Save tool to save your changes.

The system automatically restarts the automatic processing of patron requests program and all WebPAC servers running on your Innovative machine(s) after you save your changes.

Annotated Examples

Single Line Rule

Allow self-booking request if the item STATUS is '-' (Available). Another way of stating this rule is deny self-booking request if the item STATUS is not '-' (Available):

q|i| |88||=|-||Only titles that are available can be booked

Data Element Value Meaning
Logic Operation q Last line of rule
Record Type i Test the item record
Variable Tag BLANK Unused for this rule
Fixflds Line# 88 Test fixed-length field 88 (STATUS)
Rule NULL Unused for this rule
Operation Type = Field must equal the value in the Target1 element to allow the self-booking request
Target1 - Value that will allow the request (Available)
Target2 NULL Unused for this rule
Comment ..... Comment—Does not display to the user

Multiple Line Rule

Allow self-booking if the item LOCATION is "mres" or "moff". Another way of stating this rule is deny self-booking if item LOCATION is not "mres" or "moff":

v|i| |79||=|mres||
q|i| |79||=|moff||Cannot book titles from this location

Line One

Data Element Value Meaning
Logic Operation v OR this line with the next line
Record Type i Test the item record
Variable Tag BLANK Unused for this rule
Fixflds Line# 79 Test fixed-length field 79 (LOCATION)
Rule NULL Unused for this rule
Operation Type = Field must equal the value in the Target1 element to allow the self-booking request
Target1 mres Value that will allow the request
Target2 NULL Unused for this rule
Comment ..... Comment—Does not display to the user

Line Two

Data Element Value Meaning
Logic Operation q Last line of rule
Record Type i Test the item record
Variable Tag BLANK Unused for this rule
Fixflds Line# 79 Test fixed-length field 79 (LOCATION)
Rule NULL Unused for this rule
Operation Type = Field must equal the value in the Target1 element to allow the self-booking request
Target1 moff Value that will allow the request
Target2 NULL Unused for this rule
Comment ..... Comment—Does not display to the user

Additional Examples

Allow self-booking for items whose LOCATION code is not "jama" or deny self-booking for items whose LOCATION code is "jama":

q|i| |79||~|jama||titles from this location cannot be self-booked.

Allow self booking if the item ITYPE is "58" or "59" and deny it if the item ITYPE is any other value:

v|i| |61||=|58||
q|i| |61||=|59||Only items with these item types can be self-booked.

Allow self booking if the item STATUS is not 'm', '$', 's', 'z', or 'n':

^|i| |88||~|m||
^|i| |88||~|$||
^|i| |88||~|s||
^|i| |88||~|z||
q|i| |88||~|n||No booking on missing/lost items.

Self-Booking of Non-Circulating Titles

Some libraries offer non-circulating titles for booking and keep track of in-library usage with Internal Use Counts. In this case, the library would not block on STATUS 'o'.