BizTalk Pipeline Components Extensions Utility Pack: Filename Promoting Metadata Pipeline Component

  • Sandro Pereira
  • Dec 24, 2025
  • 3 min read

In many BizTalk integrations, the business key you need for routing and tracking isn’t inside the payload—it’s in the incoming file name.

That’s especially common with legacy batch drops, SFTP deliveries, and partner-driven naming conventions where the file name carries information like:

  • Partner code
  • Document type
  • Country/region
  • Batch identifier
  • Business date

Filename Promoting Metadata Pipeline Component

This receive pipeline component solves that problem in a clean and reusable way: it reads the incoming filename (ReceivedFileName), splits it using a configured separator character, extracts the value at a configured position, and promotes it into the message context as a promoted property.

What this component is

  • A receive pipeline component
  • ✅ Can be used in any stage of a receive pipeline
    • It will accept as inputs the separator character, the position to be extracted, the promoted namespace in which the value will be added, and the property name that will be promoted.
  • ✅ Uses a separator character to split the filename
  • ✅ Promotes a specific token into the message context via property promotion
  • ✅ Designed to be reusable across multiple receive locations and naming formats

The pipeline component code

Here’s the core logic:

public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(
    Microsoft.BizTalk.Component.Interop.IPipelineContext pContext,
    Microsoft.BizTalk.Message.Interop.IBaseMessage pInMsg)
{
    string filename = string.Empty;
    bool validFile = true;
    string value = "";

    try
    {
        filename = pInMsg.Context.Read(
            "ReceivedFileName",
            "http://schemas.microsoft.com/BizTalk/2003/file-properties").ToString();

        string[] listComments = null;
        listComments = filename.Split(Convert.ToChar(this.SplitterChar));
        value = listComments[this.Position];

        validFile = true;
    }
    catch
    {
        validFile = false;
    }

    if (validFile)
    {
        pInMsg.Context.Promote(this.PromoteProperty, this.PromoteNamespace, value);
    }

    return pInMsg;
}

Why this is useful

This is a convenient way to convert file naming conventions into first-class BizTalk metadata—without parsing the payload.

It’s especially helpful when:

  • The message is not XML (flat file / EDI / binary)
  • The identifier exists only in the filename
  • You want consistent routing rules across environments

This receive pipeline component is a simple but powerful pattern: extract a meaningful token from the incoming file name and promote it into the message context so BizTalk can route, track, and correlate messages more intelligently.

What is BizTalk Pipeline Components Extensions Utility Pack?

The BizTalk Pipeline Components Extensions Utility Pack is a set of custom pipeline components (libraries) with several custom pipeline components that can be used in received and sent pipelines, which will provide an extension of BizTalk’s out-of-the-box pipeline capabilities.

The project is available on the BizTalk Server Open Source Community repository on GitHub (https://github.com/BizTalkCommunity), and everyone can contribute new pipeline components that can extend or improve the existing BizTalk Server capabilities.

BizTalk Pipeline Components Extensions Utility Pack: Unzip File Pipeline Component

At the moment, it is only available for BizTalk Server 2020, but it can be easily converted and compiled for earlier versions of the product.

Where to download it?

You can download BizTalk Pipeline Components Extensions Utility Pack from GitHub here:

Hope you find this helpful! If you enjoyed the content or found it useful, and wish to support our efforts to create more, you can contribute to purchasing a Star Wars Lego set for my son!

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top