EDIMessageTypeParseString - System Parameter
The EDIMessageTypeParseString System Parameter is the pattern the Logging Service uses to build the Message Type name of an EDIFACT message from its UNH (message header) segment. The Message Type name decides which Search Field Expressions apply to the message.

Animated walkthrough: after the pattern changes, the next invoice gets the Message Type EDIFACT_INVOIC_D96A, while the invoice logged before keeps INVOIC.D 96A UN. The pattern was put back afterwards.
At a Glance
| Property | Value |
|---|---|
| Key | EDIMessageTypeParseString |
| Data type | string (pattern) |
| Default | {MessageType}.{MessageVersionNumber} {MessageReleaseNumber} {ControllingAgencyCoded} (with a space before the last two variables) |
| Read by | Logging Service |
| Takes effect | Within about 15 seconds, for newly logged messages only; no restart needed |
| Status | ✅ Active |
How It Works
When the Logging Service works out the Message Type of an EDIFACT message from its body, it reads the UNH segment and replaces each variable in the pattern with the matching value. Text outside the braces is kept as written. The result becomes the Message Type name of the message.
The pattern is used only when all of these are true:
- The event asks for the Message Type from the body: it has the context option
ExtendedProperties/1.0#MessageTypeExtractFromBodyset totrue(see Context Options), or it comes through the BizTalk Log Agent. - The body is neither XML nor JSON with a
$schema. - The body has a UNH segment.
A Message Type set explicitly with the context option MessageTypeName always takes precedence.
Take this UNH segment:
UNH+1+ORDERS:D:96A:UN:EAN008'
With the default pattern, the Message Type name becomes ORDERS.D 96A UN.
Pattern Variables
| Variable | UNH data element | Example value | Meaning |
|---|---|---|---|
{MessageReferenceNumber} |
0062 | 1 |
Message reference number, usually sequential |
{MessageType} |
0065 | ORDERS |
Message type, such as ORDERS, DESADV, INVOIC |
{MessageVersionNumber} |
0052 | D |
Message version number |
{MessageReleaseNumber} |
0054 | 96A |
Message release number, such as 96A or 01B |
{ControllingAgencyCoded} |
0051 | UN |
Controlling agency (UN = UN/CEFACT) |
{AssociationAssignedCode} |
0057 | EAN008 |
Association assigned code (optional in the message) |
{CodeListDirectoryVersionNumber} |
0110 | 8 |
Code list directory version number (optional in the message) |
{MessageTypeSubFunctionIdentification} |
0113 | 1 |
Message type sub-function identification (optional in the message) |
The optional components are read by their position in the message identifier (S009). An empty component keeps its place, so in INVOIC:D:14B:UN:EAN010::1 the code list directory version is empty and the sub-function is still 1. A value can contain the decimal mark, for example a code list directory version of 2.3.
Examples
| Pattern | UNH segment | Message Type name |
|---|---|---|
{MessageType}.{MessageVersionNumber} {MessageReleaseNumber} {ControllingAgencyCoded} (default) |
UNH+1+ORDERS:D:96A:UN:EAN008' |
ORDERS.D 96A UN |
{MessageType}.{MessageVersionNumber}{MessageReleaseNumber}{ControllingAgencyCoded} (recommended, without spaces) |
UNH+1+ORDERS:D:96A:UN:EAN008' |
ORDERS.D96AUN |
EDIFACT_{MessageType}_{MessageVersionNumber}{MessageReleaseNumber} (the walkthrough above) |
UNH+509010117+INVOIC:D:96A:UN' |
EDIFACT_INVOIC_D96A |
{MessageType}.{MessageVersionNumber}{MessageReleaseNumber}.{AssociationAssignedCode} |
UNH+1+DESADV:D:01B:UN:EAN008' |
DESADV.D01B.EAN008 |
EDIFACT.{MessageType} |
UNH+1+INVOIC:D:96A:UN' |
EDIFACT.INVOIC |
{MessageType}.{MessageTypeSubFunctionIdentification} |
UNH+1+INVOIC:D:14B:UN:EAN010::1' |
INVOIC.1 |
Impact on Message Types and Search Fields
- A changed pattern applies only to messages logged after the change. Existing Message Types and logged messages keep their names, so for a while the same EDIFACT message can appear under two Message Type names.
- Search Field Expressions are bound to Message Types. After a change, add the new Message Type names to the expressions that should keep extracting Search Field values, and check your Log Views.
- New Message Types get their retention settings when they are created; see Add or manage Message Type.
Choosing a Value
- ✅ Keep the default, or use the recommended version without spaces. Both tell versions and releases apart, so each can have its own Search Field Expressions.
- Use a shorter pattern, such as
EDIFACT.{MessageType}, when one set of expressions should apply to all versions of a message type. - Use only variables that all your messages carry. A variable without a value in the UNH segment gives an incomplete name (for example a trailing
.). - Don't put
{,}, or a variable's name (such asMessageType) as plain text in the pattern. Such a pattern is ignored: the message keeps its original Message Type name, and nothing is logged about it. - Test a new pattern in a test environment with real messages from your trading partners, and check the resulting Message Type name in a Log View, before you change production.