Business Activity Monitoring (BAM) is a powerful feature of BizTalk Server that provides a real-time view of business processes. But for BAM to show you anything, it first needs to collect data.
One of the most common questions from architects is: “Where can BAM get its data from?” The answer is flexible. BAM can capture data from three main sources.
📝 One-Minute Brief
Business Activity Monitoring (BAM) is more than just a tracking tool; it’s a powerful engine that can aggregate data from multiple environments. This post explains the three primary data sources for BAM: BizTalk Orchestrations (using the TPE), BizTalk Messaging (pipelines), and Custom .NET Applications (using the BAM API). Learn how to choose the right source to gain full visibility into your business processes, whether they reside inside or outside of BizTalk Server.
The most common data sources used with BAM are:
- BizTalk Application: BAM can capture data from fields in BizTalk messages, can capture milestones from the date and time a BizTalk message is received or sent, and can also capture fields in the BizTalk context properties.
- Data capture from BizTalk, normally, is configured using the Tracking Profile Editor (TPE)
- BAM API: .NET code can write data directly into BAM using an API. Code that is executed in BizTalk normally uses either the OrchestrationEventStream (in orchestrations) or MessagingEventStream (in pipelines) classes.
- Code that isn’t executing in BizTalk will use either the DirectEventStream or BufferedEventStream classes.

- WCF Services (WCF Interceptor): BAM can capture data from the SOAP envelope in a WCF request, response, or fault message. The data is specified using the interceptor configuration (IC) file (XML file created by the developer).
- The service’s app.config must be modified to load the BAM components at runtime.
- WF Workflows (WF Interceptor): like WCF Services, BAM can also capture milestones from WF Activities. An IC file is used to specify the data that must be captured. BAM components must also be loaded at runtime.