Acq: Do we need a feature to resend EDI purchase orders?

Bug #1218423 reported by Lebbeous Fogle-Weekley
66
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Wishlist
Unassigned

Bug Description

Hypothetical at this time, for Evergreen master.

I recently helped somebody who needed to resend a PO by EDI after changing some fields in the acq.provider row related to the PO. They knew to delete the the right row from acq.edi_message where message_type = 'ORDERS' and purchase_order = <PO ID>, but there are more steps if you want the message content to actually get regenerated.

Specifically, you want to regenerate certain Action/Trigger template output that is fed into the EDI translator before new rows in acq.edi_message get created. Like this:

SELECT atev.id FROM action_trigger.event atev JOIN action_trigger.event_definition atevdef ON (atevdef.id = atev.event_def) WHERE atev.target = <PO ID> AND atevdef.active AND atevdef.name = 'PO JEDI';

Then you'd follow that with :
UPDATE action_trigger.event SET status = 'pending' WHERE id = <event ID>; -- event ID is answer from previous query

And finally with srfsh you'd need to issue this method call:
request open-ils.trigger open-ils.trigger.event.fire <event ID>

Presumably, the user who was doing this had had some communication with the vendor so that they expected the resend, or at least the user had some other way of knowing that there should be no trouble from sending the same order twice (slightly adjusted the second time, of course).

** The point **

Is this a common situation for sites out there getting into serious EDI use with Evergreen, and should there be a way to handle this in the interface?

Tags: acq acq-edi
Revision history for this message
Christine Morgan (cmorgan-z) wrote :

Yes, I believe there should be a way to resend a PO within the interface. We have had instances were a PO fails to be received by the vendor. This can be due to an issue on the vendor's side, a connectivity issue, etc. Being able to resend a PO would definitely be cleaner and more efficient than recreating the PO and sending it again. Testing is another instance where resending a PO would be highly desirable. I have had a number libraries ask if it was possible to resend a PO.

Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
Revision history for this message
Leslie St. John (lstjohn-deactivatedaccount) wrote :

I'd like to add a Yes to this also. Still in the testing phase and I already can see a need for this feature. There are so many ways sending can fail that a way to resend a PO would be a quite valuable and eliminate this as a high level support issue. Resending shouldn't be an really easy thing to do, as duplicate PO's will present problems, but something other than the current database fix would be very desirable.

Revision history for this message
Martha Crawley (mcrawley) wrote :

Yes, there have been numerous times when a PO failed to reach the vendor and needed to be sent again. We have either had to get Equinox to resend it for us or cancel the PO in Evergreen and create a new one. Both options take up valuable time. Should require at least a warning "Do you really want to resend this PO?"

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Yes, we also would like a way to resend a PO via EDI in the interface. I agree with Leslie that it should not be an easy thing to do since you don't want it happening by accident.

I think it would make the most sense as a button beside Activated called something like "Resend via EDI". When this button is clicked a pop up appears asking "Are sure you would like to resend this purchase order to ______ (VENDOR NAME) via EDI?". Also, this should be controlled by a specific permission that can be assigned to the people or permission groups that should be able to perform this action. This button would only appear on activated POs and ideally would be grayed out on activated POs if the user does not have the permission.

The other option would be to add it as an option on the Actions menu with the pop up and specific permission but I think that location would increase the number of times it is accidently selected.

Revision history for this message
Mary Jo Gleason (mjgleason) wrote :

Even though it has been awhile since anyone has commented on this, I think it would be of great benefit if there were an option to "resend" an EDI order without having to completely re-do the PO then delete the old PO. If this is done; however, there also needs to be a way to correct the PO header such as "Context Ord Unit". Most of the times when we have to resend an EDI order it is because the wrong thing is chosen in this line.

If the resend is not an option, a way to copy the PO without having to re-enter all the information would be of benefit.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's a better way to handle failed to send purchase orders:

https://pastebin.com/TsX9iAnn

Put this on on a server with access to an OpenSRF private router, preferably a utility server. Run it with the ids of failed purchase orders as the command line arguments, and the program will figure out the best way to get the messages resent to the vendor.

Quite frankly, the entire EDI process could benefit from a major code overhaul. The problems start down in the RemoteAccount module and bubble all the way up the support scripts for pushing and retrieving messages. That, however, should be dealt with in another bug.

Changed in evergreen:
status: Triaged → Confirmed
tags: added: acq-edi
removed: edi
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.