Conceptual gap in two disjunctive APIs for availability and user action
Dies ist die Engllsche Version der Seite: Konzeptionale Lücke bei zwei disjunkten Schnittstellen zu Verfügbarkeit und Nutzer*in-Interaktion
Abstract
Currently, FOLIO provides two disjunctive APIs for discovery systems:
- edge_rtac: for item related availability
- edge_patron: for patron actions
The basic axioms are:
- Availability is a binary property that can be derived exclusively from the properties of the media.
- The user functions do not require any information other than availability. If nevertheless, the search APIs should handle this.
During the discussion of real-world challenges in the discovery sub-group, it was quickly clear that these axioms were not sufficient. There are use cases where availability is also limited by the properties of the patron. It was also realized that 'availability' is not really binary, and that there is a need for context.
This gap is documented here. On the basis of an example, different approaches will be discussed.
Related FOLIO tickets
- UXPROD-2422 (Discovery Integrations - Expose Circulation Rules Regarding Requests)
- UXPROD-2758 (Discovery Integrations - Expose Circulation Rules Regarding Renewal Options)
- UXPROD-1630 (Pre-Check Request Policy When Requests are Created and/or Moved)
Generic example
Environment
- A small library has two types of readers and all media are stored in closed stacks.
- Some of the media may be ordered by all readers, some only by group 'A' and others only by group 'B'.
- The library has a discovery system that does not require an initial registration.
Challenge
The discovery system should offer meaningful action elements (buttons) in two modes of operation.
- Without prior registration (patron is unknown) There are four possibilities of display:
- The copy is basically not available. (Info text for the reason: e.g. ordered, lost, ...)
- The copy is available and may be ordered by all patrons. (Button: "Please register and order")
- The copy is available but on loan. (Button: "Please register, reservation possibly possible")
- The copy is available but may only be ordered by one patron group. (Button: "Please register, ordering may be possible")
- With prior registration (patron is known) there are again several options:
- The copy is basically not available. (Info text for the reason e.g. on buy, lost, ...)
- The copy is available and
- the patron's group has the authority to place a hold. (Button: "order")
- the patron's group has no authority to place a hold. (Info text: ...)
- The copy is available but on loan and
- the patron's group has the authority to place a hold. (Button: "reserve")
- the patron's group has no authority to place a hold. (Info text: ...)
Task
For the first case of the example, an extended¹ edge_rtac should sufficient.
¹) Currently there is no information about the limitations/restrictions of the general availability available.
In the second case, however, it is necessary to include knowledge about the patron. The full set of circulation rules has to be evaluated.
Currently neither edge_rtac nor edge_patron are able to fulfill the requirement.
Possible approaches
edge_rtac and edge_patron are designed to be distinct. There should be no overlap between the APIs. As demonstrated in the example
above, this cannot be always sustained. In this paragraph we discuss how to handle the need to combine attributes of objects and patrons.
Introduction of an additional API (For example edge_patron-rtac)
It seems obvious to add a new API. The advantage is that edge_rtac and edge_patron may stay unchanged. On the other hand every new interface brings new
complexity. Such an additional interface would have a lot of overlaps with edge_rtac and edge_patron. So edge_rtac and edge_patron it could be hard to decide which API to use. Also that third API may lead to produce duplicate code.
Extension of the availability information (edge_rtac)
To consider the patron's properties edge_rtac needs to know the login. On the other hand, edge_rtac has to work without the login.
This would result in two different working modes for edge_rtac: "Without login → vague information" vs. "With login → exact information".
The second mode would be quite similar to the third API discussed above. But as apart of edge_rtac the design would be comprehensible.
This approach has two disadvantages:
- edge_rtac becomes bloated
- If the discovery system handles login in a popup window, some pages will need to be refreshed after login, as the availability information displayed may be out of date.
Extension of the user interaction (edge_patron)
In contrast to edge_rtac, edge_patron already needs to handle with patron and item.but adding the same functionality here would have no advantage. It would still require two modes:
- Before login: fetch the exact availability information via edge_rtac
- After login: fetch the exact availability information via edge_patron
Partitioned expansion of both APIs
The non-overlapping design of edge_rtac and edge_patron can be preserved if both APIs are slightly extended in their context.
* edge_rtac should extend the basic availability with additional information about restrictions and extensions of the availability, Even for attributes that depend on user groups, edge_rtac does not need to know the login. It should be enough to make the API more talkative and return as much lending-relevant information as possible.
* edge_parton should provide a mock order function to query each patron's state,
individual restrictions (lock, ...) and individual options (pickup location, ...).
The concept of a mock order can be taken from the basically similar API 'PAIA'.. The procedure is as follows:
- When the patron wishes to place a hold, the discovery system sends an incomplete request to edge_patron (e.g. no pick-up location). This triggers a dummy order in the circulation module. This mock should not write anything, but should evaluate all circulation rules and return the detected restrictions/options. (Subset of possible pick-up locations, possible delivery options, individual restrictions, ...).
- The discovery system generates a dialogue box with the result of the dummy request to:
- inform the reader patron why the order/registration is not possible for you. (e.g. blocked due to too many open charges).
- allow the patron to select the order parameters (pick-up location, delivery option, acceptance costs, ...)
- With the additional information the discovery system can send a complete request to the API. This will trigger a regular order attempt.
- The discovery system displays a feedback with the status of the order.
The current behavior of edge_patron is already likely. Currently, at least the 'pickup location id' parameter is required to place a hold. Without it, edge_patron responds with an error message. At this point, a dummy order could be included. At this point an mock order could be included
(Currently such a mock order is not yet supported by FOLIO, bur requested -> Tickets).
Summary
Even though all sketched approaches are possible in principle, the first three possibilities seem to be inconsistent.
- An additional API would confuse more than help.
- The extension only of 'edge_rtac', would disturb the flow in the discovery system
- Extending only 'edge_patron' would blur the clear separation to edge_rtac.
In contrast, the partitioned extension of both APIs fulfills the requirements without logical breaks.
Appendix
More application examples
Of course, there are many other real library challenges besides the example above that need to be covered with the approach discussed above. In the
following, further basic examples are outlined and it is examined whether the solution described above is sufficient.
Remote locations 1
Environment
- A library has two library locations.
- Local stock should not be able to be ordered.
- Stock from site 'A' should be able to be ordered to site 'B'.
- Stock from site 'B' should be able to be ordered to site 'A'.
- The library has a discovery system that does not require registration for research.
Discussion
This example is only item depended. But still it has two aspects:
- edge_rtac
The discovery system needs the information, that ordering is limited by location ("not local"). - edge_patron
The mock order returns only issue pickup locations from other locations like that of the item. (a use case of UXPROD-2689)
Remote locations 2
Framework
- In a departure from the previous example, there is a privileged group that is also allowed to order locally.
- Additionally, there is a third group that is allowed to order locally for a handling fee.
Discussion
edge_rtac
Orderability should be specified as a property of the group.possible response{"limitations": [ {"place" [ {"ordinary patrons": "non local"}, {"privileged patrons": "also local"}, {"payer": "local for money"} ]} ]}
Note: The example above isn't a realistic goal. But providing all non classified attributes and notes of holding, location and item might be sufficient. The discovery system should be able to identify the cases.
edge_patron
Returns the usable pickup locations.
Returns the amount of the fee a 'payer' could by accept.
Reading room
Environment
- A library has a collection mandate. Media not leave the building, but may be consulted.
- Some items are stored in closed stacks. They can only be read in special reading rooms. During the loan period, the items are kept there and reserved for the patron.
- There is a trusted group of customers who can order to any pick-up location in the house.
Discussion
edge_rtac
Orderability should be specified as a property of the group.possible response{"limitations": [ {"place" [ {"ordinary patrons": "only reading rooms"}, {"trusted patrons": "only for in house use"}, ]} ]}
- edge_patron
Returns the usable pickup locations
Short-term loan
Environment
- Some items (e.g. textbooks) may have a shorter loan period than usual.
Discussion
edge_rtac
Indicate the shortened lending timepossible response{"limitations": [ {"shortened loan period" [ {"ordinary patrons": "3d"}, {"privileged patrons": "5d"}, ]} ]}
- edge_patron
Returns the usable pickup locations.