Support: Online Documentation: Macros: Pre-Configured Macros

The following page details the pre-configured macros that are supplied with the component. These macros must be configured as per the instructions at XXX.

General Macros

The following macros are read from the context property of the message (irrespective of whether they are promoted or not promoted).

Depending on where the Message Archiving component is used, not all macro's will be available. For example, if the component is used in the Decode stage of a Receive Pipeline, the MessageType macro will not be available as it is set by the XmlDisassembler/FlatFileDisassembler component which is yet to be invoked.

Message Tracking Properties

Macro Name Macro Usage Macro Description Direction
PortName %PortName% The name of the port on which the message originated. Receive Only

System Properties

Macro Name Macro Usage Macro Description Direction
InboundTransportType %InboundTransportType% The name of the adapter type that received the message, e.g. 'SOAP', 'FILE', 'HTTP' etc. Receive Only
InboundTransportLocation %InboundTransportLocation% The name of the receive location that received the message. Receive Only
InterchangeID %InterchangeID% The identifier associated with a batch of messages when a single message is debatched into multiple messages by a disassembler component. In these debatched scenarios, the same InterchangeId property will be present in the context of each message. Rec. & Send1
InterchangeSequenceNumber %InterchangeSequenceNumber% A sequence number associated with each debatched message when a single message is debatched into multiple messages by a disassembler component. Rec. & Send1
MessageType %MessageType% Type of the BizTalk message. The message type is defined as a concatenation of the document schema namespace and the document root node, separated by a hash character ('#'). Rec. & Send1
MessageType-Namespace %MessageType-Namespace% The namespace element of the MessageType property. Rec. & Send1
MessageType-RootNodeName %MessageType-RootNodeName% The Root Node element of the MessageType property. Rec. & Send1

1 Only available in a Send Pipeline if promoted into the Message Context.


Message Macros

The following macros are read directly from the message itself and are available on all messages, irrespective of the adapter on which they are received.

Macro Name Macro Usage Macro Description Direction
MessageID %MessageID% Message GUID generated by BizTalk. Rec. & Send
BodyPartName %BodyPartName% Name of the body part of the message. Rec. & Send
PartCount %PartCount% Number of parts contained within the message. Rec. & Send


Date & Time Macros

The following date/time macros are available for all messages, irrespective of the adapter on which they are received.

Macro Name Macro Usage Macro Description Direction
DateTime %DateTime% UTC date & time in the format YYYY-MM-DDThhmmss (e.g. 2009-09-10T103545). Rec. & Send
DateTime.Tz %DateTime.Tz% Local date time plus time zone from GMT in the format YYYY-MM-DDThhmmssZZZ, (for example, 2009-09-10T103545+800). Rec. & Send
Time %Time% UTC time in the format hhmmss (e.g. 103545). Rec. & Send
Time.Tz %Time.Tz% Local time plus time zone from GMT in the format hhmmssZZZ (e.g. 103545+800). Rec. & Send


FILE Adapter Macros

The following macros are available for messages received on the FILE Adapter:

Macro Name Macro Usage Macro Description Direction
FileCreationTime %FileCreationTime% The date and time that the file adapter retrieved the message from the file-system. Receive Only
FileReceivedFilename %FileReceivedFilename% The original filename of the message including the directory, filename and extension. Receive Only
FileReceivedFilename-FilenameOnly %FileReceivedFilename-FilenameOnly% The original filename of the message - filename only (does not include the extension). Receive Only
FileReceivedFilename-ExtensionOnly %FileReceivedFilename-ExtensionOnly% The original filename of the message - extension only. Receive Only
FileUsername %FileUsername% The user name for the account used when specifying alternative credentials to access a network share. Receive Only

Further information regarding context properties written by the File Adapter can be found online at the Microsoft Technet website: File Adapter Property Schema and Properties.


FTP Adapter Macros

The following macros are available for messages received on the FTP Adapter:

