Inbound EDI Files in BizTalk – Duplicate Document Detection

EDI documents being sent by a trading partner are assumed to be unique. Recently I came across a scenario where one trading partner who was communicating via AS/2 would resend a file if they did not received an MDN. They did not wanted to inspect the 997 which they DID received. This may be a valid scenario and we can not raise the issue as a complaint and ask them not to do so. Why the MDN was not being sent on certain occasions is a different issue and I shall write a separate blog on that subject later. The document type being received twice was X-12 852. Unfortunately, on the processing side, there were no checks for duplicates hence it was becoming a high visibility issue.

Fortunately BizTalk has an inbuilt feature which is relatively less used and is of perfect help in such scenarios. Within EDI Trading Partner Management -> One Way Agreement -> Interchange Settings -> Validation, there is setting named “Do not allow duplicate”. If “Interchange Control Number” check box is checked, you can expect BizTalk to reject the duplicate incoming document. The check is based on ISA13 “Control Number”. (Side note on this is; if the control number is different but the rest of the content is duplicated for some reason, this solution will not help.)

DupDetection

 

If your trading partner is expecting a TA1 along with a 997, they will receive the TA1 but not the 997 for the duplicate file. TA1 would have the Interchange Acknowledgment Code of “R”. Here is an example.

DupDetection2

 

I hope this tip helps someone.

Comments are closed