Route FF to TN

I am receiving a flat file from partner A and I am trying to send it to another external partner B over AS2. I am not changing any data in this process. I have created B’s profile with some external id’s like Duns, Mutually defined and User defined fields. I have finished the profile with basic details and in the Delivery Method I have given AS2 details of B. In Processing rule I have gave any sender and selected the partner profile for receiver side and in Actions I said Deliver document by. Now I have created a trigger service when the doc is received by the IS. All it does is to take the Flat file data and submit it to the and in . But here I am seeing an issue that in the incoming file I am not receiving the sender id or receiver id to pass in TN_Parms. Can any one tell me if there is any way to submit the file to TN first and then get these id’s so that I can route it again and to TN with all the details needed. Please point me to any guide if it describes this scenario.

When new flat file comes to TN has to be recognized and processed.

1:Document type matching
for finish this activity flat file doesn’t contain metadata like XML file.
its our responsibility to provide meta data like who is the sender,receiver,document type.
we are using gateway service to provide all this information to the TN as TN_parms pipeline variable which will be provided by gateway service.
its is our responsiblity to invoke or provide the gateway service to the each and every new falt file(document type).
once you have been defined the Gateway service to specif flat file document make sure that you need to give the gateway service to to the who ever is interested to send this type of flat file to TN inorder to process the file in TN.

Hope this makes sence.
if you stil have any confision on the same please let us know.

A document gateway service is the entry point for flat files into Trading need to create a document gateway service to process flat files.


Hi Vasanth, Thanks for your reply.

Yes I have created the gateway service. But I am not sure how to get the Sender and Receiver Id’s as they are not present in the FF data. I have both the profiles created my enterprise and the target partner profile. Can I extract them from the profiles ? Can you giude me how to extract those id’s from profile so that I can pass to TN_parms?


You dont have these Id’s in you FF, but do you have some fix file name pattern coming from some partner . Lets say partnerA_YourEnterprise_Doc1_****, if you can have this kind of strucutre in file name , you can create TPA and a wrapper service; Depending upon the filename you can set the TN_params for your FFdocument and route it to TN again to be sent to another external partner.

Hope it helps!

HI ,
I believe It is our responsibility to give the sender and receiver details in flat file itself.
Flat file data contains:
it shoud contain the following information.

Exact data what you want to transfar from one partner to another partner”

TN receives the document(falt file) from partners.
Extract the data (Attributes like senderID ,Receiver ID from flat file only ) to process (transfar) the data to target partners.

I know this process initially bit difficult to test first time(compare with XML file handling).

Try try …and let us know the difficulties while processing the flat file .

Good luck.


When the senderID and ReceiverID is not present in the FF content which partner is sending, you need to assign it in your integration layer if TN recognistion is required. For that TPA setting (suggested above) is one of the approach.



The does need the TN_params (SenderID,ReceiverID,doctypeName) before routing to TN for recognition and processing.So as suggested above try to extract partner details from the TPA or partner extended fields or custom db or properties files if any.


Thanks every one for you reply’s. I am trying use custom db approach. I have asked client A to FTP the FF to one of my service which is looking into the DB using the file name and get the hard coded values and the service to call(this will be the wrapper service to route to TN). Oce the file comes in the service will retrieve the id’s and invoke wrapper service and route the doc to TN.
I have a question here. When I hard code Sender Id and Receiver Id’s will I be using the external Id values ? when I just route this doc to TN how will TN recognize my Processing rule ? Currently in my PR server id is any and receiver id is the partner and deliver doc by selected in Action tab and provided AS2 details in the profile. What I am not sure is what values I will hard core in the DB for sender and receiver id’s as I was in an assumption is that they are created by TN when we create the profile.

Nice to hear, that you are close to your solution :slight_smile:

You need to hard code, senderID, ReceiverID and docTypeName.
When you will submit the bizdoc with these values, it will be recognised and invoke the correspoding processing rule.


Yes and try to map the TN_param values (names case sensitive)


Thanks every one for the inputs. Here is what I did.
I have hard coded the DUNS values of our enterprise and partner in the DB as well as a gateway service name. When file is FTP to the first service it is fetching these values according to the file name from DB and invokes the gateway service. In the gateway service first I am getting the internal id’s using service for the external id I have fretched from DB. Using these values in TN Parms I am routing the FF to TN. It is now recognizing the sender and receiver Id and invoking the processing rule. If this is not the best way to do please correct me.


You don’t need to lookup the internal IDs. Pass the DUNS value and tell TN that’s what you’re passing.

yup… since you have already hardcoded the DUNS value (externalID) just assign them and route the document on to TN.


How can I tell TN that the values I am passing are DUNS numbers while Routing to TN ? When I tried passing the hard coded sender and receiver id’s directly to TN_parms TN was not able to recognize the processing rule. In TN it shows me that “The value originally supplied as receiver ID for the document was not a valid partner ID The value was XXXX” showed same or sender ID too. Can you tell me that how I can I tell TN that the values are DUNS(external id) not sender ID.


In the FF doc type defined in TN.