Guidelines for Loading CFDI Document Records for Mexico

Document records store information about documents, such as visas, licenses, and medical certificates, for a person.

Document records can include electronic versions of the documents as attachments. You can use Document Records for loading information related to employee’s CFDI records.

This topic describes how to load Mexico CFDI Document Record and Document Record Attachment components for a person using HCM Data Loader.

Document Type

Document records exist for a specific document type. You must ensure that the document type exists in the target environment. The definition of the document type identifies supported and required attributes.

The predefined Mexico CFDI document type is in the Payroll category and has several attributes that correspond to information included in the employee’s CFDI payslip:
Mexico CFDI Document Type Attribute Description Recommended CFDI XML Tag Example
Name The name of the occurrence of this document for the employee. You could use a combination of the CFDI:Concepto:Descripcion, Nomina12:Receptor:PeriodicidadPago, Nomina:TipoNomina and Nomina:FechaPago to uniquely identify the employee’s document to make it easier for you to search. N/A Pago de Nomina 04 O 2023-01-31
Number The number of the occurrence of this document for the employee. You could use the CFDI:NoCertificado data as a unique number. 1000000406258237
From Date N/A Nomina:FechaInicialPago 16/01/2023
To Date N/A Nomina:FechaFinalPago 31/01/2023
Issued On N/A CFDI:Fecha 30/01/2023
Issuing Country N/A N/A Mexico
Issuing Location N/A CFDI:LugarExpedicion N/A
Series N/A CFDI:Serie 89254
Folio* N/A CFDI:Folio 4812165
SAT Certificate Number N/A tfd:TimbreFiscalDigital:NoCertificadoSAT 1000000406258090
UUID* N/A tfd:TimbreFiscalDigital:UUID 165233445566778000000000000000
Stamping Date N/A tfd:TimbreFiscalDigital:FechaTimbrado 01/02/2023

Attachment Files

The Document Record Attachment component holds the electronic version of a document for a person. Use the attribute URLorTextorFilename to supply the:

  • URL, if the DataTypeCode is WEB_PAGE
  • Text, if the DataTypeCode is TEXT
  • File name, if the DataTypeCode is FILE

If you're uploading attachment files, then they must be in the same .zip file as the DocumentsOfRecord.dat file that contains the related document records. All attachment files must be placed in a subdirectory named BlobFiles. This subdirectory is named for the BLOB data-type format in which attachment files are held. You specify the name of the attachment file on the File attribute of the Document Record Attachment component.

You can overwrite an existing attachment for a document record with a new attachment using HCM Data Loader. However, the overwriting happens only if the name of the existing attachment and the new attachment are the same.
Note: You can’t overwrite a document record attachment on the Document Details page. The UI still requires you to first delete the existing attachment file and then upload the new file.