The SWIFTSegmentMergeReceiver merges two or more segmented data files generated from the SegmentDataCreatorReceiver, into one or more SWIFT format files. 

Note: The loopCount of the Root Segment Domain determines how many SWIFT files must be generated.

In This Article

When should this Receiver be used? 

  • Any time you want to generate nested SWIFT file output.

When should this Receiver not be used? 

  • Any time you want to generate another type of nested output.

Are any additional items required to use this Receiver? 

  • SegmentDataCreatorReceiver- Must be assigned to each Domain, except the Merge Domain.
    • Note: The SWIFTSegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.

  • Configuration File - Used to determine the XML output format. This is typically named "config.xml", but can be named differently if needed. 
    • Note: When named differently, the name will also need to be changed for the configName parameter within the Receiver.

List of Steps to Generate Nested SWIFT File Format

  1. Set up a Project with Domains, Parent-Child Relationships, and Scenarios.
  2. For each Domain except the Merge Domain, complete the following: 
  3. Create a Merge Domain with just an id Attribute 
    • Note: This may have already been done if Domains were imported.
  4. Add the SWIFTSegmentMergeReceiver to the Merge Domain and configure it, as discussed in this article. 
  5. Create a Scenario Chain with all Domain Scenarios. Make sure the Merge Scenario is in the last position.
  6. Create a Configuration File as discussed in this article. 
  7. Download the Scenario Chain to your local computer.
  8. Download the Configuration file to your local computer. 
    • Note: The configuration file will need to be placed in the location defined here (see the image below):

Receiver Parameters

SWIFTSegmentMergeReceiver requires that the following parameters are defined. Items with an asterisk (*) are required. 

  • outputPath* - Defines the location to store the newly generated SWIFT file(s).
  • outputSubDirectory - Defines the prefix name of subdirectories that are auto-created under the outputPath and then appended with a number.
  • configName* - Defines the name of the configuration file.
  • configPath* - Defines the location where the configuration file is stored.
  • configSubDir - Defines the subdirectory under configPath where the configuration file has to be stored.
  • segmentPath* - Defines the location where segment files are stored.
  • segmentSubDirectory - Defines the subdirectory under segmentPath where segment files are stored.
  • filesPerOutputSubDir* - Defines the number of files to be generated in each output directory.
  • overrideFileName - Defines the overriding file name.
  • deleteOutputSubDir* - Defines whether to delete the outputSubDir or not. 

Example of the Receiver Parameter Management Form

Configuration File

The SWIFTSegmentReceiver requires a configuration file to help facilitate the formatting of the data output.

Example Configuration File

The example configuration file below defines the following:

  • fileNameSegments- The fileNameSegment tag defines the file naming convention for the SWIFT file that is being generated. E.g.
    • Output-1.txt, Output-2.txt, and so on
  • segments - The segment files from the segment tag will be loaded and used to create the merged output for CEF.>
  • segmentsHierarchy- defines the hierarchical structure of the Domains. 

Steps to Create the Configuration File

  • Within the Project Dashboard, select the Configuration Management Tab within the Management pane.
  • Click the New Configuration button.

  • Select the SWIFT configuration type as in the below screenshot. Click the Select button. 

  • Enter the details and select the Segments/ Domains from the drop-down. This includes the: 
    • Name - Name used to identify the configuration file within the Project. 
    • Config File Name - Name the Receiver will look for when generating test data. It should be used in configName parameter for the Receiver. 
    • Output File Name Format - Defines the format used for the generated output file(s).
    • Segment Files- Defines the segments that will be used to create nested Swift output. 

  • Click the Save button. It will open a new form in the Modal. 
  • Select the Domain from the drop-down. Selecting a Domain will list down the Attributes. 
  • Select the Attributes to be included in the final output file, as shown in the below screenshot.
  • After adding all the Domains and Attributes, click the Save button.

  • As in the screenshot below, a new prompt will open where you can drag and drop the domains to set up segment hierarchy.
  • Click Done once finished.
  • The configuration will be ready to download. Now you can download this and place it into the directory as given in the resource.

