Skip to main content

E-invoicing response field mapping for Avalara

Zuora

E-invoicing response field mapping for Avalara

The e-invoicing response field mapping for Avalara maps values in returned files from tax authorities to fields on the EInvoiceData object in Zuora.

After an e-invoicing document is successfully processed by the tax authority, Zuora extracts the returned file from Avalara. The file contains information such as the reference number, QR code data, authorization code, and so on.

You can configure response field mappings at the business region level to customize the field mapping rules of the EInvoiceData object.

Configure e-invoicing response field mappings for Avalara

To configure e-invoicing response field mappings for Avalara, see Configure e-invoicing response field mappings.

Supported response fields

The following table lists supported e-invoicing response fields on the EInvoiceData object.

In Avalara’s integration, the e-invoice file returned from the tax authority is already stored in the billing documents. You can find the file ID in the EInvoiceFileId field on billing documents and download the file with the Retrieve a file API operation. Therefore, Avalara integration does not support customizing the response field mapping for the EInvoiceFile field.

Field name Format Description
AuthorizationCode String

This field is used to store the authorization code issued by the administration when the e-invoicing data of a billing document is approved by the tax authority.

QrCode String

This field is used to store the QR code generated by the tax authority.

You do not need to map this field if the tax authority does not provide a QR code.

ReferenceNumber String

This field is used to store the unique number generated by the tax authority.

You do not need to map this field if the tax authority does not provide this number.

Field1 - Field10 String

These reserved fields are used to store additional information. You can map any values in the tax authority’s returned file to these fields to meet your business needs.

The maximum number of characters for the fields are as follows:

  • Field1 to Field5: 2048
  • Field6 to Field10: 8192

Field path format

A field path in a field mapping configuration is a string that indicates a node in the XML file returned by the tax authority, and the string must comply with the XML Path Language (XPath) syntax.

For more information, see XPath syntax for e-invoicing response field mapping.

Field path examples for Mexico

The following is a returned file sample for Mexico with corresponding field path examples:

<?xml version="1.0" encoding="UTF-8"?>
<cfdi:Comprobante Folio="EINV100001" Sello="hHX/vdfgc...DTtw==" NoCertificado="00001000000508795571" Certificado="MIIF/zC...r7sun" Total="287.27" Exportacion="01" Version="4.0" Serie="F2" Fecha="2023-11-01T22:53:00" FormaPago="03" SubTotal="247.65" Moneda="MXN" TipoDeComprobante="I" MetodoPago="PUE" LugarExpedicion="20290" xmlns:cfdi="http://www.sat.gob.mx/cfd/4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/cfd/4 http://www.sat.gob.mx/sitio_internet/cfd/4/cfdv40.xsd">
    ...
    <cfdi:Complemento>
        <tfd:TimbreFiscalDigital xmlns:tfd="http://www.sat.gob.mx/TimbreFiscalDigital" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sat.gob.mx/TimbreFiscalDigital http://www.sat.gob.mx/sitio_internet/cfd/TimbreFiscalDigital/TimbreFiscalDigitalv11.xsd" Version="1.1" UUID="AECD4389-DEAA-490B-8DDA-9253E184BB4E" FechaTimbrado="2023-11-02T00:57:08" RfcProvCertif="ASE0201179X0" SelloCFD="hHX/vdfg...Ttw==" NoCertificadoSAT="30001000000500003456" SelloSAT="JQm4qT...LfdA==" />
    </cfdi:Complemento>
</cfdi:Comprobante>
Field name Field path Selected content
Field1-10 (Voucher) /cfdi:Comprobante/@NoCertificado 00001000000508795571
Field1-10 (Digital Fiscal Stamp) //tfd:TimbreFiscalDigital/@FechaTimbrado 2023-11-02T00:57:08

Field path examples for Saudi Arabia

The following is a returned file sample for Saudi Arabia with corresponding field path examples:

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
  xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
  xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
  xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
  xmlns:n0="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
  xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2"
  xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
  xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
  xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
  xmlns:xades="http://uri.etsi.org/01903/v1.3.2#">
  <ext:UBLExtensions>
    <ext:UBLExtension>
      <ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
      <ext:ExtensionContent>
        <sig:UBLDocumentSignatures
          xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2">
          <sac:SignatureInformation>
            <cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
            <sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
            <ds:Signature Id="signature">
              ...
              <ds:Object>
                <xades:QualifyingProperties Target="signature">
                  <xades:SignedProperties Id="xadesSignedProperties">
                    <xades:SignedSignatureProperties>
                      <xades:SigningTime>2024-05-20T02:04:13</xades:SigningTime>
                      ...
                    </xades:SignedSignatureProperties>
                  </xades:SignedProperties>
                </xades:QualifyingProperties>
              </ds:Object>
            </ds:Signature>
          </sac:SignatureInformation>
        </sig:UBLDocumentSignatures>
      </ext:ExtensionContent>
    </ext:UBLExtension>
  </ext:UBLExtensions>
  ...
  <cac:AdditionalDocumentReference>
    <cbc:ID>QR</cbc:ID>
    <cac:Attachment>
      <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">
      AQ9TYX…+4w0=</cbc:EmbeddedDocumentBinaryObject>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  ...
</Invoice>
Field name Field path Selected content
QrCode //cac:AdditionalDocumentReference[cbc:ID='QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/text() AQ9TYX…+4w0=
Field1-10 (Signing time) //xades:SigningTime/text() 2024-05-20T02:04:13

Field path examples for Italy

The following is a returned file sample for Italy with corresponding field path examples:

<?xml version="1.0" encoding="utf-8"?>
<q1:FatturaElettronica versione="FPR12"
  xmlns:q1="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2">
  <FatturaElettronicaHeader>
    ...
    <CessionarioCommittente>
      <DatiAnagrafici>
        <IdFiscaleIVA>
          <IdPaese>IT</IdPaese>
          <IdCodice>07643520567</IdCodice>
        </IdFiscaleIVA>
        <Anagrafica>
          <Denominazione>Italy e-invoice sanity 20240519_120055</Denominazione>
        </Anagrafica>
      </DatiAnagrafici>
      <Sede>
        <Indirizzo>
          Via Montiglioni 42-44
        </Indirizzo>
        <CAP>00046</CAP>
        <Comune>Grottaferrata Roma</Comune>
        <Provincia>RM</Provincia>
        <Nazione>IT</Nazione>
      </Sede>
    </CessionarioCommittente>
    ...
  </FatturaElettronicaHeader>
  ...
  <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="SignatureId">
    ...
    <ds:Object>
      <xades:QualifyingProperties Id="QualifyingPropertiesId" Target="#SignatureId">
        <xades:SignedProperties Id="SignedPropertiesId">
          <xades:SignedSignatureProperties>
            <xades:SigningTime>2024-05-19T20:01:42Z</xades:SigningTime>
            ...
          </xades:SignedSignatureProperties>
        </xades:SignedProperties>
      </xades:QualifyingProperties>
    </ds:Object>
  </ds:Signature>
</q1:FatturaElettronica>
Field name Field path Selected content
Field1-10 (VAT Tax ID) //FatturaElettronicaHeader/CessionarioCommittente/DatiAnagrafici/IdFiscaleIVA/IdCodice/text() 07643520567
Field1-10 (Signing time) //xades:SigningTime/text() 2024-05-19T20:01:42Z