Differentiate between two X12 4010 810bs from same Sender

Hi All,
A trading partner is sending us two different X12 4010 810’s. One is a summary invoice and one is a detailed invoice. The detail 810 is delivered 3 times a month and the summary only once a month. The processing is different for each file.
I need to process the X12 Envelope. In TN I cannot invoke two processing rules, as the sender,receiver,type of document is same. So I am having to do it in a custom gateway service.
My Question is, is there a way to differentiate this document in TN itself and invoke the corresponding service?
The BIG08 Code value for one file is 53 and the other is 54.
Any help is appreciated.
Thank you

Please dont duplicate the posts…so it will be easy for everyone to reply in one place…Hope you got the required solutoion in your one of the other posts…