SWIFT in Dictionary Builder

In this section:

This section guides you through the process of modifying a metadata for the messages in SWIFT data format using the Dictionary Builder tool in Transformer. The graphical representation of a SWIFT dictionary in Dictionary Builder is provided.


Top of page

x
Overview

In order to use the transaction with Transformer, each SWIFT transaction type must have a corresponding dictionary metadata. This section describes how to create a dictionary using Transformer to interpret the SWIFT messages.

To open the sample SWIFT project that is used as an example in this section, navigate to:

<iWaySMHome>\tools\transformer\samples\transform_projects\swift\SWIFT_to_XML\SWIFT_to_XML.gxp

where:

<iWaySMHome>

Is the directory where iWay Service Manager was installed.

The following instructions assume that you are familiar with SWIFT syntax, XML, and the specific SWIFT transaction with which you are working.

Be careful when making modifications to documents in Dictionary Builder. Published document standards allow documents to be traded easily between trading partners by establishing and agreeing to document footprints. If you add an element or segment, your partner may not be able to read your document. If you decide to allow a qualifier that is not in the published standard, your partner may reject your document for non-compliance. There are several commercial products available that can read and validate SWIFT documents. You should validate all data after transformation to be sure that it is still standards-compliant.

Note: You will find references being made to the SWIFT specification throughout this section. The SWIFT specification is an industry standard that is used by developers of SWIFT dictionaries and messages. For more information on the SWIFT format and its specification, visit the following Web sites:


Top of page

x
SWIFT Node

The SWIFT node is located at the Root of your structure's hierarchy. The following table lists attribute properties for the SWIFT node, and indicates which properties are necessary to be defined in compliance with iWay SWIFT specifications.

Attribute

Required

Name

Description

 

Version

For example, to define a SWIFT 2005 dictionary structure, a SWIFT opening tag (node) would be defined in the syntax with values for the Name and Version attributes.

In the following image, the SWIFT node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the SWIFT node.

To modify an attribute's value, double-click the corresponding row in the Value column and type the new value.



x
General Structure

SWIFT data dictionary consists of the following major blocks of metadata:

  1. Basic Header Block
  2. Application Header Block
  3. User Header Block
  4. Text Block or Body
  5. Trailer Block

The following image shows how the structure of a SWIFT metadata is displayed in the Dictionary Builder’s Layout pane.


Top of page

x
1. Basic Header Block

The following table lists the attribute properties for the Basic Header block.

Attribute

Required

Name

Description

 

Req

The Name attribute provides a character string that identifies the Basic Header block.

The Req attribute defines the requirement of the Basic Header block, which can be either 'M' (mandatory), or 'O' (optional).

In the following image, the Basic_Header node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Basic_Header node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The Basic Header block is divided into several sub-sections:

{1:
F
01
BANKBEBB
2222
123456}

(a)

(b)

(c)

(d)

(e)

The following table defines the parts of the Basic Header block:

Reference

Name

Value

(a)

Application ID

F = FIN, A = GPA or L = GPA (logins, etc.).

(b)

Service ID

01 = FIN/GPA, 21 = ACK/NAK.

(c)

LT address

12 characters, must not have 'X' in position 9.

(d)

Session number

Added by the CBT, padded with zeroes.

(e)

Sequence number

Added by the CBT, padded with zeroes.

Writing a Basic Header (for a and b)

Note: (c), (d), and (e) are sub-sections written in the same syntax.

A BASIC tag (node) contains the raw data, which is represented by the Element node. The following table lists the attribute properties for the Element node.

Attribute

Required

Name

Description

 

Req

Type

Content

 

ErrorCode

 

The Name attribute provides a character string that identifies the element. This value is provided by the author of the dictionary.

The Req attribute defines the requirement of the element and must be set to "M" for mandatory as specified by the user.

The Type attribute tells Transformer the types of characters and the amount of characters to expect.

In the following image, the Application_Identifier element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Application_Identifier element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the Service_Identifier node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Service_Identifier node.

To modify an attribute's value, double-click the corresponding row in the Value column and type the new value.



x
2. Application Header Block

The following table lists the attribute properties for the Application Header block.

Attribute

Required

Name

Description

 

Req

The Name attribute provides a character string that identifies the Application Header block.

The Req attribute defines the requirement of the Application Header block, which can be either 'M' (mandatory), or 'O' (optional).

In the following image, the Application_Header node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Application_Header node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The Application Header block has the following format:

{2:
I
100
BANKDEFFXXXX
U
3
003}

