Overview
Profiles are the central entity in Tresa Contafy that represent taxpayer identities (RFC). Each profile corresponds to a specific RFC (Registro Federal de Contribuyentes) and contains all associated invoices, expenses, and tax configurations.Profiles enable multi-RFC management, allowing users to manage multiple tax entities from a single account.
Why Profiles Matter
In Mexican tax accounting, each RFC is a distinct tax identity that must maintain separate records. Profiles provide:- Isolation: Each RFC’s invoices and expenses remain separate
- Compliance: Tax regime validation per RFC
- Automation: SAT portal synchronization for automated CFDI downloads
- Flexibility: Users can manage personal (FISICA) and business (MORAL) entities
Data Structure
The Profile model contains the following key fields:Field Details
RFC and Entity Type
RFC and Entity Type
- rfc: Must be unique across all profiles in the system
- tipo_persona:
FISICA: Individual taxpayer (Persona Física)MORAL: Business entity (Persona Moral)
- nombre: Legal or registered business name
Tax Regimes
Tax Regimes
regimenes_fiscales is an array of SAT regime codes such as:
601: General de Ley Personas Morales612: Personas Físicas con Actividades Empresariales605: Sueldos y Salarios
Profile Status and Freezing
Profile Status and Freezing
Profiles can be frozen for various reasons:
- plan_limit: User exceeded their subscription plan limits
- user_suspension: Manual administrative suspension
- payment_issue: Subscription payment failed
FIEL Credentials
FIEL Credentials
The e.firma (FIEL) credentials enable automatic synchronization with SAT:
- fiel_cer_encrypted: Certificate file (encrypted)
- fiel_key_encrypted: Private key file (encrypted)
- fiel_password_encrypted: Password for the key (encrypted)
SAT Synchronization
SAT Synchronization
- sat_download_sync_enabled: When true, enables automated CFDI downloads
- sat_download_last_sync_at: Timestamp of last successful sync
Relationships
User Relationship
Child Entities
Profiles have one-to-many relationships with:- Invoices: Income CFDIs (facturas emitidas/recibidas)
- Expenses: Accrued expenses from CFDIs or manual entries
- Payrolls: Payroll CFDIs (nómina)
- Payment Complements: Payment complement CFDIs
Plan Limits
The number of active profiles a user can create depends on their subscription plan:FREE
1 active profile
BASIC
3 active profiles
PRO
10 active profiles
ENTERPRISE
Unlimited profiles
Usage Examples
Creating a Profile
Enabling SAT Synchronization
FIEL credentials are required for automatic SAT downloads. Manual XML uploads do not require FIEL.
Retrieving Profiles
Best Practices
Validate RFC Format
Always validate RFC format before creating profiles to avoid SAT validation errors.
Set Correct Regime
Ensure regimenes_fiscales matches the actual SAT registration to enable proper validation.
Enable SAT Sync
Use SAT automatic downloads to ensure all CFDIs are captured without manual effort.
Monitor Frozen Status
Check frozen status before allowing operations on a profile to avoid user errors.
Validation Configuration
Thevalidaciones_habilitadas field controls CFDI validation behavior:
- validarRFCIngresos: Verify RFC matches in income invoices
- validarRFCGastos: Verify RFC matches in expense invoices
- validarRegimenFiscal: Check if tax regime matches SAT registry
- validarUUIDDuplicado: Reject duplicate UUID submissions
- bloquearSiRFCNoCoincide: Block (vs. warn) on RFC mismatch
- bloquearSiRegimenNoCoincide: Block (vs. warn) on regime mismatch
Related Concepts
Invoices
Income CFDIs linked to profiles
Expenses
Expense CFDIs and manual entries
Subscriptions
Plan limits and profile quotas