¿Qué Mensaje ISO 20022 Envía una Factura a un Cliente?

La Pregunta

"¿Qué tipo de mensaje ISO 20022 envía una factura a un cliente? ¿Puede identificar el tipo de mensaje, crear una muestra y mostrarme la implementación en C#?"

Eso es todo. Una sola pregunta. Sin leer especificaciones. Sin buscar entre cientos de definiciones de mensajes. Observe lo que sucede a continuación.


Paso 1 — El Servidor MCP Encuentra la Respuesta

La IA consulta en vivo el Servidor ISO 20022 MCP de Beneficial Strategies. Busca en el repositorio completo de ISO 20022 cada mensaje que implementa el concepto de negocio Invoice, en todas las áreas de negocio.

El servidor devuelve esto:

Área de Negocio Mensaje Rol
TSIN InvoiceAssignmentNotificationV01 Notifica a un socio comercial de una obligación de pago
TSIN InvoiceAssignmentRequestV01 Solicita la cesión de una factura a un financiador
REDA RequestToPayCreditorEnrolmentRequestV01 Inscribe a un acreedor para facturación de solicitud de pago

La respuesta correcta es tsin.008.001.01InvoiceAssignmentNotificationV01.

¿Por qué este y no los demás? La especificación ISO lo dice explícitamente:

“Este mensaje también puede utilizarse fuera de un contexto de factoring directamente entre un pagador y un beneficiario — por ejemplo, como recordatorio de una obligación de pago o para hacer un ajuste.”

Ese es el mensaje canónico ISO 20022 para enviar una factura a un cliente.


Paso 2 — Una Pregunta de Aclaración Rápida

Antes de generar cualquier código, la IA pregunta:

"¿Debería la factura de muestra incluir un desglose de impuestos (monto gravable + impuesto = total), o simplemente un monto total único?"

Respuesta: Incluir el desglose de impuestos.

Esa única decisión da forma tanto a la estructura XML como al modelo C#. El servidor MCP ya obtuvo la definición completa del componente InvoiceTotals1, por lo que sabe exactamente qué campos poblar.


Paso 3 — Todo Se Genera Automáticamente

Estructura del Mensaje

classDiagram
    direction LR
    class InvoiceAssignmentNotificationV01{
        NotificationCount IsoMax15NumericText
        ItemCount IsoMax15NumericText
        ControlSum IsoDecimalNumber
    }
    InvoiceAssignmentNotificationV01 *-- "1..1" BusinessLetter1 : Header
    InvoiceAssignmentNotificationV01 *-- "1..1" FinancingItemList1 : NotificationList
    InvoiceAssignmentNotificationV01 *-- "0..1" EncapsulatedBusinessMessage1 : AttachedMessage
  

XML de Muestra

Una factura completa y válida por servicios profesionales — $4,750.00 USD con desglose de impuestos — generada directamente desde la especificación en vivo:

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:tsin.008.001.01">
  <InvcAssgnmtNtfctn>

    <Hdr>
      <Id>NOTIF-2026-00042</Id>
      <IsseDt>2026-03-17</IsseDt>
      <CreDtTm>2026-03-17T09:00:00</CreDtTm>
      <Sndr>
        <Pty>
          <Nm>Beneficial Strategies LLC</Nm>
          <Id><OrgId><AnyBIC>BSTRUSXX</AnyBIC></OrgId></Id>
        </Pty>
      </Sndr>
      <Rcvr>
        <Pty>
          <Nm>Acme Corp</Nm>
          <Id><OrgId><AnyBIC>ACMEUSNY</AnyBIC></OrgId></Id>
        </Pty>
      </Rcvr>
    </Hdr>

    <NtfctnList>
      <Idr>LIST-2026-001</Idr>
      <IsseDt>2026-03-17</IsseDt>
      <Assgne><Pty><Nm>Acme Corp</Nm></Pty></Assgne>
      <Assgnr><Pty><Nm>Beneficial Strategies LLC</Nm></Pty></Assgnr>
      <ItmCnt>1</ItmCnt>
      <CtrlSum>4750.00</CtrlSum>
      <TtlReqAmt Ccy="USD">4750.00</TtlReqAmt>

      <FinItm>
        <ItmCntxt><CdtDbtInd>CRDT</CdtDbtInd></ItmCntxt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <TtlAmt>
          <TtlTaxblAmt Ccy="USD">4250.00</TtlTaxblAmt>
          <TaxAmt Ccy="USD">500.00</TaxAmt>
          <TtlAmt Ccy="USD">4750.00</TtlAmt>
        </TtlAmt>
        <DueAmt Ccy="USD">4750.00</DueAmt>
        <AddtlInf>Professional consulting services – March 2026</AddtlInf>
      </FinItm>
    </NtfctnList>

    <NtfctnCnt>1</NtfctnCnt>
    <ItmCnt>1</ItmCnt>
    <CtrlSum>4750.00</CtrlSum>

  </InvcAssgnmtNtfctn>