Macro Name Macro Usage Macro Description Direction
FtpReceivedFilename %FtpReceivedFilename% The original filename of the message as it resided on the FTP server, including the directory, filename and extension. Receive Only
FtpReceivedFilename-FilenameOnly %FtpReceivedFilename-FilenameOnly% The original filename of the message - filename only (does not include the extension). Receive Only
FtpReceivedFilename-ExtensionOnly %FtpReceivedFilename-ExtensionOnly% The original filename of the message - extension only. Receive Only
FtpRepresentationType %FtpRepresentationType% Specifies how the FTP adapter sends data, either 'ASCII' or 'Binary'. Send Only
FtpSSOAffiliateApplication %FtpSSOAffiliateApplication% The Enterprise Single Sign-On affiliate application to use on the FTP send port. Send Only
FtpUsername %FtpUsername% The user name to log on to the FTP server when sending messages. Send Only

Note: the %FtpReceivedFilename% macro (and extension macros) does not contain any directory information as per a limitation in the FTP adapter itself. To get the full name of the file, including directory and originating FTP servername, use the %InboundTransportLocation% macro instead. See http://www.modhul.com/2009/03/04/ftp-adapter-context-property-oddities/ for more information.

Further information regarding context properties written by the FTP Adapter can be found online at the Microsoft Technet website: FTP Adapter Property Schema and Properties.


POP3 Adapter Macros

The following macros are available for messages received via the POP3 Adapter:

Macro Name Macro Usage Macro Description Direction
Pop3Subject %Pop3Subject% The subject line of the received message. Receive Only
Pop3From %Pop3From% The 'from' address of the e-mail message. Receive Only
Pop3To %Pop3To% The 'To' address of the e-mail message. Receive Only
Pop3ReplyTo %Pop3ReplyTo% The 'reply-to' address of the e-mail message. Receive Only
Pop3Cc %Pop3Cc% The 'CC' address of the e-mail message. Receive Only
Pop3Date %Pop3Date% The date the e-mail message was sent. Receive Only
Pop3DispositionNotificationTo %Pop3DispositionNotificationTo% The 'DispositionNotificationTo' value from the e-mail message. Receive Only

Further information regarding context properties written by the POP3 Adapter can be found online at the Microsoft Technet website: POP3 Adapter Property Schema and Properties.


SMTP Adapter Macros

The following macros are available for messages sent via the SMTP Adapter:

Macro Name Macro Usage Macro Description Direction
SmtpSubject %SmtpSubject% The subject line of the e-mail message. Send Only
SmtpFrom %SmtpFrom% The 'from' address of the e-mail message. Send Only
SmtpTo %SmtpTo% The 'To' address of the e-mail message. Send Only
SmtpCc %SmtpCc% The 'CC' address of the e-mail message. Send Only
SmtpHost %SmtpHost% The name of the SMTP server used when sending messages. Send Only
SmtpUsername %SmtpUsername% The username to use for authentication with the SMTP server. Send Only
SmtpEmailBodyTextCharset %SmtpEmailBodyTextCharset% The character set used for encoding the body of the e-mail message. Send Only

Further information regarding context properties written by the SMTP Adapter can be found online at the Microsoft Technet website: SMTP Adapter Property Schema and Properties.


HTTP Adapter Macros

The following macros are available for messages received via the HTTP Adapter:

Macro Name Macro Usage Macro Description Direction
HttpContentType %HttpContentType% Content type of the request messages. Rec. & Send
HttpAuthenticationScheme %HttpAuthenticationScheme% Type of authentication to use with the destination server. Rec. & Send
HttpCertificate %HttpCertificate% Thumbprint of the client SSL certificate. Rec. & Send
HttpProxyName %HttpProxyName% The proxy server address. Send Only
HttpProxyPort %HttpProxyPort% The proxy server port. Send Only
HttpProxyUsername %HttpProxyUsername% The username for authentication with the proxy server. Send Only
HttpUsername %HttpUsername% The username used for authentication with the server. Send Only
HttpAffiliateApplicationName %HttpAffiliateApplicationName% Name of affiliate application to use for SSO. Send Only

Further information regarding context properties written by the HTTP Adapter can be found online at the Microsoft Technet website: HTTP Adapter Property Schema and Properties.


SOAP Adapter Macros

The following macros are available for messages received via the SOAP Adapter:

