EDI Functional Acknowledgments

When I receive a 997 back in wm.
I can pull by the Group doc id from the AK102 and the Set doc id from the AK202. Is there a way to get the doc id for the x12 envelope? Is this were the conversation scripts come in to play?

Thanks.

I believe conversation scripts would help here but I haven’t done that.

Another way is to look up the related documents for your group doc. The envelope doc will be in the list.

Rob,

What services are you using for this?
I’ve tried wm.tn.query:createDocumentQuery, wm.tn.query:documentQuery, and wm.tn.doc:getEvents.
But these all relate to the Group how do I make that connection back to the X12 Envelope?
Thanks.

Take a look at wm.tn.doc:view. Set getRelated to true. Loop over the returned list, then get each related doc (using wm.tn.doc:view). For each doc look at to see its type to determine when you have the envelope.

Rob,

Once again, thanks for your help.

Chris