[Evergreen-acq] Moving to EDI Attributes - Question/Concern
John Amundson
jamundson at cwmars.org
Fri Jul 26 13:25:42 EDT 2019
For reference, the old version added the following for every line item sent
to B&T:
FTX+LIN+1
Now, if the line item doesn't have a note, this segment is skipped entirely
even if "INCLUDE_EMPTY_LI_NOTE" chosen.
If I add a blank space to the note field, the following is generated:
FTX+LIN+1+
If I add an actual LI note, this is how it is generated:
FTX+LIN+1+This is a test public note
I activated one PO with three line items to test this. One without a note,
one with a blank note, and one with a full note.
Right now my main focus is just making sure the vendors will accept the EDI
messages. If this isn't giving others trouble, then that's a good sign,
whether it's a bug or not.
John
<http://www.cwmars.org>
John Amundson | Library Applications Supervisor | CW MARS
jamundson at cwmars.org | 508-755-3323 x322 <%28508%29%20755-3323>
https://www.cwmars.org
On Wed, Jul 24, 2019 at 5:47 PM Chris Sharp <csharp at georgialibraries.org>
wrote:
> I just dove into the code for a minute to compare what the
> action-trigger-based (AT) EDI pusher does vs. the EDI attributes version.
> Here's what I found:
>
> In the AT version, a JSON blob is generated by an action trigger template,
> and the relevant TT2 code is here:
>
> # BT & ULS want FTX+LIN for every LI, even if empty
> IF ((VENDOR_BT OR VENDOR_ULS) AND ftx_vals.size == 0);
> ftx_vals.unshift('');
> END;
>
> (Note the comment line, preceded by "#")
>
> Then, that gets passed to the Ruby-based openils-mapper module that
> generates the FTX message:
>
> if value.has_key?('free-text')
> freetexts = value['free-text'].is_a?(Enumerable) ? value['free-text']
> : [value['free-text']]
> freetexts.each { |ftx|
> chunked_text = ftx.chunk_and_group(512,5)
> chunked_text.each { |data|
> mapper.add('FTX', { '4451' => 'LIN', '4453' => 1, 'C108' => {
> '4440' => data } })
> }
> }
> end
>
> So the AT version generates an FTX segment for each lineitem even if blank
> for B&T.
>
> Here's the EDI attributes version
> (Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm, line 271):
>
> If there are no EDI notes and INCLUDE_EMPTY_LI_NOTE is set, add a note
> that's just an empty string (just like the A/T version):
>
> if (!@notes && $self->{compiled}->{edi_attr}->{INCLUDE_EMPTY_LI_NOTE})
> {
> # lineitem has no notes. Add a blank note if needed.
> push(@trimmed_notes, '');
>
> Then add the note to the order
> (Open-ILS/src/perlmods/lib/OpenILS/Utils/EDIWriter.pm, line 527 in current
> master):
>
> for my $note (@{$li_hash->{notes}}) {
> if ($note) {
> $edi .= "FTX+LIN+1+$note'\n"
> } else {
> $edi .= "FTX+LIN+1'\n"
> }
> }
>
> This will only run if there is at least one note in the "li_hash" object.
> If there's not, that sounds like a bug that needs reporting.
>
> On Wed, Jul 24, 2019 at 1:00 PM John Amundson <jamundson at cwmars.org>
> wrote:
>
>> Thanks for the suggestion, Chris.
>>
>> I confirmed, and we already had INCLUDE_EMPTY_LI_NOTE set. Here is what
>> my test setup for B&T looks like:
>> [image: image.png]
>> <http://www.cwmars.org>
>>
>> John Amundson | Library Applications Supervisor | CW MARS
>>
>> jamundson at cwmars.org | 508-755-3323 x322 <%28508%29%20755-3323>
>>
>> https://www.cwmars.org
>>
>>
>> On Tue, Jul 23, 2019 at 8:34 AM Chris Sharp <csharp at georgialibraries.org>
>> wrote:
>>
>>> John,
>>>
>>> Can you confirm that your example B&T account has INCLUDE_EMPTY_LI_NOTE
>>> set? From my reading of the EDIWriter.pm code, if that's set, it should
>>> work as the action/trigger version does.
>>>
>>> Hope that helps!
>>>
>>> Chris
>>>
>>> On Thu, Jul 18, 2019 at 11:11 AM John Amundson <jamundson at cwmars.org>
>>> wrote:
>>>
>>>> Thank you for the reply, Tiffany.
>>>>
>>>> In my testing, the UPC was still attached to the PIA+5 segment in the
>>>> old version, so perhaps the new one is smarter and doesn't append it unless
>>>> it's present. In any case, it doesn't seem to be something to worry about
>>>> because my Midwest Tape setup is similar to yours.
>>>>
>>>> At least at first I think we will continue sending the GIR segments to
>>>> B&T. I don't want to rock the boat too much with some of our vendors, so
>>>> I'll plan to make changes only if needed.
>>>>
>>>> Querying our edi_message table, I find when this segment is included in
>>>> our ORDERS messages, only FTX+LIN+1 is sent. Although I did not verify
>>>> 100%, this seems to only be for B&T orders. It is not present for other
>>>> vendors.
>>>>
>>>> I do see more interesting segments in our responses, though, (ORDRSP
>>>> message type):
>>>> FTX+LIN++05:8B:28
>>>> FTX+LIN++400:1B:28
>>>> etc.
>>>>
>>>> We get these back from multiple vendors, not just B&T
>>>>
>>>> For reference, here is a comparison of the line item portion of an
>>>> ORDERS message to B&T before and after moving to attributes:
>>>>
>>>> *Before:*
>>>> 'LIN+752234++9781524702946:EN
>>>> 'PIA+5+9781524702946:EN
>>>> 'IMD+F+BTI+:::Odessa Sea
>>>> 'IMD+F+BPU+:::Penguin Audiobooks
>>>> 'IMD+F+BPD+:::20161115
>>>> 'IMD+F+BPH
>>>> 'QTY+21:1
>>>> *[GIR Segment]*
>>>> 'FTX+LIN+1
>>>> 'PRI+AAB:45
>>>> 'RFF+LI:28047/752234
>>>>
>>>> *After:*
>>>> 'LIN+752249++9781524702946:EN
>>>> 'PIA+5+9781524702946:EN
>>>> 'IMD+F+BTI+:::Odessa Sea
>>>> 'IMD+F+BPU+:::Penguin Audiobooks
>>>> 'IMD+F+BPD+:::20161115
>>>> 'IMD+F+BPH
>>>> 'QTY+21:1
>>>> *[GIR Segment]*
>>>> 'PRI+AAB:45.00
>>>> 'RFF+LI:28052/752249
>>>>
>>>> If you were sending order successfully prior to and after the change
>>>> without this segment, perhaps the segment is not needed.
>>>>
>>>> And finally, *we do have several B&T accounts that do not have a
>>>> suffix listed*. Are you saying that prior to the change to attributes,
>>>> the responses were landing on the correct account but not after? We haven't
>>>> had issues with this happening on the old system.
>>>>
>>>> Thank you,
>>>> John
>>>>
>>>>
>>>>
>>>> <http://www.cwmars.org>
>>>>
>>>> John Amundson | Library Applications Supervisor | CW MARS
>>>>
>>>> jamundson at cwmars.org | 508-755-3323 x322 <%28508%29%20755-3323>
>>>>
>>>> https://www.cwmars.org
>>>>
>>>>
>>>> On Wed, Jul 17, 2019 at 1:49 PM Tiffany Little <
>>>> tlittle at georgialibraries.org> wrote:
>>>>
>>>>> Hi John,
>>>>>
>>>>> We've completely moved over to EDI Attributes, so I'll add my $0.02.
>>>>>
>>>>> Your testing method is pretty much exactly what I did, by the way. If
>>>>> you can run scripts or have someone willing to do it for you, you can also
>>>>> run edi_order_pusher.pl in testmode and it will just print what the
>>>>> EDI output would be without sending it anywhere.
>>>>>
>>>>> For Midwest Tape, I've attached a screenshot of how I have our EDI
>>>>> Attribute set up. With this setup, the UPC is being sent in the PIA+5
>>>>> segment which is for Product ID. I never heard a peep from Midwest when we
>>>>> did the changeover and they've kept sending everything accurately, so I'm
>>>>> guessing this is fine. My libraries don't get cataloging done from them,
>>>>> though, so YMMV.
>>>>>
>>>>> For Baker & Taylor, they're slightly different. I went off script and
>>>>> set up my own EDI Attribute for Baker & Taylor. I don't have any libraries
>>>>> getting vendor cataloging done from B&T so I labeled it as non-enriched
>>>>> accounts, since that's what B&T calls it. So for this profile we're not
>>>>> sending them funds, barcodes, etc. in the GIR segments.
>>>>>
>>>>> Now I did have a problem with this one, and I found a workaround
>>>>> because I didn't feel like delving that deep in at the time to figure out
>>>>> why it was happening. If you have multiple B&T accounts where some have a
>>>>> suffix and one doesn't (this is B&T's common practice, that your main
>>>>> account doesn't have one but subsequent accounts do) then when the order
>>>>> acknowledgements/invoices would come in they would attach to the wrong B&T
>>>>> EDI account. My hack was basically just to ask B&T's EDI specialists to
>>>>> give that main account a suffix, which apparently has no effect at all on
>>>>> them and they were happy to do. So if all B&T accounts for that library
>>>>> have a suffix, I haven't had any other issues with that at all.
>>>>>
>>>>> I've also started attempting to map EDI segments to the specific
>>>>> settings in EDI Attributes here:
>>>>> https://wiki.evergreen-ils.org/doku.php?id=acq:edi_fields
>>>>>
>>>>> With our B&T setup, we do send LIN with every title; that corresponds
>>>>> to Acq's line item ID. We don't personally send FTX values; I *think* that
>>>>> might just be for line item notes? Please don't quote me on that, though. I
>>>>> looked both here:
>>>>> https://service.unece.org/trade/untdid/d01b/trmd/orders_c.htm#0070_X and
>>>>> through EDIWriter.pm for what FTX values are, and the EDIWriter references
>>>>> FTX when talking about line item notes. If you look through your old ORDERS
>>>>> messages and have FTX values, I'd be interested in what they are.
>>>>>
>>>>> Tiffany Little, PINES Services Specialist: Acquisitions
>>>>>
>>>>> ------------------------------
>>>>>
>>>>> Georgia Public Library Service | University System of Georgia
>>>>>
>>>>> 1800 Century Place NE Suite 580 l Atlanta, GA 30345
>>>>>
>>>>> (470) 512-1454 | tlittle at georgialibraries.org |
>>>>> help at help.georgialibraries.org
>>>>>
>>>>> <https://www.facebook.com/georgialibraries>
>>>>> <https://www.twitter.com/georgialibs>
>>>>>
>>>>> Join our email list <http://georgialibraries.org> for stories of
>>>>> Georgia libraries making an impact in our communities.
>>>>>
>>>>>
>>>>> On Wed, Jul 17, 2019 at 12:57 PM John Amundson <jamundson at cwmars.org>
>>>>> wrote:
>>>>>
>>>>>> Hello, Acquisitions community!
>>>>>>
>>>>>> I know there's a brave soul or two out there who has switched to
>>>>>> using the new EDI attributes.
>>>>>>
>>>>>> I'm currently testing the attributes for our network, and I've run
>>>>>> into two issues that may be of concern. My questions are *bolded *
>>>>>> below.
>>>>>>
>>>>>> Before I get into that, some background. I'll share my testing
>>>>>> process, (maybe it will help others thinking about moving over - but be
>>>>>> warned, we haven't added attributes to our production environment, yet, so
>>>>>> I cannot vouch for how successful this method is).
>>>>>>
>>>>>> Using the Action Trigger PO JEDI template for reference, I updated
>>>>>> the EDI Attribute sets for the vendors we use to resemble the data included
>>>>>> in the template as closely as possible.
>>>>>>
>>>>>> Our libraries use three vendors: Ingram, Baker & Taylor, and Midwest
>>>>>> Tape.
>>>>>>
>>>>>> To test I created dummy accounts that will create EDI messages but
>>>>>> not send them, (nonexistent host). I then compared the output with the EDI
>>>>>> output from another PO that used the same vendor and line items but wasn't
>>>>>> using attributes. I would then adjust the attribute set again and activate
>>>>>> another PO until I got messages that resembled each other.
>>>>>>
>>>>>>
>>>>>> Ingram's conversion was visually identical.
>>>>>>
>>>>>> Midwest Tape was almost identical. For MW Tape, the old template
>>>>>> included UPC, but this is not an option with the new attributes. In looking
>>>>>> at old messages, it seems this usually resulted in a hanging UP at the end
>>>>>> of the ISBN anyway, so I don't know how much this is needed. *Anyone
>>>>>> using Midwest Tape with EDI Attributes have any trouble by not sending the
>>>>>> UPC?*
>>>>>>
>>>>>> Baker & Taylor's discrepancy may be a bigger issue. The old template
>>>>>> added the following information to each line item:
>>>>>> FTX+LIN+1
>>>>>> This is not present when using the Attribute set, nor is it an
>>>>>> available choice to add.
>>>>>> There is a comment in the PO JEDI template that says
>>>>>> "BT & ULS want FTX+LIN for every LI, even if empty".
>>>>>> *Anyone using Baker & Taylor with EDI Attributes run into any issues
>>>>>> with B&T not accepting orders without the FTX+LIN+1 affixed to each line
>>>>>> item?*
>>>>>>
>>>>>> Thank you!
>>>>>>
>>>>>> John
>>>>>> <http://www.cwmars.org>
>>>>>>
>>>>>> John Amundson | Library Applications Supervisor | CW MARS
>>>>>>
>>>>>> jamundson at cwmars.org | 508-755-3323 x322 <%28508%29%20755-3323>
>>>>>>
>>>>>> https://www.cwmars.org
>>>>>> _______________________________________________
>>>>>> Evergreen-acq mailing list
>>>>>> Evergreen-acq at list.evergreen-ils.org
>>>>>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>>>>>>
>>>>> _______________________________________________
>>>>> Evergreen-acq mailing list
>>>>> Evergreen-acq at list.evergreen-ils.org
>>>>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>>>>>
>>>> _______________________________________________
>>>> Evergreen-acq mailing list
>>>> Evergreen-acq at list.evergreen-ils.org
>>>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>>>>
>>>
>>>
>>> --
>>>
>>> Chris Sharp, PINES System Administrator
>>> ------------------------------
>>>
>>> ​Georgia Public Library Service
>>>
>>> 1800 Century Place NE Suite 580 l Atlanta, GA 30345
>>>
>>> (404) 235-7147 | csharp at georgialibraries.org
>>>
>>> <https://www.facebook.com/georgialibraries>
>>> <https://www.twitter.com/georgialibs>
>>>
>>> Join our email list <http://georgialibraries.org/subscription/> for
>>> stories of Georgia libraries making an impact in our communities.
>>>
>>> _______________________________________________
>>> Evergreen-acq mailing list
>>> Evergreen-acq at list.evergreen-ils.org
>>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>>>
>> _______________________________________________
>> Evergreen-acq mailing list
>> Evergreen-acq at list.evergreen-ils.org
>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>>
>
>
> --
>
> Chris Sharp, PINES System Administrator
> ------------------------------
>
> ​Georgia Public Library Service
>
> 2872 Woodcock Blvd, Suite 250 | Atlanta, GA 30341
>
> (404) 235-7147 | csharp at georgialibraries.org
>
> <https://www.facebook.com/georgialibraries>
> <https://www.twitter.com/georgialibs>
>
> Join our email list <http://georgialibraries.org/subscription/> for
> stories of Georgia libraries making an impact in our communities.
>
> _______________________________________________
> Evergreen-acq mailing list
> Evergreen-acq at list.evergreen-ils.org
> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-acq
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-acq/attachments/20190726/197130b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 40622 bytes
Desc: not available
URL: <http://list.evergreen-ils.org/pipermail/evergreen-acq/attachments/20190726/197130b5/attachment-0001.png>
More information about the Evergreen-acq
mailing list