Integrating Swift Acknowledgments

Calypso can process incoming Acceptance (ACK) or Rejection (NACK) messages sent by Swift to acknowledge the receipt of Calypso outgoing messages (MT518/MT599).

When a message is received from Swift, the process is as follows:

Identify whether this is an Acceptance (ACK) or Rejection(NACK) message, using Tag :451:
If the message is a Rejection, the system uses Tag :405: to identify the reason for the rejection, generates an exception and moves the Calypso outgoing message to status NACKED - The reason for rejection is stored in the message attribute NackReason – You can view the various rejection reasons in the domain “MsgAttributes.NackReason”
If the message is an Acceptance, the system moves the Calypso outgoing message to status UNMATCHED – It can then go through the matching process

Swift messages are imported into Calypso using the ImportMessageEngine or the MESSAGE_MATCHING scheduled task.

 

1. Setup Requirements

In order to send messages through the SWIFT gateway, you need the class GatewaySWIFTDocumentSender or a custom implementation of that class – Contact Calypso Product Support to obtain this class along with the class SwiftIEAdapterConfig.

The ImportMessageEngine requires a "Swift" property file - Contact Calypso Helpdesk for a sample Swift property file. It should be called “calypso_swift2cy_config.properties”.

 

You can specify a Comment for each Value in the domain “MsgAttributes.NackReason”. It will be displayed in the message attribute "MsgAttributes.NackReason Description". This message attribute is not stored, it is just displayed on-the-fly in the reports.

 

By default, incoming MT599 messages are not reconciled with outgoing MT599 messages as they are not ACK/NACK messages.

You can set environment property SWIFT_UAK_REMOVAL = true to make the incoming MT599 message an ACK/NACK message.

If Block 1 of incoming SWIFT message starts with F21 and Block 4 does not contain tag 108, then Block 1 and Block 4 are removed and the imported MT599 message can be reconciled with an outgoing MT599 message as it is an ACK/NACK message.

 

You need to add the message type to the incomingType domain to identify the incoming message workflow as follows:

Value = MT518

Comment = ACK_MSG

Value = MT599

Comment = ACK_MSG

 

2. Outgoing Messages Setup

Outgoing messages need a message setup configuration that uses Swift, and a message sender configuration that sends the message through the SWIFT gateway.

Sample Message Configuration

Message configurations are defined under Configuration > Messages & Matching > Message Set-up.

 

Sample Message Sender Configuration

Message sender configurations are defined under Configuration > Messages & Matching > Message Sender.

 

The environment property SWIFT_MSG_ID_IN_MUR allows setting the Message User Reference (MUR) so that the messages are easily identified.

When set to True/Y this sets the last 11 digits of the MUR with the message id. The MUR is defined within block 3: , sub-block 108: of the header.

For example, for Message ID 15768 and a MT518 message, the MUR will look like "{3:{108:MT51800000015768}}".

The swift network detects that a MUR has been provided and returns this same MUR in block4:, sub block 108:.

This allows the system to be able to handle ack/nack for any Swift message, as we know the reference of the message will be coded in the last 11 digits of the MUR.

 

When SWIFT_MSG_ID_IN_MUR = true, you need to set SWIFT_UAK_REMOVAL = true as well.

 

3. Outgoing Message Workflow

The outgoing message workflow can be setup for the CONFIRM subtype as follows:

 Ⓘ   [NOTE: The SEND action is applied by the Sender engine if you use the class GatewaySWIFTDocumentSender or a custom implementation of that class – Contact Helpdesk to obtain this class along with the class SwiftIEAdapterConfig]

 

4. Incoming Message Workflow

You need to add HandleAckNack to the domain "workflowRuleMessage".

The incoming message workflow is setup for the ACK_MSG subtype as follows:

 

5. Importing Messages

1. You first need to generate some outgoing messages using the message engine.

In this example, we are generating MT518 confirmations on verified bond trades. The outgoing messages are in status TO_SEND.

Outgoing Message Header

 

2. You then send the messages using the sender engine. The outgoing messages move to status SENT provided you use the class GatewaySWIFTDocumentSender.

See Outgoing Message Workflow for details.

 

3. Run the Import Message engine to import incoming Swift messages or the MESSAGE_MATCHING scheduled task.

The Import Message engine is started as part of the Engine server with the Swift config.

An acknowledgment message of Acceptance or Rejection is received and saved, updating the outgoing message. The outgoing message moves to status UNMATCHED or NACKED, and the incoming message moves to status PROCESSED.