</Document>

Contenedor de Datos C#

Cada nombre de clase, nombre de propiedad y etiqueta XML proviene directamente de la especificación ISO a través del servidor MCP. Nada es adivinado.

using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Iso20022.Tsin.V01
{
    [XmlRoot("Document", Namespace = "urn:iso:std:iso:20022:tech:xsd:tsin.008.001.01")]
    public class Document
    {
        [XmlElement("InvcAssgnmtNtfctn")]
        public InvoiceAssignmentNotificationV01 InvoiceAssignmentNotification { get; set; }
    }

    public class InvoiceAssignmentNotificationV01
    {
        [XmlElement("Hdr")]
        public BusinessLetter1 Header { get; set; }

        [XmlElement("NtfctnList")]
        public List<FinancingItemList1> NotificationList { get; set; } = new();

        [XmlElement("NtfctnCnt")]
        public string NotificationCount { get; set; }

        [XmlElement("ItmCnt")]
        public string ItemCount { get; set; }

        [XmlElement("CtrlSum")]
        public decimal? ControlSum { get; set; }
    }

    public class BusinessLetter1
    {
        [XmlElement("Id")]
        public string Id { get; set; }

        [XmlElement("IsseDt")]
        public DateTime IssueDate { get; set; }

        [XmlElement("CreDtTm")]
        public DateTime? CreationDateTime { get; set; }

        [XmlElement("Sndr")]
        public QualifiedPartyIdentification1 Sender { get; set; }

        [XmlElement("Rcvr")]
        public QualifiedPartyIdentification1 Receiver { get; set; }
    }

    public class FinancingItemList1
    {
        [XmlElement("Idr")]
        public string Identifier { get; set; }

        [XmlElement("IsseDt")]
        public DateTime IssueDate { get; set; }

        [XmlElement("Assgne")]
        public QualifiedPartyIdentification1 Assignee { get; set; }

        [XmlElement("Assgnr")]
        public QualifiedPartyIdentification1 Assigner { get; set; }

        [XmlElement("FinItm")]
        public List<FinancialItem1> FinancialItems { get; set; } = new();

        [XmlElement("ItmCnt")]
        public string ItemCount { get; set; }

        [XmlElement("CtrlSum")]
        public decimal? ControlSum { get; set; }

        [XmlElement("TtlReqAmt")]
        public ActiveCurrencyAndAmount TotalRequestAmount { get; set; }
    }

    public class FinancialItem1
    {
        [XmlElement("ItmCntxt")]
        public FinancialItemParameters1 ItemContext { get; set; }

        [XmlElement("CdtDbtInd")]
        public CreditDebitCode CreditDebitIndicator { get; set; }

        [XmlElement("TtlAmt")]
        public InvoiceTotals1 TotalAmount { get; set; }

        [XmlElement("DueAmt")]
        public ActiveCurrencyAndAmount DueAmount { get; set; }

        [XmlElement("AddtlInf")]
        public string AdditionalInformation { get; set; }
    }

    public class InvoiceTotals1
    {
        [XmlElement("TtlTaxblAmt")]
        public ActiveCurrencyAndAmount TotalTaxableAmount { get; set; }

        [XmlElement("TaxAmt")]
        public ActiveCurrencyAndAmount TaxAmount { get; set; }

        [XmlElement("TtlAmt")]
        public ActiveCurrencyAndAmount TotalAmount { get; set; }
    }

    public class QualifiedPartyIdentification1
    {
        [XmlElement("Pty")]
        public PartyIdentification45 Party { get; set; }
    }

    public class PartyIdentification45
    {
        [XmlElement("Nm")]
        public string Name { get; set; }

        [XmlElement("Id")]
        public Party8Choice Id { get; set; }
    }

    public class Party8Choice
    {
        [XmlElement("OrgId")]
        public OrganisationIdentification8 OrganisationId { get; set; }
    }

    public class OrganisationIdentification8
    {
        [XmlElement("AnyBIC")]
        public string AnyBic { get; set; }
    }

    public class FinancialItemParameters1
    {
        [XmlElement("CdtDbtInd")]
        public CreditDebitCode CreditDebitIndicator { get; set; }
    }

    public class ActiveCurrencyAndAmount
    {
        [XmlAttribute("Ccy")]
        public string Currency { get; set; }

        [XmlText]
        public decimal Value { get; set; }
    }

    public enum CreditDebitCode
    {
        [XmlEnum("CRDT")] Credit,
        [XmlEnum("DBIT")] Debit
    }
}

