Setting Up EDI Acquisitions

Introduction

Electronic Data Interchange (EDI) is used to exchange information between participating vendors and Evergreen. This chapter contains technical information for installation and configuration of the components necessary to run EDI Acquisitions for Evergreen.

Install EDI Scripts

The EDI scripts are "edi_order_pusher.pl" and "edi_fetcher.pl" and are used to "push" and "fetch" EDI messages for configured EDI accounts.

  1. As the opensrf user, copy edi_pusher.pl and edi_fetcher.pl from Open-ILS/src/support-scripts into /openils/bin:

    cp Open-ILS/src/support-scripts/edi_order_pusher.pl /openils/bin
    cp Open-ILS/src/support-scripts/edi_fetcher.pl /openils/bin
  2. Setup the edi_order_pusher.pl and edi_fetcher.pl scripts to run as cron jobs in order to regularly push and receive EDI messages.

    • Add to the opensrf user’s crontab the following entries:

      10 * * * * cd /openils/bin && /usr/bin/perl ./edi_order_pusher.pl > /dev/null
      0 1 * * * cd /openils/bin && /usr/bin/perl ./edi_fetcher.pl > /dev/null
    • The example for edi_order_pusher.pl sets the script to run at 10 minutes past the hour, every hour.

    • The example for edi_fetcher.pl sets the script to run at 1 AM every night.

You may choose to run the EDI scripts more or less frequently based on the necessary response times from your vendors.

EDI Components

There are required settings and components in various parts of the client.

-Library SAN codes

Entered as part of the library’s address (Administration → Server Administration → Organizational Units).

-Vendor/Provider SAN codes

Entered as part of the Provider configuration (Administration → Acquisitions Administration → Providers).

-EDI Accounts and Attribute Sets

Set up in the EDI Accounts interface (Administration → Acquisitions Administration → EDI Accounts).

-EDI Messages

Created from Purchase order, and can be viewed from the Purchase Orders interface (Acquisitions → Purchase Orders)

Please see the EDI documentation for information about setting up EDI components and configuration on the client side.

Troubleshooting

Failure to Transmit EDI Messages to Vendor

To generate EDI messages, all of the following conditions must be met:

  1. The edi_order_pusher.pl script must be set up in the cron tab (see above), or run on the command line.

  2. PO must be activated.

  3. PO provider must be active.

  4. PO must use a provider that supports EDI delivery (via edi_default)

  5. EDI account linked to provider must have 'use_attrs' set to true.

  6. PO must have no EDI ORDERS messages attached or, if it does, the message has a status of "retry".

Ensure all of the above is true. If messages are generating, but not being transmitted to the vendor, check the EDI message for any details about the error.

Resending EDI Messages

If an error with an EDI account is found and corrected, the message status can be changed to "retry" from Acquisitions → Purchase Orders → EDI Messages. The edi_order_pusher.pl script will push the order the next time it runs, or the script can be run in the command line.