Macro Name Macro Usage Macro Description Direction
SoapAssemblyName %SoapAssemblyName% Identifies the .NET type and assembly to be loaded and executed. Send Only
SoapMethodName %SoapMethodName% Identifies the target method on the .NET assembly that is to be invoked. Send Only
SoapUsername %SoapUsername% User name to use for authentication with the server. Rec. & Send
SoapClientCertificate %SoapClientCertificate% Thumbprint of the client SSL certificate. Rec. & Send
SoapProxyAddress %SoapProxyAddress% The proxy server address. Send Only
SoapProxyPort %SoapProxyPort% The proxy server port. Send Only
SoapProxyUsername %SoapProxyUsername% The username for authentication with the proxy server. Send Only
SoapAffiliateApplicationName %SoapAffiliateApplicationName% Defines the name of the affiliate application to use for SSO. Send Only
SoapAuthenticationScheme %SoapAuthenticationScheme% Specifies the type of authentication to use with the destination server. Send Only

Further information regarding context properties written by the SOAP Adapter can be found online at the Microsoft Technet website: SOAP Adapter Property Schema and Properties.


MSMQ Adapter Macros

The following macros are available for messages received via the MSMQ Adapter:

Macro Name Macro Usage Macro Description Direction
MsmqSentTime %MsmqSentTime% The date and time the message was sent by the originator. Receive Only
MsmqArrivedTime %MsmqArrivedTime% The time that the message arrived in the destination queue. Receive Only
MsmqSourceMachine %MsmqSourceMachine% The computer from which the message originated. Receive Only
MsmqId %MsmqId% The message's identifier. Rec. & Send
MsmqLabel %MsmqLabel% Unicode string that describing the message. Rec. & Send
MsmqAdministrationQueue %MsmqAdministrationQueue% Name of the queue where acknowledgment messages are to be sent. Rec. & Send
MsmqCorrelationId %MsmqCorrelationId% The message identifier used by acknowledgment, report, and response messages to reference the original message. Rec. & Send
MsmqResponseQueue %MsmqResponseQueue% Name of the queue where response messages are to be sent. Rec. & Send
MsmqCertificateThumbPrint %MsmqCertificateThumbPrint% The thumbprint of the client certificate that you want to use for message authentication purposes. Send Only

Further information regarding context properties written by the MSMQ Adapter can be found online at the Microsoft Technet website: MSMQ Adapter Property Schema and Properties.


Windows Sharepoint Services (WSS) Adapter Macros

The following macros are available for messages received via the WSS (Windows Sharepoint Services) Adapter:

Macro Name Macro Usage Macro Description Direction
WssFilename %WssFilename% The file name with the extension of the Windows SharePoint Services file. File names, including extensions, are unique within a document library. Receive Only
WssUrl %WssUrl% The URL of the file. Receive Only
WssTransmittedFileLocation %WssTransmittedFileLocation% Used by Business Activity Monitoring (BAM) for integration purposes and is not available in orchestrations. Receive Only
WssInArchivedMsgUrl %WssInArchivedMsgUrl% The URL of the file in the archive document library. This property is not available if the receive location is not archiving the message. Receive Only
WssInTitle %WssInTitle% The title of the Windows SharePoint Service file. This is different from the file name. Titles don't have to be unique within a document library. Receive Only
WssInLastModified %WssInLastModified% The last modified date of the Windows SharePoint Service. Receive Only
WssInLastModifiedBy %WssInLastModifiedBy% The name of the last user that modified the file. Receive Only
WssInItemId %WssInItemId% The ID of the file. This is an integer unique within the document library which can be used to access the file. Receive Only
WssInCreated %WssInCreated% The date when the Windows SharePoint Service file was created. Receive Only
WssInCreatedBy %WssInCreatedBy% The user that created the file. Receive Only
WssInFileSize %WssInFileSize% The size of the Windows SharePoint Services file. Receive Only
WssInListName %WssInListName% The name of the document library where this file is located. Receive Only
WssInListUrl %WssInListUrl% The URL of the document library, or document library folder where this file is located. Receive Only
WssConfigAdapterWSPort %WssConfigAdapterWSPort% The port or IIS Web site where the adapter has been installed and configured. Receive Only

Further information regarding context properties written by the Windows Sharepoint Services Adapter can be found online at the Microsoft Technet website: WSS Adapter Property Schema and Properties.


