swift_mt_message/messages/
mt199.rs

1use crate::fields::*;
2use serde::{Deserialize, Serialize};
3use swift_mt_message_macros::{SwiftMessage, serde_swift_fields};
4
5/// MT199: Free Format Message
6///
7/// ## Purpose
8/// Used for free format communication between financial institutions regarding customer payments and related
9/// matters. This message provides the maximum flexibility for various types of communication that don't fit into
10/// other structured message formats, enabling efficient bilateral communication in the payment ecosystem.
11///
12/// ## Scope
13/// This message is:
14/// - Used for customer payment-related communications between financial institutions
15/// - Applicable for inquiries, clarifications, and general information exchange
16/// - Designed for flexible narrative text supporting various communication needs
17/// - Compatible with both automated and manual message generation systems
18/// - Subject to minimal validation rules for maximum communication flexibility
19/// - Integrated with customer service and payment processing communication workflows
20///
21/// ## Key Features
22/// - **Maximum Communication Flexibility**: Field 79 for completely free format narrative text
23/// - **Payment Context Integration**: Specifically related to customer payments and transactions
24/// - **Bilateral Communication Support**: Facilitates direct bank-to-bank communication
25/// - **Reference Tracking System**: Links to related payment messages or transactions
26/// - **Minimal Structure Requirements**: Minimal mandatory fields for maximum messaging flexibility
27/// - **Multi-Purpose Usage**: Adaptable to various communication scenarios and business needs
28///
29/// ## Common Use Cases
30/// - Payment inquiry messages for transaction status and details
31/// - Status update communications for processing milestones
32/// - Clarification requests for payment instructions and requirements
33/// - Special instruction messages for unique processing needs
34/// - Problem resolution communications for payment issues
35/// - Customer service related messages for account and payment support
36/// - Reject and return notifications with detailed explanatory information
37///
38/// ## Message Structure
39/// - **Field 20**: Sender's Reference (mandatory) - Unique message reference identifier
40/// - **Field 21**: Related Reference (optional) - Reference to related message or transaction
41/// - **Field 79**: Narrative (mandatory) - Free format text content for communication
42///
43/// ## Network Validation Rules
44/// - **Reference Format Validation**: Sender's reference must follow standard SWIFT reference format rules
45/// - **Narrative Content Requirements**: Field 79 must contain meaningful communication content
46/// - **Related Reference Format**: Field 21 must follow proper reference format when present
47/// - **Reject/Return Guidelines**: If narrative starts with /REJT/ or /RETN/, must follow Payments Guidelines
48/// - **Content Length Validation**: Narrative content must be within specified field length limits
49/// - **Character Set Compliance**: All text content must use valid SWIFT character sets
50/// - **Mandatory Field Validation**: All mandatory fields must be present with valid content
51///
52/// ## SRG2025 Status
53/// - **Structural Changes**: None - MT199 format remains stable for free format communication
54/// - **Validation Updates**: Enhanced validation for reject/return guidelines compliance
55/// - **Processing Improvements**: Improved handling of structured reject and return notifications
56/// - **Compliance Notes**: Maintained flexibility while ensuring compliance with payment guidelines
57///
58/// ## Integration Considerations
59/// - **Banking Systems**: Compatible with customer service systems and payment communication platforms
60/// - **API Integration**: RESTful API support for modern digital banking communication systems
61/// - **Processing Requirements**: Supports both automated and manual message generation and processing
62/// - **Compliance Integration**: Built-in validation for regulatory communication requirements
63///
64/// ## Relationship to Other Messages
65/// - **Triggers**: Triggered by various payment scenarios requiring flexible communication
66/// - **Responses**: May generate response messages or trigger follow-up communications
67/// - **Related**: Works with all payment message types for supporting communication
68/// - **Alternatives**: Structured messages for specific communication scenarios with defined formats
69/// - **Status Updates**: Provides flexible status updates and notifications for payment processes
70#[serde_swift_fields]
71#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftMessage)]
72pub struct MT199 {
73    #[field("20")]
74    pub field_20: Field20,
75
76    #[field("21")]
77    pub field_21: Option<Field21NoOption>,
78
79    #[field("79")]
80    pub field_79: Field79,
81}