(a)

(b)

(c)

(d)

(e)

(f)

The following table defines the parts of the Application Header block:

(a)

I = Input

(b)

Message Type

(c)

Receiver's address with an X in position 9 and padded with X's if there is no bank branch.

(d)

Message Priority: S = System, N = Normal, U = Urgent

(e)

Delivery Monitoring:

1 = Non Delivery Warning (MT010)

2 = Delivery Notification (MT011)

3 = Both

Valid combinations of (d) and (e) are: U1 or U3, N2 or just N

(f)

Obsolescent Period: when a non-delivery notification is generated.

Valid for U = 003 (15 minutes)

Valid for N = 020 (100 minutes)

Writing an Application Header (a, b, and c)

Note: (d), (e), and (f) are sub-sections written in the same syntax. This example is written for an input message where (a) is "I". For the best interpretation of the syntax, include two segment tags (nodes) to represent both input and output. This ensures that an incoming message, whether input or output, is still read.

An APP tag (node) contains the Segment node. The following table lists the corresponding attributes for the Segment node.

Attribute

Required

Name

Description

Req

Options

 

Type

The Name attribute can be either "I" (input) or "O" (output).

The Description attribute can be either "Input" or "Output".

The Req attribute can be either 'M' (mandatory), or 'O' (optional).

The Type attribute tells Transformer the types of characters and the amount of characters to expect.

In the following image, the I segment node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the I segment node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the Input_Identifier element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Input_Identifier element node.

To modify an attribute's value, double-click the corresponding row in the Value column.



x
3. User Header Block

The following table lists the corresponding attributes for the User Header block.

Attribute

Required

Name

Description

 

Req

The Name attribute provides a character string that identifies the User Header block.

The Req attribute defines the requirement of the User Header block, which can be either 'M' (mandatory), or 'O' (optional).

In the following image, the User_Header node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the User_Header node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The User Header block has the following format:

{3:
{113:xxxx}
{108:abcdefgh12345678}
}

(a)

(b)

The following table defines the parts of the User Header block:

(a)

Optional banking priority code.

(b)

Message User Reference (MUR) used by applications for reconciliation with ACK.

Writing a User Header

A User Header node contains a Loop node. The following table lists the corresponding attributes for the Loop node.

Attribute

Required

Name

Description

 

Req

The Name attribute provides a character string that identifies the Loop node, which is specified by the author of the dictionary.

The Req attribute defines the requirement of the Loop node, which can be either 'M' (mandatory), or 'O' (optional).

In the following image, the INFO loop node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the INFO loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

A loop node can contain multiple element nodes as children. The following table lists the corresponding attributes for the element nodes.

Attribute

Required

Name

Description

 

Req

Type

The Name attribute provides a character string that identifies the element. This value is provided by the author of the dictionary.

The Req attribute defines the requirement of the element and must be set to "M" for mandatory as specified by the user.

The Type attribute tells Transformer the types of characters and the amount of characters to expect.

In the following image, the Generic_Code element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Generic_Code element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the Generic_Data element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Generic_Data element node.

To modify an attribute's value, double-click the corresponding row in the Value column.



x
4. Text Block or Body

The following table lists the corresponding attributes for the Text block or Body.

Attribute

Required

Name

Description

Req

 

The Name attribute provides a group of characters that reference the SWIFT message type number. For example, if you are creating a SWIFT message type 515, then the Name="515". This value must be the message type number specified by SWIFT.

The Description attribute specifies the name of the SWIFT message type referenced by 515. For example, 515 is the Client Confirmation of Purchase or Sale, therefore, its Description would be "Client Confirmation of Purchase or Sale". For this attribute, you can specify any name. However, it is recommended that you use the name specified by the SWIFT message type.

In the following image, 515 transaction set node is displayed in Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the 515 transaction set node.

To modify an attribute's value, double-click the corresponding row in the Value column.



x
Usage Rules for Transaction Set Tags (Nodes)

A Transaction Set node may contain Loop nodes. The following table lists the corresponding attributes for the Loop nodes.

Attribute

Required

Name

Description

Req

Max

Type

 

The Name attribute provides a unique ID as specified by the SWIFT specification.

The Description attribute provides a name for the loop as specified by the SWIFT specification.

The Req attribute defines the requirement of the loop and must be set to "O" for optional or "M" for mandatory, as specified by the SWIFT specification.

The Max attribute sets the maximum allowed number of occurrences of the loop, which is set to 1 by default.

