Altova MapForce 2023 Enterprise Edition

SWIFT (Society for Worldwide Interbank Financial Telecommunication) is a global provider of financial messaging services. SWIFT MT (Message Text) is a message type used in SWIFT network. MapForce supports mapping SWIFT MT data to or from any other MapForce-supported format, including XML, CSV, JSON, databases, and others.


MapForce supports the following SWIFT MT releases: 2019 or newer. Note that the default installed version is SWIFT 2022.


Note:Mapping data to or from SWIFT MT requires BUILT-IN as a transformation language. You can preview the mapping in MapForce, save the output files, if any, or choose to execute it with MapForce Server (licensed separately) on a different computer or platform. It is not supported to generate an executable C#, C++, or Java program from mappings that read or write SWIFT MT data.


To support mapping data to or from various EDI-related formats, including SWIFT MT, MapForce uses configuration files, also known as EDI Collections,  specific to each release. An EDI collection is a directory that contains machine-readable configuration files, in XML format. By default, the EDI collections are installed in the following folder: C:\Program Files\Altova\MapForce2023\MapForceEDI. The name of collections (directories) applicable to SWIFT begins with SWIFT.


Be aware that only the latest supported SWIFT collection is installed by default. You can download and install additional versions from the Altova website.



The following limitations apply when mapping data to or from SWIFT MT components. These limitations are applicable regardless of the execution engine running the mapping, be it MapForce or MapForce Server.


The following message types are not supported:

oNon-FIN messages;

oCategory 0 messages (SWIFT system messages);

oCategory n messages (MTx9x).

To generate a SWIFT MT message, you need to supply the correct Message Type in the Application Header from the mapping, because it is not created automatically from content data. Make sure to map data for the correct message type into the message text body (block 4).

MapForce provides no validation of SWIFT MT content. Only basic checks required to parse a message are performed.

No checks are performed with respect to the maximum message length.

If the input is invalid, the parser stops with an error message, and no further recovery options are available.


Adding SWIFT MT components to the mapping

SWIFT MT messages have a structure that is significantly different from other EDI messages. Nevertheless, you can map SWIFT MT structures in MapForce in a way that is common to all EDI-based formats. Specifically, you can add SWIFT MT components (either source or target) to the mapping using any of the following approaches:


In the Insert menu, select the EDI command.

Click the Insert EDI btn_insert_edi toolbar button.


In the Browse EDI collections dialog box, select the required SWIFT release. Then select the check boxes corresponding to the message types that you need to add to the mapping (see screenshot below).


Note:By default, only a generic collection called SWIFT is available in the Browse EDI collections dialog box illustrated above. This default SWIFT collection is not suitable for production, because its version may change in newer versions of MapForce, just like all other EDI-related standards. For production, it is recommended to download and install the release-specific SWIFT configurations from the Altova website. After installation, these release-specific configurations will appear in the Browse EDI collections dialog box in addition to the default SWIFT configuration.


See also Adding EDI Components to the Mapping. For a mapping example, see Example: Convert SWIFT MT to SWIFT MX.


SWIFT MT settings

You can change the input files (or the path of the generated file) and other settings of SWIFT MT components in the Component Settings dialog box. To open the Component Settings dialog box, double-click the title bar of the component in MapForce. Alternatively, right-click the title bar and select Properties from the context menu.


For reference to all options available on this dialog box, see EDI Component Settings. Note that the validation settings are disabled (grayed out) for SWIFT MT components because they are not supported, as mentioned above.


Handling SWIFT MT data types

MapForce handles SWIFT MT-specific simple data types as follows:


You can map SWIFT MT date types to an item of type xs:date or to a function that takes xs:date as an input, and this will be processed correctly, without requiring any special handling. For example, if you map an item of type swift:date6 to a string, the resulting string is, for example, 20200922. However, if you map the same type to xs:date, the result is 2020-09-22 (of type xs:date).

If the target item is a string and you would like the date to be represented as 2020-09-22, add a variable of type xs:date to the mapping and map its result to the target string item.

If you map the swift:decimal value 42,66 to an item of type xs:decimal, the result is 42.66. However, if you map the same type to xs:string, the result is 42,66.

The same behavior is true for writing data to a target component. For example, if you map the xs:decimal value 15 to an item of type swift:decimal, the result is 15, (of type swift.decimal).


Quick conversion to XML

As with all other EDI-related formats, you can easily convert SWIFT MT files to XML without drawing any mapping connections. For details, see Generating XML from EDI.


© 2016-2022 Altova GmbH