Troubleshooting ISBNs/LINs for EDI Orders

Troubleshooting ISBNs/LINs for EDI Orders

This article explains how to ensure that Koha sends the correct ISBN in EDI orders when your library is ordering a title whose bib has multiple ISBNs. Issues with ordering the correct ISBN can arise for libraries who catalog all volumes of a manga or graphic novel on the same bib, when hardcover and paperback versions of a title are on the same bib, when a title has multiple editions that are on the same bib, or when ordering as part of a consortium with shared bibs. 

EDI orders in Koha

Order identifiers

EDI orders need to include an identifier for each title your library wants to order. In EDIFACT messages, this is called the LIN. The LIN tells your vendor exactly what you want to order, and is a 'container' for additional order information like quantity, price, and item details:


InfoIn most cases, vendors use the ISBN (020$a) as the LIN. Some vendors use an internal product ID as their LIN/order identifier, and media such as serials or DVDs will use 022$a or 024$a. The workflow discussed here can also apply to orders that require identifiers other than the ISBN, but for simplicity's sake, this article will use ISBN as a generic term for any order identifier.

By default, Koha sends the first ISBN/020$a on the bib as the order identifier. This works when there is only one ISBN/020$a on a bib, but it can cause problems when there are multiple 020$a entries. For instance, consider a library that wants to order volume 30 of this title:


By default, Koha will send the first 020$a as the LIN, but that would tell the vendor that the library wants to order volume 1, not volume 30.

Order files and ISBNs

MARC order files from your vendor will contain the ISBN you want to order, but that doesn't guarantee that the correct ISBN will be sent as your LIN/order identifier. When you import a vendor's order file to create a basket in Koha, one of two scenarios will occur:
  1. If the bib does not exist in your catalog, you will import the vendor's bib. In this case, the ISBN/020$a from their order file is the only 020$a in the bib, so that will be sent (correctly) as the order identifier.
  2. If the bib in the vendor's order file matches a bib that already exists in your catalog, most libraries don't overlay it with the vendor's bib, since generally the existing bib is more fully cataloged. This means that the ISBN/020$a included in the order file is not guaranteed to be the first 020$a in the bib, and since Koha will send the first 020$a, the actual ISBN you mean to order may not be what is sent in the LIN.

Sending the correct ISBN

Using a combination of system preference and plugin settings, Koha can send the LIN/order identifier from an alternate item-level field instead of sending the first ISBN/020$a from the bib. This works as follows:
  1. Vendor grids are updated so that the ISBN you need to order is included in a designated item-level field (in addition to 020$a in the bib) mapped in the system preference MARCItemFieldsToOrder.
  2. When you import order files, the ISBN is placed in the designated item field based on your settings in MARCItemFieldsToOrder. Even when a bib in your order file matches an existing bib in your catalog, the item information for that order line is imported.
  3. When Koha sends your order, it sends the LIN/order identifier from the designated item field instead of using the first ISBN/020$a in the bib.

Setup

Alert
If you are part of a consortium with libraries who also use EDI, make sure to discuss any plugin and system preference changes with other libraries. Changes to the plugin and MARCItemFieldsToOrder system preference will affect all libraries who use EDI on your Koha instance. 
  1. Check existing plugin settings
    First, open the plugin for the vendor in question from Administration > Manage plugins, and scroll to the 'LIN from item fields' section under the 'LIN values' header:


    Depending on when you started using EDI in Koha, you may already have values in 'LIN from item field':
    1. If 'Item field' contains a field name such as coded_location_qualifier, copynumber, or itemnotes_nonpublic, note the field name for next steps.
    2. If 'Item field' is blank, continue to step 2.
  2. System preference setup
    In Administration > System preferences, search for the
    MARCItemFieldsToOrder preference. It will look similar to this:

    Refer to what you learned in step 1:
    1. If 'Item field' contained a field name in the plugin, find the corresponding field in this system preference, and note the tag and subfield to which it is mapped. 
      IMPORTANT: Be aware that field names can differ slightly between the plugin settings and this system preference. If the plugin has 'copynumber', find 'copyno' in the system preference. If the plugin has 'itemnotes_nonpublic', look for 'nonpublic_note' here.
    2. If 'Item field' did not contain a field name, identify an item field that is mapped in MARCItemFieldsToOrder but which your library is not using, and note the tag/subfield to which it is mapped. Or, if you are using all already-mapped fields, identify a field that is not currently mapped in MARCItemFieldsToOrder from the list in the system preference, and map it to an unused subfield in the 9xx tag you're using for item/order information. 

      This example will use
      coded_location_qualifier: 970$f for the remaining setup steps, but your library can use any item field that meets the criteria above.

  3. Update vendor grids
    In your vendor grid for order files, add an entry for the tag/subfield noted in step 2, and ask your vendor to include the ISBN in that field in addition to 020$a.

  4. Update plugin (if applicable)
    IF 'ITEM FIELD' HAD A VALUE IN STEP 1: Continue to step 5.

    IF 'ITEM FIELD' WAS BLANK IN STEP 1: Once your vendor confirms that they will include the ISBN in the designated 9xx field per your grid update, return to the plugin and update it as follows:
    1. In 'Item field', add the database schema name for your designated item field chosen in step 2b. 
      IMPORTANT:  Use 'copynumber' if you used 'copyno' in the system preference, and 'itemnotes_nonpublic' if the system preference has 'nonpublic_note'. If you are unsure of the schema name for an item field, confirm it here.
    2. In 'Qualifier', enter EN.
    3. Check 'Clear field during invoicing' if you would like this field to automatically clear when Koha imports EDI invoices.

      Using the 
      coded_location_qualifier: 970$f  example, the plugin would look like this:

  5. Testing
    Now you are ready to test! We recommend testing with one or two titles in case any adjustments are necessary.
    1. Identify a title you need to order that 1) already exists in your catalog and 2) has multiple ISBNs/020$a entries.
    2. Verify that the ISBN you are ordering is not the first ISBN/020$a on the bib.
    3. From here, use your typical order workflow - download your order file from the vendor, add the file to a basket in Koha, and place the EDI order.
    4. Verify with your vendor that they received the correct ISBN. If they did, you are done! If they did not, please submit a ticket with the basket name and MARC order file, and we will be happy to assist with troubleshooting.