Windows Communication Foundation (WCF) Adapter Macros

The following macros are available for messages received or sent via the WCF Adapters. See the Adapters column for details of which adapter/direction a specific macro can be used.

Macro Name Macro Usage Macro Description Adapters
WcfAffiliateApplicationName %WcfAffiliateApplicationName% Defines the name of the affiliate application to use for SSO. All of the WCF send adapters except the WCF-NetNamedPipe adapter
WcfAlgorithmSuite %WcfAlgorithmSuite% The message encryption and key-wrap algorithms. These algorithms map to those specified in the Security Policy Language (WS-SecurityPolicy) specification. WCF-BasicHttp, WCF-NetMsmq, WCF-NetTcp & WCF-WSHttp adapters
WcfBindingType %WcfBindingType% The type of the binding to use for the endpoint; for example: 'basicHttpBinding', 'netMsmqBinding', 'netTcpBinding' etc. WCF-Custom & WCF-CustomIsolated adapters
WcfClientCertificate %WcfClientCertificate% The thumbprint of the X.509 certificate used to authenticate with endpoint services. WCF-BasicHttp, WCF-WSHttp, WCF-NetTcp & WCF-NetMsmq adapters
WcfCustomDeadLetterQueue %WcfCustomDeadLetterQueue% The fully qualified URI with the net.msmq scheme for the location of the per-application dead-letter queue, where messages that have expired or that have failed transfer or delivery are placed. For example: 'net.msmq://localhost/DeadLetterQueueName'. WCF-NetMsmq send adapter
WcfDeadLetterQueue %WcfDeadLetterQueue% The fully qualified URI of the dead-letter queue where messages that have failed to be delivered to the application will be transferred. WCF-NetMsmq send adapter
WcfInboundNodeEncoding %WcfInboundNodeEncoding% The type of encoding that the WCF receive adapter uses to decode the node identified by the body path expression specified in InboundBodyPathExpression; for example: 'Base64', 'String', 'XML' etc. All of the WCF adapters except the WCF-NetMsmq send adapter
WcfMessageClientCredentialType %WcfMessageClientCredentialType% The type of credential to be used when performing client authentication using message-based security. The applicable values differ for each WCF adapter. For more information see how-to topics for each WCF adapter in WCF Adapters. WCF-BasicHttp, WCF-WSHttp, WCF-NetTcp & WCF-NetNamedPipe adapters
WcfMessageEncoding %WcfMessageEncoding% The encoding of the WCF message; for example: 'Text', 'Mtom' etc. WCF-BasicHttp & WCF-WSHttp adapters
WcfMsmqAuthenticationMode %WcfMsmqAuthenticationMode% The MSMQ transport authentication method; for example: 'WindowsDomain' etc. For more information about the applicable values for the MsmqAuthenticationMode property, see the MSMQ authentication mode property in WCF-NetMsmq Transport Properties Dialog Box, Send, Security Tab. WCF-NetMsmq adapter
WcfMsmqEncryptionAlgorithm %WcfMsmqEncryptionAlgorithm% The algorithm used for message encryption on the wire when transferring messages between MSMQ message queue managers; for example: 'RC4Stream', 'AES' etc. WCF-NetMsmq adapter
WcfMsmqEncryptionAlgorithm %WcfMsmqEncryptionAlgorithm% The way messages are secured at the level of the MSMQ transport; for example: 'None', 'Sign', 'EncryptAndSign' etc. WCF-NetMsmq adapter
WcfMsmqSecureHashAlgorithm %WcfMsmqSecureHashAlgorithm% The hash algorithm to be used for computing the MSMQ message digest; for example: 'MD5', 'SHA1', 'SHA512' etc. WCF-NetMsmq adapter
WcfProxyAddress %WcfProxyAddress% The address of the proxy server if specified. WCF-BasicHttp & WCF-WSHttp adapters
WcfProxyUsername %WcfProxyUsername% The user name to use for the proxy server specified in the 'ProxyAddress' property. WCF-BasicHttp & WCF-WSHttp adapters
WcfServiceCertificate %WcfServiceCertificate% For receive locations, this property specifies the thumbprint of the X.509 certificate that clients used to authenticate themselves with against your endpoint; For send ports, this property specifies the thumbprint of the X.509 certificate for authenticating the service to which the send port sends messages. WCF-BasicHttp, WCF-WSHttp, WCF-NetTcp (receive adapter) & WCF-NetMsmq adapters
WcfTextEncoding %WcfTextEncoding% The character set encoding used when sending messages; for example: 'unicodeFFF', 'utf-8' etc. WCF-BasicHttp & WCF-WSHttp adapters
WcfTo %WcfTo% The destination endpoint address for outgoing WCF messages that the WCF send ports send. All WCF send adapters
WcfTransactionProtocol %WcfTransactionProtocol% The transaction protocol to be used with the specified binding; for example: 'OleTransaction', 'WS-AtomicTransaction' etc. WCF-NetTcp & WCF-NetNamedPipe adapters
WcfTransportProtectionLevel %WcfTransportProtectionLevel% The TCP transport level security; for example: 'None', 'Sign', 'EncryptAndSign' etc. WCF-NetTcp & WCF-NetNamedPipe adapters
WcfUserName %WcfUserName% The user name to use for authentication with the destination server when using SSO. All WCF send adapters except the WCF-NetNamedPipe adapter