In the following image, the A loop node is displayed in Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the A loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the L_99A loop node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the L_99A loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The following table lists the corresponding attributes for the Loop node.

Attribute

Required

Name

Description

Req

Max

 

Type

 

The Name attribute provides a unique ID created by the author of the dictionary.

The Description attribute provides a name for the loop created by the author of the dictionary.

The Req attribute defines the requirement of the loop and must be set to "O" for optional or "M" for mandatory, as specified by the SWIFT specification.

The Loop nodes contain Segment and Element nodes. Each SWIFT tag (node) that has a lowercase letter in the SWIFT specification has a loop surrounding it. An example of a lowercase letter tag (node) is 95a or 97a.

  • 95a has four other options of 95P, 95Q, 95R, and 95S, as specified by the SWIFT specification.
  • 97a has two other options of 97A and 97B, as specified by the SWIFT specification.

In the following image, the L_95A loop node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the L_95A loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The following table lists the corresponding attributes for the Loop node.

Attribute

Required

Name

Description

Req

Max

 

Type

 

The Name attribute provides a unique ID created by the author of the dictionary.

The Description attribute provides a name for the loop.

The Req attribute defines the requirement of the loop and must be set to "O" for optional or "M" for mandatory, as specified by the SWIFT specification.

The Max attribute sets the maximum allowed number of loop occurences, which is set to 1 by default.

This means only looping once to validate whether the input SWIFT message is correct. This is optional, but is available in case the SWIFT message is wrong. For example, if SWIFT has 95A and another 95A immediately following. This is incorrect because only one instance of 95A is allowed. If this SWIFT tag (node) is surrounded by an arrow in the SWIFT specification, then the Max parameter is not required.

The Loop nodes can contain Segment nodes. The following table lists the corresponding attributes for the Segment nodes.

Attribute

Required

Name

Description

Req

Options

 

Type

The Name attribute must be the SWIFT tag (node) as specified by the SWIFT specification.

The Description attribute is the name given to this SWIFT tag (node), as specified by the SWIFT specification.

The Req attribute defines the requirement of the segment and must be set to "O" for optional or "M" for mandatory, as specified by the SWIFT specification.

The Type attribute tells Transformer the types of characters and the amount of characters to expect.

In the following image, the 20C segment node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the 20C segment node.

To modify an attribute's value, double-click the corresponding row in the Value column.

If a SWIFT tag (node) is a Starting block, then the following attributes are required:

  • The Req attribute must either be "O" for optional or "M" for mandatory, as specified by the SWIFT specification.
  • The Type attribute must be the characters given in the CONTENT column, as specified by the SWIFT specification.

In the following image, the 16R segment node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the 16R segment node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the Start_of_Block element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Start_of_Block element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

If a SWIFT tag (node) is an Ending block, then the following attributes are required:

  • The Req attribute must either be "O" for optional or "M" for mandatory, as specified by the SWIFT specification.
  • The Type attribute must be the characters given in the CONTENT column, as specified by the SWIFT specification.

    The Type attribute is usually the same as the Starting Block Type parameter. It signifies to Transformer that this block is done.

In the following image, the 16S segment node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the 16S segment node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the End_of_Block element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the End_of_Block element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

If a SWIFT node has a lowercase letter, there is a loop.

In the following image, the L_97a Loop node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the L_97a loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The following table lists the corresponding attributes for the Loop node.

Attribute

Required

Name

Description

Req

Max

 

Type

 

The Name attribute must be the SWIFT tag (node), as specified by the SWIFT specification.

The Description attribute is the name given to this SWIFT tag (node), as specified by the SWIFT specification.

The Req attribute is always "O" for optional, regardless of whether the lowercase letter tag (node), for example, 97a, is mandatory or optional. The "M" and the "O" should be specified in the Loop tag (node); refer to a loop that has a SWIFT tag (node) of lowercase letters.

The Segment nodes contain Element nodes. SWIFT tags (nodes) contain SWIFT messages with data. Data can be characters that signify an action or just raw data. This data is represented in an Element node.

In the following image, the Qualifier element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Qualifier element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The following table lists the corresponding attributes for the Element node.

Attribute

Required

Name

Description

 

Req

Type

Content

ErrorCode

The Name attribute is the name given to this SWIFT tag (node), as specified by the SWIFT specification.

The Description attribute is a group of characters that references the Name parameter; this field is created by the author of the dictionary.