Sample MT940 SWIFT Configuration File

    <fileNameSegment segmentType='Constant' value='Output-'/>
    <fileNameSegment segmentType='Counter' value='1'/>
    <fileNameSegment segmentType='Constant' value='.txt'/>
    <segment domainName='Header20' segmentFile='Header20Segment.xml'/>
    <segment domainName='Header25' segmentFile='Header25Segment.xml'/>
    <segment domainName='Header28C' segmentFile='Header28CSegment.xml'/>
    <segment domainName='Header60F' segmentFile='Header60FSegment.xml'/>
    <segment domainName='Transaction61' segmentFile='Transaction61Segment.xml'/>
    <segment domainName='Transaction86' segmentFile='Transaction86Segment.xml'/>
    <segment domainName='Transaction86v1' segmentFile='Transaction86v1Segment.xml'/>
    <segment domainName='Footer62F' segmentFile='Footer62FSegment.xml'/>
    <segment domainName='Footer64' segmentFile='Footer64Segment.xml'/>
    <segment domainName='Header20'>
        <attribute fieldName="recordType"/>
        <attribute fieldName="Transaction Reference Number"/>
      <segment domainName='Header25'>
          <attribute fieldName="recordType"/>
          <attribute fieldName="Account Identification"/>
        <segment domainName='Header28C'>
            <attribute fieldName="recordType"/>
            <attribute fieldName="Statement Number"/>
          <segment domainName='Header60F'>
              <attribute fieldName="recordType"/>
              <attribute fieldName="transactionTypeIndicator"/>
              <attribute fieldName="date"/>
              <attribute fieldName="currency"/>
              <attribute fieldName="amount"/>
            <segment domainName='Transaction61'>
                <attribute fieldName="recordType"/>
                <attribute fieldName="Value date"/>
                <attribute fieldName="Entry Date"/>
                <attribute fieldName="Debit/Credit Mark"/>
                <attribute fieldName="Funds Code"/>
                <attribute fieldName="Amount"/>
                <attribute fieldName="Transaction Type ID code"/>
                <attribute fieldName="Customer Reference"/>
                <attribute fieldName="Bank Reference"/>
                <attribute fieldName="Supplementary Details"/>
              <segment domainName='Transaction86'>
                  <attribute fieldName="recordType"/>
                  <attribute fieldName="message"/>
              <segment domainName='Transaction86v1'>
                  <attribute fieldName="recordType"/>
                  <attribute fieldName="attr1" nextLine="true"/>
                  <attribute fieldName="attr2" nextLine="true"/>
                  <attribute fieldName="attr3" nextLine="true"/>
                  <attribute fieldName="attr4"/>
      <segment domainName='Footer62F'>
          <attribute fieldName="recordType"/>
          <attribute fieldName="credit/debit mark"/>
          <attribute fieldName="value date"/>
          <attribute fieldName="currency"/>
          <attribute fieldName="amount"/>
        <segment domainName='Footer64'>
            <attribute fieldName="recordType"/>
            <attribute fieldName="Debit/Credit mark"/>
            <attribute fieldName="value date"/>
            <attribute fieldName="currency"/>
            <attribute fieldName="amount"/>

Example MT940 SWIFT Output File

:86:For your inform. IBAN no. :2GGQMVB5VORQMSNXGBP
:86:DB Faktura 123456789
:86:For your inform. IBAN no. :2GGQMVB5VORQMSNXGBP
:86:For your inform. IBAN no. :DLRFC4RHSFCX9LL2SYP
:86:For your inform. IBAN no. :DLRFC4RHSFCX9LL2SYP
:86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP
:86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP
:86:For your inform. IBAN no. :JEW3D7A7H2FWJOILGIP