Further information regarding context properties written by the Windows Communication Foundation Adapters can be found online at the Microsoft Technet website: WCF Adapters Property Schema and Properties.


EDI Pipeline Macros

The following macros are available for EDI messages that have passed through EDI receive or send pipelines (more information on these pipelines is available at MSDN: EDI Solution Architecture):

EDI Macros Available for both X12 and EDIFACT Messages

The following macros are available for both X12 and EDIFACT messages:

Macro Name Macro Usage Macro Description Direction
EdiBatchId %EdiBatchId% The batch Id of the batch configuration used when processing the message. Rec. & Send
EdiBatchName %EdiBatchName% The name of the batch configuration used when processing the message. Rec. & Send
EdiCodePage %EdiCodePage% The code page used to validate the interchange. Rec. & Send
EdiAttachmentId %EdiAttachmentId% The ID of the message attachment. Rec. & Send
EdiBatchEncodingType %EdiBatchEncodingType% The type of encoding on an outgoing batched interchange. Rec. & Send
EdiEncodingType %EdiEncodingType% The type of encoding on an outgoing message. Send Only
EdiDestinationPartyId %EdiDestinationPartyId% The ID of the destination party. Rec. & Send
EdiDestinationPartyName %EdiDestinationPartyName% The name of the destination party. Rec. & Send
EdiDestinationPartyReceiverIdentifier %EdiDestinationPartyReceiverIdentifier% The destination party identifier. Rec. & Send
EdiDestinationPartyReceiverQualifier %EdiDestinationPartyReceiverQualifier% The destination party qualifier. Rec. & Send
EdiDestinationPartySenderIdentifier %EdiDestinationPartySenderIdentifier% The sending party identifier. Rec. & Send
EdiDestinationPartySenderQualifier %EdiDestinationPartySenderQualifier% The sending party qualifier. Rec. & Send

EDI Macros Available for X12 Messages Only

The following macros are only available when using X12 messages:

Macro Name Macro Usage Macro Description Direction
EDIX12GS01 %EDIX12GS01% The X12 Functional Identifier Code. Rec. & Send
EDIX12GS02 %EDIX12GS02% The X12 Application Sender Code. Rec. & Send
EDIX12GS03 %EDIX12GS03% The X12 Application Receiver Code. Rec. & Send
EDIX12GS07 %EDIX12GS07% The X12 Responsible Agency. Rec. & Send
EDIX12GS08 %EDIX12GS08% The X12 Version/Release/Industry Identifier Code. Rec. & Send
EDIX12ISA05 %EDIX12ISA05% The X12 Interchange Sender Qualifier. Rec. & Send
EDIX12ISA06 %EDIX12ISA06% The X12 Interchange Sender Id. Rec. & Send
EDIX12ISA07 %EDIX12ISA07% The X12 Interchange Receiver Qualifier. Rec. & Send
EDIX12ISA08 %EDIX12ISA08% The X12 Interchange Receiver Id. Rec. & Send
EDIX12ISA15 %EDIX12ISA15% The X12 Usage Indicator. Rec. & Send
EDIX12ST01 %EDIX12ST01% The X12 Transaction Set Identifier Code. Rec. & Send

