How to set TNdocumentID%3dPO number for EDI 850

I am submitting EDI 850 to TN.

TN creates 3 documents, envelope, group and transaction set.
DocumentID for each is control numbers.
Client wants doucmentID=PO number for transaction set instead of control number. I tried using InstanceID query but this works for conversationID only

Can anyone throw some light on this ?

no response from anybody so far.

can anyone please help me

map your po number to ST02 in the EDI Idata object before submitting to TN

See this link

I am having the problem of Identifing the sender and receiver for X12Envelope,Group and documents.Its giving me unknown sender and receiver but its identifying the EDINT packet sender and receiver. I am getting the EDINT packet from my partner and its identifying the sender and the receiver but when this EDINT is submitting the payload to TN its showing unknown sender and receiver for X12Envelope,Group and documents.Anybody can give some help on this…why I am getting this error and not at the EDINT packet.


The reason the partners are recognized in the EDIINT payload is that its recognized by the e-mail adress in the TO: and FROM: of the headers of the EDIINT document. When it gets to the x-12 envelope you need to set the sender and receivers accordinly. The way I got around this was to create a service which parsed the payload and set the sender and receivers… the Sender and Receiver 01*123456789 information is always in the same place (same substring) of the first line of the EDI payload. I never found a cleaner way to get TN to recognize the sender and receivers.

Lemme know if you do-

thanks for your response.
In my case it is inbound, that is edidata from the client is submitted to TN. so I cannot change the ST02 values.

If it is outbound then I can set ST02 = ponumber.

Since it’s inbound I don’t know if you can replace the doc it after it has been inserted into the TN database. Someone else will have to chime in on that. I would suggest you get the sender to make the change on their end. As I write this you may want to try a extracting an attribute but I don’t think you can do that with an EDI doc type.
Hmmm! I’m curious to see the solution to this.

Good Luck!

What we did to help with this issue was to:

  1. use an InstanceID query to put the order number in the conversationID.
  2. create a new custom document attribute (we called it “Business Document ID”)
  3. in the flow service that processes the EDI, extract the order number from the conversationID and write it to the custom attribute. This allows the instance ID query to be specific to the document and the extraction to be generic.
  4. In the TN console you can query for all documents with this custom attribute not equal to null.

A better method is to use something other than TN to track documents from a business (i.e. PO number) perspective.

i created a new custom attribute called “Business Document ID”…

used setAttribute and updateAttributes to set that to the valkue of the PO document, and outbound invoice or delivery…

thats the easiest way for me… i wouldnt play with the built in fields, just create a custom one to hold whatever value you want to see in the txn analysis