I just updated my BizTalk Pipeline Components Extensions Utility Pack project available on GitHub with a new component: Receive Location Name Property Promotion Pipeline Component.
For those who are not familiar, this project is a set of custom pipeline components (libraries) that can be used in received and sent pipelines, extending BizTalk’s out-of-the-box pipeline capabilities.

📝 One-Minute Brief
A lightweight BizTalk pipeline component that promotes the Receive Location Name into the message context so you can use it for routing, logging, tracking, or orchestration logic. This component simplifies scenarios where identifying the source receive location is essential but not available out of the box.
Receive Location Name Property Promotion Pipeline Component
Receive Location Name Property Promotion Pipeline Component is a simple pipeline component to promote the Receive Location Name (ReceiveLocationName) property to the context of the message. Several BizTalk Server context properties are not promoted by default, so they are not available for routing.
One such property is ReceiveLocationName. While the ReceivePortName property is available in the BTS namespace, the ReceiveLocationName property is not promoted. It cannot be used for routing, nor can it be accessed from inside an orchestration.
My team and I kept that behavior to create this project as a proof-of-concept to demonstrate how you can promote properties within the message context.
Create a Property schema
To promote properties to the context of the message, we will need a Property Schema with these properties. In our case, we will add only one property called: ReceiveLocationName.
| Property Name | Date Type | Property Schema Base |
| ReceiveLocationName | xs:string | MessageContextPropertyBase |
Note: A MessageContextPropertyBase property means that the XPath may or may not exist.

Create a Pipeline Component
To actually promote the properties to the context of the message, we need to create a pipeline component to do the trick.
string rlocationname = (string)pInMsg.Context.Read("ReceiveLocationName", "http://schemas.microsoft.com/BizTalk/2003/system-properties");
pInMsg.Context.Promote("ReceiveLocationName", "https://BizTalk.Pipeline.Components.RcvLocationPromotion.PropertySchema", rlocationname);
How to use it
Once you deploy the property schema and a receive pipeline component containing the Receive Location Name Property Promotion Pipeline Component, you can start to apply Content-based routing using the Receive Location Name.

Download
THIS COMPONENT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.
You can download the Receive Location Name Property Promotion Pipeline Component from GitHub here:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.
1 thought on “Receive Location Name Property Promotion Pipeline Component”