EDI Macros Available for EDIFACT Messages Only

The following macros are only available when using EDIFACT messages:

Macro Name Macro Usage Macro Description Direction
EDIFACTUNB11 %EDIFACTUNB11% The EDIFACT Usage indicator. Rec. & Send
EDIFACTUNB2_1 %EDIFACTUNB2_1% The EDIFACT Interchange Sender Id. Rec. & Send
EDIFACTUNB2_2 %EDIFACTUNB2_2% The EDIFACT Interchange Sender Code Qualifier. Rec. & Send
EDIFACTUNB2_3 %EDIFACTUNB2_3% The EDIFACT Address for Reverse Routing. Rec. & Send
EDIFACTUNB3_1 %EDIFACTUNB3_1% The EDIFACT Interchange Recipient Id. Rec. & Send
EDIFACTUNB3_2 %EDIFACTUNB3_2% The EDIFACT Interchange Recipient Code Qualifier. Rec. & Send
EDIFACTUNG1 %EDIFACTUNG1% The EDIFACT Functional Group Identification. Rec. & Send
EDIFACTUNG2_1 %EDIFACTUNG2_1% The EDIFACT Application Sender's Identification. Rec. & Send
EDIFACTUNG3_1 %EDIFACTUNG3_1% The EDIFACT Application Recipient's Identification. Rec. & Send
EDIFACTUNH2_1 %EDIFACTUNH2_1% The EDIFACT Message Type. Rec. & Send
EDIFACTUNH2_2 %EDIFACTUNH2_2% The EDIFACT Message Version Number. Rec. & Send
EDIFACTUNH2_3 %EDIFACTUNH2_3% The EDIFACT Message Release Number. Rec. & Send

Further information regarding context properties for EDI can be found online at the Microsoft Technet website: EDI Property Schema and Properties.


AS2 Pipeline Macros

The following macros are available for AS2 messages that have passed through AS2 receive or send pipelines (more information on these pipelines is available at MSDN: AS2 Solution Architecture):

Macro Name Macro Usage Macro Description Direction
AS2From %AS2From% The sender's name from the AS2-From header. Receive Only
AS2PayloadContentType %AS2PayloadContentType% The content type of the payload message. Receive Only
AS2To %AS2To% The receiver's name from the AS2-To header. Receive Only
AS2DispositionMode %AS2DispositionMode% The AS2 MDN disposition mode value. Receive Only
AS2DispositionType %AS2DispositionType% The AS2 MDN disposition type value. Receive Only
AS2MessageId %AS2MessageId% The Message ID contained within the AS2 message header. Receive Only
AS2OriginalMessageId %AS2OriginalMessageId% The Message ID of the original AS2 message. Receive Only
AS2PreservedFileName %AS2PreservedFileName% The original file name of the message. Note: This context property will only be populated if the incoming message includes filename information as part of the Content-Disposition MIME header. Receive Only

Further information regarding context properties for AS2 can be found online at the Microsoft Technet website: AS2 Property Schema and Properties.


MIME/SMIME Pipeline Macros

The following macros are available for messages that are to be passed through the MIME/SMIME Encoder send pipeline component:

Macro Name Macro Usage Macro Description Direction
MimeEncFileName %MimeEncFileName% The file name header of the MIME/SMIME part. Send Only
MimeEncContentId %MimeEncContentId% The Content-ID header of the MIME/SMIME part. Send Only
MimeEncContentDescription %MimeEncContentDescription% The Content-Description header of the MIME/SMIME part. Send Only
MimeEncContentTransferEncoding %MimeEncContentTransferEncoding% The Content-Transfer-Encoding header of the MIME/SMIME part. Send Only
MimeEncContentLocation %MimeEncContentLocation% The Content-Location header of the MIME/SMIME part. Send Only

Further information regarding context properties for the MIME/SMIME Encoder pipeline component can be found online at the Microsoft Technet website: MIME/SMIME Property Schema and Properties.