Grouping and Sorting in BizTalk Maps

Recently I received a requirement where grouping and shorting in BizTalk map was required to get the desired result.

Here I have a sample message which has list of contacts and their items for an account. Multiple contact nodes are there for multiple items with same contact email address , first name and last name..

Input message:


This message need to be transformed to a message with single node for a contact email address and all the items for a particular contact should be grouped within the contact.

Output message:


The suggested way to accomplish this would be using xslt style sheet. You can refer Muenchian method.

I generally avoid using external XSL file or custom-XSLT because I am not very much comfortable with XSLT. So I tried to achieve this by using .net helper class.


I am not sure how would be the performance in case of dealing with large message but it work well for normal size messages.

Also this would be easily readable and maintainable in comparison with XSLT.

For a new BizTalk developer to troubleshoot and/or change an existing map it will be more easy to do using .net helper and BizTalk Mapper rather than troubleshoot and/or change and entire custom-XSLT file without a visual representation.

Related Links:

One thought on “Grouping and Sorting in BizTalk Maps

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.