Before using the CCS templates
The examples below map the reserved CRM datasource named
plugin_crm. Configure that datasource before importing or saving a CCS template: it needs the CRM MongoDB connection and DATASOURCE_CRM_MIDAZ_ORGANIZATION_ID, which scopes CRM records to one Midaz organization. Follow Reporter via Helm or the environment-variable reference.
plugin_crm is environment-managed. Do not try to create or PATCH it through the regular datasource API. Manager can seed the entry and fill a missing or empty organization ID at startup. Manager keeps a non-empty persisted value.
Before treating a CCS template as ready, import or save it, generate a report, confirm that CRM fields decrypt, and verify that the output contains records only from the intended Midaz organization. RPT-0075 is a fail-closed scope check: it can mean the organization metadata is absent or empty, but it can also mean Reporter could not read the datasource registry. Use RPT-0075 troubleshooting instead of assuming a missing environment variable.
CCS reports must strictly follow the layouts defined by BACEN. Reporter 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.
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
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) This scenario sets the field to I. The field must still reflect the actual operation that you report.
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
ACCS005: Relationship detail file
What it is
You generate the ACCS005 with Reporter when BACEN requests detailed information on client relationships. It lists all the links between a customer and financial assets (BDVs: Bens, Direitos e Valores). It can also include related persons such as partners or legal representatives.Full template
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” retrieves only the first 8 digits (base of the CNPJ).
- Reporter renders the
<Repet_CCS0005_Vincd>tag only when the account holder is a natural person and has associated individuals (e.g., an attorney or legal representative).
- The
date_timefunction dynamically generates timestamps at runtime, ensuring the report reflects the current execution context.
Rendered example
ACCS010: Relationship transfer file
What it is
You generate the ACCS010 with Reporter when institutions transfer client relationships, which is common in portfolio sales or mergers. It lists the transferred relationships and identifies the new responsible institution.Full template
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.

