CCS Reports

Smart Templates enables you to generate XML-based CCS (Cadastro de Clientes do Sistema Financeiro Nacional) files as defined by the Central Bank of Brazil (BACEN).

This guide shows how to create automated CCS reports using Smart Templates — including ACCS001, ACCS005, and ACCS010 — by combining CRM data (holders and aliases) with Midaz structures.

❗️

Important

CCS reports must strictly follow the layouts defined by BACEN. Smart Templates lets you automate the XML generation, but you remain responsible for validating the output and ensuring compliance with regulatory requirements.

What is CCS?

The CCS (Cadastro de Clientes do Sistema Financeiro Nacional) is a registry that maps relationships between customers and financial institutions.

Its purpose is to allow regulators and other authorized entities to identify where a customer holds financial relationships.

Institutions must submit CCS reports in XML format, following BACEN’s ACCS schemas. Each file type has a specific function — from daily updates to relationship transfers.

Smart Templates makes this process automated and standardized, ensuring that CCS submissions are both technically valid and business-aligned.

ACCS001 — Daily update file

What it is

The ACCS001 is the daily update file. It reports inclusions, changes, or exclusions of customer relationships (individual or corporate) with the institution. This is the most frequent CCS file, keeping the registry in sync with daily operations.

Full template

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="http://www.bcb.gov.br/ccs/ACCS001.xsd">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000000</IdentdDestinatario>
        <NomArq>ACCS001</NomArq>
        <NumRemessaArq>12233444</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqAtlzDiaria>
            <Repet_ACCS001_Pessoa>
{%- for alias in plugin_crm.aliases -%}
{%- for holder in plugin_crm.holders -%}
{%- if holder.document == alias.document %}
                <Grupo_ACCS001_Pessoa>
                    <TpOpCCS>I</TpOpCCS>
                    <QualifdrOpCCS>N</QualifdrOpCCS>
                    <TpPessoa>{%- if holder.type == "NATURAL_PERSON" -%}F{%- else -%}J{%- endif -%}</TpPessoa>
                    <CNPJ_CPFPessoa>{{holder.document}}</CNPJ_CPFPessoa>
                    <DtIni>{{alias.banking_details.opening_date}}</DtIni>
                    <DtFim></DtFim>
                </Grupo_ACCS001_Pessoa>
{%- endif -%}
{%- endfor %}
{%- endfor %}
            </Repet_ACCS001_Pessoa>
            <QtdOpCCS>{% count_by plugin_crm.aliases %}</QtdOpCCS>
            <DtMovto>{% date_time "YYYY-MM-DD" %}</DtMovto>
        </CCSArqAtlzDiaria>
    </SISARQ>
</CCSDOC>

Applied logic