The Req attribute is not required, because the brackets ([]) in the Type parameter indicate optional components. Thus (d) and (e) are optional, that is, they are not required in the SWIFT message.

The Type attribute tells Transformer the types and amount of characters to expect.

Everything must be entered in the Type parameter, including /, //, :, and [ ]. For example, if the content is :4!c/16x//12c/[4!a][/12c], five Element tags (nodes) are entered into the Type parameters accordingly:

(a) :4!c -> ... Type=":4!c"

(b) /16x -> ... Type="/16x"

(c) //12c -> ... Type="//12c"

(d) /[4!a] -> ... Type="/[4!a]"

(e) [/12c] -> ... Type="[/12c]"

If the Content column in the SWIFT specification has a constant in the Type parameter of the Element tag (node), you must replace it with the correct type accordingly, if the SWIFT specification does not provide a Type.

For example, for 35B, the content is [ISIN1!e12!c] ->

<Element .... Type="[4!c1!e12!c]" />

where 4!C=ISIN

If the Content column in the SWIFT specification has two or more types on separate lines, then you must specify this in the Type parameter, unless it is already specified in the SWIFT specification.

The following is an example of a Type that is not specified. For the SWIFT tag (node) 61, the content is:

6!n[4!n]2a[1!a]15d1!a3!c16x[//16x]
[34x]

The Type for the second line is:

Type="[1*34]"

The characters 1* informs Transformer of data on a new line of the SWIFT message that is part of the SWIFT tag (node) 61.

The following is an example of one that is already specified. For the SWIFT tag (node) 35B, the content is:

[ISIN1!e12!c]
[4*35x]

The Type for the second line is:

Type="[4*35x]"

The characters 4*, as specified by the SWIFT specification, inform Transformer that on the next four new lines of the SWIFT message, the data is part of the SWIFT tag (node) 35B.



x
5. Trailer Block

The following table lists the corresponding attributes for the Trailer block.

Attribute

Required

Name

Description

 

Req

 

The Trailer block requires a value for the Name attribute, which can be a word or a character string. It is recommended that you use Trailer.

In the following image, the Trailer node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Trailer node.

To modify an attribute's value, double-click the corresponding row in the Value column.

The Trailer block has the following format:

{5:
{MAC:12345678}
{CHK:123456789ABC}

(a)

(b)

Trailer Block

The following table lists the corresponding attributes for the Loop node.

Attribute

Required

Name

Description

 

Req

The Name attribute provides a character string that identifies the Loop tag (node), which is specified by the author of the dictionary.

The Req attribute defines the requirement of the Loop tag (node), which can be either 'M' (mandatory), or 'O' (optional).

In the following image, the INFO loop node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attributes for the INFO loop node.

To modify an attribute's value, double-click the corresponding row in the Value column.

A Loop node can contain Element nodes. The following table lists the corresponding attributes for the Element nodes.

Attribute

Required

Name

Description

 

Req

Type

The Name attribute provides a character string that identifies the Element tag (node), which is specified by the author of the dictionary.

The Req attribute defines the requirement of the Element tag (node), which can be either 'M' (mandatory), or 'O' (optional).

The Type attribute tells Transformer the types and amount of characters to expect. In this example, a type attribute is not specified because any value can be used.

Note: For a loop in a trailer header, you can specify only two elements.

In the following image, the Code element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Code element node.

To modify an attribute's value, double-click the corresponding row in the Value column.

In the following image, the Data element node is displayed in the Layout pane of Dictionary Builder. The Item Properties pane on the bottom provides a list of attribute properties for the Data element node.

To modify an attribute's value, double-click the corresponding row in the Value column.



x
Validation

The following structural validation rules are supported in the Dictionary Builder interface.

Note: The structural validation is performed at the message level.

  1. The message structure should have only one Transaction Set.
  2. The following rules are maintained at all levels:
    1. Segments can have elements and/or composite elements as children.

      Note: Composite elements are not applicable for SWIFT but are applicable for EDI X12 and EDIFACT.

    2. Composite elements can have component elements as children.
    3. Loops can have loops and/or segments as children.
    4. Transaction Sets can have loops and/or segments.
  3. All mandatory attributes defined for any node should have the values within the range.

    For example, the Req attribute of a particular node can take either an M or O value in the case of SWIFT, while EDI data format allows for complex relations to be contained in this attribute.

  4. The following blocks need to be present in sequential order:
    1. Basic_Header
    2. Application_Header (I/O)
    3. User_Header
    4. Transaction Set
    5. Trailer

iWay Software