Transmission Process

You use the NF-e Info Generation program (R76B561) to generate the XML file to submit to SEFAZ. The NF-e Info Generation program includes up to 50 notas fiscais (the lot) in the XML file that it generates. After you generate the XML file, you use the NF-e Transmission program (P76B0021) to submit the XML file to SEFAZ and to monitor the status of the submission. The NF-e Transmission program enables you to enter the path and file name of the file that you send, and the path and file name to which the process writes the returned files. You also specify the service type (submit NFe lot, cancel NFe number, destroy unused NFe number) and then submit the files to SEFAZ.

When you submit the XML file, the following actions occur:

  1. The NF-e Transmission program sends the XML file to the SEFAZ Web service NfeRecepcaoLote2. The Web service validates that the file content is valid. The content validated includes the digital signature of the sender, the XML schema, and that the sender is an authorized emitter. If the XML file passes the validations, the NfeRecepcaoLote2 Web service responds with a receipt number.

    This image shows the process flow for sending and receiving the initial XML file:

    Process Flow for Send and Receive Initial XML File
  2. The NfeRecepcaoLote2 service sends a response XML file.

    If the lot submission is successful, the service sends a response XML file that includes the receipt number. The status of the XML becomes 103 (lot received successfully).

    If the lot submission is not successful, the service sends a response XML with an error code. Note that the error message does not appear in the JD Edwards EnterpriseOne system. If you receive an XML response with an error code, you must refer to the fiscal authority's Web site (http://www.nfe.fazenda.gov.br/) for information about the error code.

    You must resolve the error before you can continue processing the file in the electronic nota fiscal process. The process writes the received XML file, including the error code, to the output file location that you specified in the NF-e Transmission program (P76B0021).

  3. If you received a receipt number in the response XML file, the JD Edwards EnterpriseOne software system immediately and automatically generates an intermediate XML file (requestNfeRetRecepcao_xxxxxxxxxxxxx.xml).

    The intermediate XML file includes the receipt number and a code that indicates whether the submission is a test file or a production file. The system sends the intermediate XML file to the SEFAZ Web service NfeRetRecepcao. If the file is accepted and processed, the NfeRetRecepcao Web service sends a response that includes an approval or rejection for each NFe in the lot.

  4. If the Web service is still processing the lot submitted, the service sends a response with a status of 105 (batch processing), and the JD Edwards EnterpriseOne software resubmits the file after 30 seconds.

    This image shows the process flow for sending and receiving the intermediate (second) SML file:

    Process Flow for Send and Receive Intermediate (second) XML File

    If the second try does not generate a response from the SEFAZ Web service, then the system submits the file again after an additional 60 seconds. If the submitted lot is still unprocessed after the third automatic submission, you receive an error message and the system writes the intermediate XML file to the input location that you specify in the NF-e Transmission program. You must manually submit the file again.

    See Manually Resubmitting XML Files.

  5. If the SEFAZ successfully processes the lot submitted, then NfeRetRecepcao sends an approval or rejection for each NF-e in the lot.

    The system writes the response file to the output folder that you specify in the NF-e Transmission program. If an NFe is approved, you can print the DANF-e document and complete the processing of your sales order and shipment. If an NFe in the lot is not approved, you must make the necessary corrections and resubmit the NFe request in another lot.

When you transmit information for cancelled NFe numbers using the evtCancNFe_v9.99 cancellation schema, the process uses the nfeRecepcaoEvento Web service and runs the Cancelled NFes by Lot XML Generator (R76B524) program to generate the XML file for cancelled NFe numbers.

This image shows the process flow for cancelled NFEs using the evtCancNFe_v9.99 cancellation schema:

Process Flow for evtCancNFe_v9.99 Cancellation Schema

When you transmit information for destroyed NFe numbers, the process uses the NfeInutilzacao2 Web service. You use the NF-e Info Generation program to generate the XML file for destroyed NFe numbers.

This image shows the process flow for destroyed NFEs:

Process Flow for Destroyed NFEs

The JD Edwards EnterpriseOne solution for transmitting NFe XML files does not support the NfeConsulta2 and NfeStatusServico2 Web services.