Uso

var doc = new Document
{
    InvoiceAssignmentNotification = new InvoiceAssignmentNotificationV01
    {
        Header = new BusinessLetter1
        {
            Id = "NOTIF-2026-00042",
            IssueDate = new DateTime(2026, 3, 17),
            Sender   = new QualifiedPartyIdentification1 { Party = new PartyIdentification45 { Name = "Beneficial Strategies LLC" } },
            Receiver = new QualifiedPartyIdentification1 { Party = new PartyIdentification45 { Name = "Acme Corp" } }
        },
        NotificationList = new List<FinancingItemList1>
        {
            new()
            {
                Identifier = "LIST-2026-001",
                IssueDate  = new DateTime(2026, 3, 17),
                ItemCount  = "1",
                ControlSum = 4750.00m,
                TotalRequestAmount = new ActiveCurrencyAndAmount { Currency = "USD", Value = 4750.00m },
                FinancialItems = new List<FinancialItem1>
                {
                    new()
                    {
                        CreditDebitIndicator = CreditDebitCode.Credit,
                        TotalAmount = new InvoiceTotals1
                        {
                            TotalTaxableAmount = new ActiveCurrencyAndAmount { Currency = "USD", Value = 4250.00m },
                            TaxAmount          = new ActiveCurrencyAndAmount { Currency = "USD", Value = 500.00m },
                            TotalAmount        = new ActiveCurrencyAndAmount { Currency = "USD", Value = 4750.00m }
                        },
                        DueAmount = new ActiveCurrencyAndAmount { Currency = "USD", Value = 4750.00m },
                        AdditionalInformation = "Professional consulting services – March 2026"
                    }
                }
            }
        },
        NotificationCount = "1",
        ItemCount = "1",
        ControlSum = 4750.00m
    }
};

var serializer = new XmlSerializer(typeof(Document));
using var writer = new StringWriter();
serializer.Serialize(writer, doc);
Console.WriteLine(writer.ToString());

¿Qué Acaba de Suceder?

Una pregunta. Sin abrir PDFs de especificaciones ISO. Sin navegar por catálogos de mensajes. Sin crear XML manualmente.

El Servidor ISO 20022 MCP de Beneficial Strategies consultó el repositorio de especificaciones en vivo, identificó el mensaje correcto entre cientos de candidatos, recuperó la jerarquía exacta de componentes y produjo una muestra XML conforme a la especificación y una implementación C# completamente tipada — todo automáticamente.

La única decisión que tomó fue si incluir un desglose de impuestos.

Eso es lo que una suscripción de IA al Servidor MCP de Beneficial Strategies hace por su equipo. Conozca más sobre los niveles de suscripción.