Nested loops cross-reference plugin_crm.aliases (accounts) with plugin_crm.holders (holders), enabling accurate association between account data and their respective owners.

  • The <TpPessoa> field is conditional:
    • F for natural persons
    • J for legal entities
  • Fixed values in this example:
    • <TpOpCCS> = I (Inclusion)

      Although set to I in this scenario, this field must reflect the actual operation being reported.

      Valid values according to Bacen are:

      • I = Inclusion (new accounts in the institution's database)
      • A = Update (changes to existing account information)
      • E = Exclusion (the original record must be disregarded)
    • <QualifdrOpCCS> = N (Normal)

      Similarly, this field should represent the correct qualifier for the account.

      Valid values include:

      • N = Normal
      • P = Popular
      • C = Conglomerate
  • Functions used:
    • count_by plugin_crm.aliases counts alias records per account.
    • date_time "YYYY-MM-DD" dynamically inserts the current date in the specified format.

Rendered example

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="http://www.bcb.gov.br/ccs/ACCS001.xsd">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000000</IdentdDestinatario>
        <NomArq>ACCS001</NomArq>
        <NumRemessaArq>12233444</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqAtlzDiaria>
            <Repet_ACCS001_Pessoa>
                <Grupo_ACCS001_Pessoa>
                    <TpOpCCS>I</TpOpCCS>
                    <QualifdrOpCCS>N</QualifdrOpCCS>
                    <TpPessoa>F</TpPessoa>
                    <CNPJ_CPFPessoa>12345678900</CNPJ_CPFPessoa>
                    <DtIni>2025-02-01</DtIni>
                    <DtFim></DtFim>
                </Grupo_ACCS001_Pessoa>
            </Repet_ACCS001_Pessoa>
            <QtdOpCCS>1</QtdOpCCS>
            <DtMovto>2025-02-01</DtMovto>
        </CCSArqAtlzDiaria>
    </SISARQ>
</CCSDOC>

ACCS005 — Relationship detail file

What it is

The ACCS005 is generated when BACEN requests detailed information on client relationships. It lists all the links between a customer and financial assets (BDVs — Bens, Direitos e Valores), and may include related persons such as partners or legal representatives.

Full template

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="<http://www.bcb.gov.br/ccs/ACCS005.xsd>">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000001</IdentdDestinatario>
        <NomArq>ACCS005</NomArq>
        <NumRemessaArq>{% date_time "YYYYMMddHHmm" %}</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqInfDettRelctPessoa>
            <CNPJBaseEntRespons>{{plugin_crm.holders.0.document|slice:':8'}}</CNPJBaseEntRespons>
            <NumCtrlCCSOr>000000</NumCtrlCCSOr>
            <Repet_CCS0005_BDV>
                {%- for account in midaz_onboarding.account %}
                {%- for alias in plugin_crm.aliases %}
                {%- if alias.account_id == account.id %}
                {%- for holder in plugin_crm.holders %}
                {%- if holder.document == alias.document %}
                <Grupo_CCS0005_BDV>
                    <SitInfDettPessoa></SitInfDettPessoa>
                    <Grupo_CCS0005_Part>
                        <CNPJBasePart>{{holder.document|slice:"0:8"}}</CNPJBasePart>
                        <TpBDV>{% if account.type == "deposit" %}1{% elif account.type == "savings" %}2{% elif account.type == "payment" %}3{% else %}6{% endif %}</TpBDV>
                        {%- if alias.banking_details.branch %}
                        <AgIF>{{alias.banking_details.branch}}</AgIF>
                        {%- endif %}
                        {%- if alias.banking_details.type == "CACC" %}
                        <CtCli>{{alias.banking_details.account}}</CtCli>
                        {%- elif alias.banking_details.type == "payment" %}
                        <CtPgto>{{alias.banking_details.account}}</CtPgto>
                        {%- endif %}
                        <TpVincBDV>1</TpVincBDV>
                        <NomPessoa>{{holder.name}}</NomPessoa>
                        <DtIni>{{alias.banking_details.opening_date}}</DtIni>
                        <DtFim></DtFim>
                        {%- if holder.type == "NATURAL_PERSON" and holder.natural_person %}
                        <Repet_CCS0005_Vincd>
                            <Grupo_CCS0005_Vincd>
                                <Grupo_CCS0005_PessoaVincd>
                                    <TpVinc>3</TpVinc>
                                    <CNPJ_CPFPessoaVincd>{{holder.document}}</CNPJ_CPFPessoaVincd>
                                    <NomPessoaVincd>{{holder.natural_person.mother_name}}</NomPessoaVincd>
                                    <DtIniVinc>{{alias.banking_details.opening_date}}</DtIniVinc>
                                    <DtFimVinc></DtFimVinc>
                                </Grupo_CCS0005_PessoaVincd>
                            </Grupo_CCS0005_Vincd>
                        </Repet_CCS0005_Vincd>
                        {%- endif %}
                    </Grupo_CCS0005_Part>
                </Grupo_CCS0005_BDV>
                {%- endif %}
                {%- endfor %}
                {%- endif %}
                {%- endfor %}
                {%- endfor %}
            </Repet_CCS0005_BDV>
            <DtMovto>{% date_time "YYYY-MM-DD" %}</DtMovto>
        </CCSArqInfDettPessoa>
    </SISARQ>
</CCSDOC>

Applied logic

The logic applies nested loops to iterate through accounts, aliases, and holders, enabling structured extraction of all relevant entities.

  • The <TpBDV> field uses conditional logic to determine the account type:
    • 1 = deposit
    • 2 = savings
    • 3 = payment
    • 6 = others
  • For CNPJ extraction, slice:"0:8" is applied to retrieve only the first 8 digits (base of the CNPJ).
  • The <Repet_CCS0005_Vincd> tag is rendered only when the account holder is a natural person and has associated individuals (e.g., an attorney or legal representative).

To illustrate this, the example bellow includes the mother’s name as a placeholder for a vinculated person — not because that tag refers to the mother per se, but to demonstrate the feature in action.

  • The date_time function dynamically generates timestamps at runtime, ensuring the report reflects the current execution context.

Rendered example

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="http://www.bcb.gov.br/ccs/ACCS005.xsd">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000001</IdentdDestinatario>
        <NomArq>ACCS005</NomArq>
        <NumRemessaArq>202502011230</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqInfDettRelctPessoa>
            <CNPJBaseEntRespons>12345678</CNPJBaseEntRespons>
            <NumCtrlCCSOr>000000</NumCtrlCCSOr>
            <Repet_CCS0005_BDV>
                <Grupo_CCS0005_BDV>
                    <SitInfDettPessoa></SitInfDettPessoa>
                    <Grupo_CCS0005_Part>
                        <CNPJBasePart>12345678</CNPJBasePart>
                        <TpBDV>1</TpBDV>
                        <AgIF>001</AgIF>
                        <CtCli>12345-6</CtCli>
                        <TpVincBDV>1</TpVincBDV>
                        <NomPessoa>João Silva</NomPessoa>
                        <DtIni>2020-01-01</DtIni>
                        <DtFim></DtFim>
                        <Repet_CCS0005_Vincd>
                            <Grupo_CCS0005_Vincd>
                                <Grupo_CCS0005_PessoaVincd>
                                    <TpVinc>3</TpVinc>
                                    <CNPJ_CPFPessoaVincd>12345678900</CNPJ_CPFPessoaVincd>
                                    <NomPessoaVincd>Maria Silva</NomPessoaVincd>
                                    <DtIniVinc>2020-01-01</DtIniVinc>
                                    <DtFimVinc></DtFimVinc>
                                </Grupo_CCS0005_PessoaVincd>
                            </Grupo_CCS0005_Vincd>
                        </Repet_CCS0005_Vincd>
                    </Grupo_CCS0005_Part>
                </Grupo_CCS0005_BDV>
            </Repet_CCS0005_BDV>
            <DtMovto>2025-02-01</DtMovto>
        </CCSArqInfDettRelctPessoa>
    </SISARQ>
</CCSDOC>

ACCS010 — Relationship transfer file

What it is

The ACCS010 is generated when client relationships are transferred between institutions — common in portfolio sales or mergers. It lists the relationships being transferred and identifies the new responsible institution.

Full template

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="<http://www.bcb.gov.br/ccs/ACCS010.xsd>">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000000</IdentdDestinatario>
        <NomArq>ACCS010</NomArq>
        <NumRemessaArq>{% date_time "yyyymmdd" %}0001</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqTransRelac>
            <CNPJBaseNovRespons>12345679</CNPJBaseNovRespons>
            {%- for alias in plugin_crm.aliases %}
            {%- for holder in plugin_crm.holders %}
            {%- if alias.holder_id == holder._id and (holder.type == "legal_person" or holder.type == "natural_person") %}
            <Repet_ACCS010_Pessoa>
                <CNPJBasePart></CNPJBasePart>
                <TpPessoa>{% if holder.type == "natural_person" %}F{% else %}J{% endif %}</TpPessoa>
                <CNPJ_CPFPessoa>{{holder.document}}</CNPJ_CPFPessoa>
                <DtIni>{{alias.banking_details.opening_date}}</DtIni>
                <DtFim></DtFim>
            </Repet_ACCS010_Pessoa>
            {%- endif %}
            {%- endfor %}
            {%- endfor %}
            <QtdOpCCS>{% count_by plugin_crm.aliases %}</QtdOpCCS>
        </CCSArqTransRelac>
    </SISARQ>
</CCSDOC>

Applied logic

  • Dual loops iterate through aliases and holders.
  • <TpPessoa> defines whether the holder is natural (F) or legal (J).
  • <CNPJBaseNovRespons> identifies the new responsible institution.
  • <QtdOpCCS> uses count_by to ensure the number of reported relationships matches the dataset.
  • Dates (<DtIni> and <DtFim>) track relationship validity.

Rendered example

<?xml version="1.0" encoding="UTF-8"?>
<CCSDOC xmlns="http://www.bcb.gov.br/ccs/ACCS010.xsd">
    <BCARQ>
        <IdentdEmissor>12345678</IdentdEmissor>
        <IdentdDestinatario>00000000</IdentdDestinatario>
        <NomArq>ACCS010</NomArq>
        <NumRemessaArq>202502010001</NumRemessaArq>
    </BCARQ>
    <SISARQ>
        <CCSArqTransRelac>
            <CNPJBaseNovRespons>87654321</CNPJBaseNovRespons>
            <Repet_ACCS010_Pessoa>
                <CNPJBasePart>12345678</CNPJBasePart>
                <TpPessoa>F</TpPessoa>
                <CNPJ_CPFPessoa>12345678900</CNPJ_CPFPessoa>
                <DtIni>2019-05-10</DtIni>
                <DtFim></DtFim>
            </Repet_ACCS010_Pessoa>
            <QtdOpCCS>1</QtdOpCCS>
        </CCSArqTransRelac>
    </SISARQ>
</CCSDOC>
⚠️

Important

While Smart Templates provides the technical automation, institutions must ensure the accuracy and consistency of the data submitted to BACEN. Always validate rendered XML against the official schema before submission, and involve accounting or compliance teams in the review process.