1 Setting Up EDI Acquisitions
2 ---------------------------
7 Electronic Data Interchange (EDI) is used to exchange information between
8 participating vendors and Evergreen. This chapter contains technical
9 information for installation and configuration of the components necessary
10 to run EDI Acquisitions for Evergreen.
15 Install EDI Translator
16 ^^^^^^^^^^^^^^^^^^^^^^
18 The EDI Translator is used to convert data into EDI format. It runs
19 on localhost and listens on port 9191 by default. This is controlled via
20 the edi_webrick.cnf file located in the edi_translator directory. It should
21 not be necessary to edit this configuration if you install EDI Translator
22 on the same server used for running Action/Triggers events.
25 If you are running Evergreen with a multi-server configuration, make sure
26 to install EDI Translator on the same server used for Action/Trigger event
31 1. As the *opensrf* user, copy the EDI Translator code found in
32 Open-ILS/src/edi_translator to somewhere accessible
33 (for example, /openils/var/edi):
36 --------------------------------------------------
37 cp -r Open-ILS/src/edi_translator /openils/var/edi
38 --------------------------------------------------
39 2. Navigate to where you have saved the code to begin next step:
45 3. Next, as the *root* user (or a user with sudo rights), install the
46 dependencies, via "install.sh". This will perform some apt-get routines
47 to install the code needed for the EDI translator to function.
48 (Note: subversion must be installed first)
54 4. Now, we're ready to start "edi_webrick.bash" which is the script that calls
55 the "Ruby" code to translate EDI. This script needs to be started in
56 order for EDI to function so please take appropriate measures to ensure this
57 starts following reboots/upgrades/etc. As the *opensrf* user:
63 5. You can check to see if EDI translator is running.
64 * Using the command "ps aux | grep edi" should show you something similar
65 if the script is running properly:
68 ------------------------------------------------------------------------------------------
69 root 30349 0.8 0.1 52620 10824 pts/0 S 13:04 0:00 ruby ./edi_webrick.rb
70 ------------------------------------------------------------------------------------------
71 * To shutdown EDI Translator you can use something like pkill (assuming
72 no other ruby processes are running on that server):
75 -----------------------
76 kill -INT $(pgrep ruby)
77 -----------------------
82 The EDI scripts are "edi_pusher.pl" and "edi_fetcher.pl" and are used to
83 "push" and "fetch" EDI messages for configured EDI accounts.
85 1. As the *opensrf* user, copy edi_pusher.pl and edi_fetcher.pl from
86 Open-ILS/src/support-scripts into /openils/bin:
89 --------------------------------------------------
90 cp Open-ILS/src/support-scripts/edi_pusher.pl /openils/bin
91 cp Open-ILS/src/support-scripts/edi_fetcher.pl /openils/bin
92 --------------------------------------------------
93 2. Setup the edi_pusher.pl and edi_fetcher.pl scripts to run as cron jobs
94 in order to regularly push and receive EDI messages.
95 * Add to the opensrf user's crontab the following entries:
98 -----------------------------------------------------------------------
99 10 * * * * cd /openils/bin && /usr/bin/perl ./edi_pusher.pl > /dev/null
100 0 1 * * * cd /openils/bin && /usr/bin/perl ./edi_fetcher.pl > /dev/null
101 -----------------------------------------------------------------------
102 * The example for edi_pusher.pl sets the script to run at
103 10 minutes past the hour, every hour.
104 * The example for edi_fetcher.pl sets the script to run at
108 You may choose to run the EDI scripts more or less frequently based on the
109 necessary response times from your vendors.
114 Configuring Providers
115 ^^^^^^^^^^^^^^^^^^^^^
117 Look in Admin > Server Administration > Acquisitions > Providers
120 |======================================================================================
121 |Column |Description/Notes
122 |Provider Name |A unique name to identify the provider
123 |Code |A unique code to identify the provider
124 |Owner |The org unit who will "own" the provider.
125 |Currency |The currency format the provider accepts
126 |Active |Whether or not the Provider is "active" for use
127 |Default Claim Policy|??
128 |EDI Default |The default "EDI Account" to use (see EDI Accounts Configuration)
129 |Email |The email address for the provider
130 |Fax Phone |A fax number for the provider
131 |Holdings Tag |The holdings tag to be utilized (usually 852, for Evergreen)
132 |Phone |A phone number for the provider
133 |Prepayment Required |Whether or not prepayment is required
134 |SAN |The vendor provided, org unit specific SAN code
135 |URL |The vendor website
136 |======================================================================================
138 Configuring EDI Accounts
139 ^^^^^^^^^^^^^^^^^^^^^^^^
141 Look in Admin > Server Administration > Acquisitions > EDI Accounts
144 |===============================================================================================================
145 |Column |Description/Notes
146 |Label |A unique name to identify the provider
147 |Host |FTP/SFTP/SSH hostname - vendor assigned
148 |Username |FTP/SFTP/SSH username - vendor assigned
149 |Password |FTP/SFTP/SSH password - vendor assigned
150 |Account |Vendor assigned account number associated with your organization
151 |Owner |The organizational unit who owns the EDI account
152 |Last Activity |The date of last activity for the account
153 |Provider |This is a link to one of the "codes" in the "Providers" interface
154 |Path |The path on the vendor's server where Evergreen will send it's outgoing .epo files
155 |Incoming Directory |The path on the vendor's server where "incoming" .epo files are stored
156 |Vendor Account Number|Vendor assigned account number.
157 |Vendor Assigned Code |Usually a sub-account designation. Can be used with or without the Vendor Account Number.
158 |===============================================================================================================
160 Configuring Organizational Unit SAN code
161 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
163 Look in Admin > Server Settings > Organizational Units
165 This interface allows a library to configure their SAN, alongside
166 their address, phone, etc.
171 PO JEDI Template Issues
172 ^^^^^^^^^^^^^^^^^^^^^^^
174 Some libraries may run into issues with the action/trigger (PO JEDI).
175 The template has to be modified to handle different vendor codes that
176 may be used. For instance, if you use "ingra" instead of INGRAM this
177 may cause a problem because they are hardcoded in the template. The
178 following is an example of one modification that seems to work.
180 .Original template has:
183 ----------------------------------------------------------------------------------------------------------------------------------------------
185 [% IF target.provider.edi_default.vendcode && (target.provider.code == 'BT' || target.provider.name.match('(?i)^BAKER & TAYLOR')) -%]
186 {"id-qualifier": 91, "id":"[% target.ordering_agency.mailing_address.san _ ' ' _ target.provider.edi_default.vendcode %]"}
187 [%- ELSIF target.provider.edi_default.vendcode && target.provider.code == 'INGRAM' -%]
188 {"id":"[% target.ordering_agency.mailing_address.san %]"},
189 {"id-qualifier": 91, "id":"[% target.provider.edi_default.vendcode %]"}
191 {"id":"[% target.ordering_agency.mailing_address.san %]"}
194 ----------------------------------------------------------------------------------------------------------------------------------------------
196 .Modified template has the following where it matches on provider SAN instead of code:
199 ------------------------------------------------------------------------------------------------------------------------------------------
201 [% IF target.provider.edi_default.vendcode && (target.provider.san == '1556150') -%]
202 {"id-qualifier": 91, "id":"[% target.ordering_agency.mailing_address.san _ ' ' _ target.provider.edi_default.vendcode %]"}
203 {"id-qualifier": 91, "id":"[% target.ordering_agency.mailing_address.san _ ' ' _ target.provider.edi_default.vendcode %]"}
204 [%- ELSIF target.provider.edi_default.vendcode && (target.provider.san == '1697978') -%]
205 {"id":"[% target.ordering_agency.mailing_address.san %]"},
206 {"id-qualifier": 91, "id":"[% target.provider.edi_default.vendcode %]"}
208 {"id":"[% target.ordering_agency.mailing_address.san %]"}
211 ------------------------------------------------------------------------------------------------------------------------------------------