Create and preview e-invoice file templates for billing documents through the Zuora UI
Create and preview e-invoice file templates for billing documents, such as invoices, credit memos, and debit memos, using the Zuora UI.
You can create e-invoice file templates for billing documents through the Zuora UI, including invoices, credit memos, and debit memos, and then preview e-invoice files.
To create and preview an e-invoice file template for a billing document, perform the following steps:
- Click your avatar in the upper right and click Settings > Billing .
- On the Billing Settings page, click E-Invoice .
- On the E-Invoice Settings page, click + Create in the Templates section.
- In the displayed Create Template dialog, configure the following information:
-
In the Name field, specify a name for the e-invoice file template.
-
From the Provider list, select an e-invoicing service provider.
-
In the Country field, select the country or region where you must comply with e-invoicing requirements.
-
Click the billing document type in the Sample Templates section, and then click the sample template you want to use. Available sample templates for each billing document type vary depending on the service provider you select in Step b. Zuora recommends that you select the sample template based on the following priority: country-specific template > general template > blank template.
-
Blank: A blank template without any tag or merge field. Select this template if you want to create an e-invoice file template from scratch. It is highly recommended to use a country-specific or general template, if any.
-
General: A pre-configured template with general tags and merge fields that apply to most countries. When creating e-invoice file templates based on a general sample template, you might need to customize the template to meet your business requirements. For more information about e-invoice file template customization, see Create an e-invoice file template for Sovos for a country not pre-integrated with Zuora or Create an e-invoice file template for Avalara for a country not pre-integrated with Zuora .
-
Country-specific template: A pre-configured template that applies to a specific country. You can use it directly for customers from that country. If Zuora provides a country-specific template for the country you select in Step c, other country-specific templates are un-selectable. For more information about pre-integrated countries, see Pre-integrated countries for Sovos and Pre-integrated countries for Avalara .
-
-
Click Save And Edit Content to save the settings and start to edit template content. You can also click Save to save the template and edit template content later.
-
- In the displayed e-invoice file template editor, customize and preview the e-invoice file template content.
- In the Edit tab of the left panel, customize the e-invoice file template content. Customize the default templates if available, or create a new template from scratch.
- Click Preview to switch to the Preview mode from the Edit mode.
- In the Preview Settings section, specify an account and billing document to load the data of the specified account and billing document into your template:
-
In the Account field, search for account keywords and select the account that you want to preview billing documents for.
-
From the Invoice , Credit Memo , or Debit Memo list, select the invoice, credit memo, or debit memo that you want to preview in the e-invoice file template.Note: If you create a new account and billing document from another page when the current page is open, you can click the refresh icon to load the new account and billing document in the preceding fields. For example, you enable the Generate E-Invoice for Customer setting for an existing account.
-
- Optional. If you update an account and billing document from another page when the current page is open, you can click the refresh icon in the Preview tab to load the updated data. For example, you update a custom field on an invoice details page.
- If validation fails, resolve the template format errors in the Edit mode. Such error messages are displayed in the left panel.
- If validation passes, you will see some or all of the following preview results: If the Status is Posted and the E-Invoice Status is Failed , click the Edit tab to solve the errors in the edit mode according to the error message and logs (if available). After that, click the Preview tab and click the Regenerate E-Invoice button. Repeat steps 5-7 until the E-Invoice Status changes to Success .
-
Status : This field indicates the invoice status.
-
E-Invoice Status : This field is available only if you have configured the e-invoicing profile for the account and posted the invoice. For more information, see Configure e-invoicing profile for customer accounts .
-
E-Invoice Error Code and E-Invoice Error Message : For more information, see View e-invoice file status and error information through the Zuora UI .
-
Download Logs link: This link and logs are unavailable when PEPPOL is specified as the service provider.
-
Regenerate E-Invoice button: This button is available if the Status is Posted and the E-Invoice Status is Failed .
-
- Click Save in the upper right to save the e-invoice file template.
An e-invoice file template is created for invoices, credit memos, or debit memos.
The following information is a sample of an e-invoice file template for invoices in Saudi Arabia:
<?xml version="1.0" encoding="utf-8"?> <StandardBusinessDocument xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:enc="http://www.sovos.com/namespaces/base64Document" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" > <StandardBusinessDocumentHeader> {{Cmd_Assign(BusinessRegion,EInvoiceBusinessRegions|FilterByValue(Country,EQ,'SA')|First(1),True)}} {{#BusinessRegion}} {{Cmd_Assign(VarBusinessNumber,BusinessNumber,True)}} {{/BusinessRegion}} {{#Invoice.InvoiceItems|FlatMap(TaxationItems)|GroupBy(TaxRateDescription)|First(1)}} {{Cmd_Assign(VarTaxCode,TaxRateDescription,True)}} {{/Invoice.InvoiceItems|FlatMap(TaxationItems)|GroupBy(TaxRateDescription)|First(1)}} <HeaderVersion>1.0</HeaderVersion> <Sender> <Identifier Authority="SA">{{VarBusinessNumber}}</Identifier> <ContactInformation> <Contact>{{VarBusinessNumber}}</Contact> </ContactInformation> </Sender> <Receiver> <Identifier Authority="SA">{{Invoice.Account.EInvoiceProfile.BusinessNumber}}</Identifier> <ContactInformation> <Contact>{{Invoice.Account.EInvoiceProfile.BusinessNumber}}</Contact> </ContactInformation> </Receiver> <DocumentIdentification> <Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</Standard> <TypeVersion>2.1</TypeVersion> <InstanceIdentifier>{{Invoice.InvoiceNumber}}</InstanceIdentifier> <Type>Invoice</Type> <MultipleType>false</MultipleType> <CreationDateAndTime>{{Invoice.CreatedDate|Format(yyyy-MM-dd'T'HH:mm:ss'Z')}}</CreationDateAndTime> </DocumentIdentification> <BusinessScope> <Scope> <Type>Country</Type> <InstanceIdentifier/> <Identifier>SA</Identifier> </Scope> <Scope> <Type>Mapping.TransformDocument</Type> <InstanceIdentifier/> <Identifier>SCI-TO-LEGAL_INVOICE</Identifier> </Scope> <Scope> <Type>Mapping.OutputSchema</Type> <InstanceIdentifier/> <Identifier>UBLInvoice</Identifier> </Scope> <Scope> <Type>CompanyCode</Type> <InstanceIdentifier/> <Identifier>{{VarBusinessNumber}}</Identifier> </Scope> <Scope> <Type>SenderDocumentId</Type> <InstanceIdentifier/> <Identifier>{{Invoice.InvoiceNumber}}</Identifier> </Scope> <Scope> <Type>SenderSystemId</Type> <InstanceIdentifier/> <Identifier>ZUORASA</Identifier> </Scope> <Scope> <Type>ProcessType</Type> <InstanceIdentifier/> <Identifier>Outbound</Identifier> </Scope> <Scope> <Type>BusinessProcess</Type> <InstanceIdentifier/> <BusinessService> <BusinessServiceName>Default</BusinessServiceName> </BusinessService> </Scope> <Scope> <Type>BusinessCategory</Type> <InstanceIdentifier/> <Identifier>B2B</Identifier> </Scope> <Scope> <Type>MetaSchema</Type> <InstanceIdentifier/> </Scope> <Scope> <Type>Version</Type> <InstanceIdentifier/> <Identifier>1.0</Identifier> </Scope> <Scope> <Type>Branch</Type> <InstanceIdentifier/> <Identifier>YOUR-BRANCH</Identifier><!-- will be configured by customer !--> </Scope> </BusinessScope> </StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> {{#Invoice}} <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"> <cbc:ProfileID>reporting:1.0</cbc:ProfileID> <cbc:ID>{{InvoiceNumber}}</cbc:ID> <cbc:UUID>{{#Wp_Eval}} "{{Id}}".replaceAll("(.{8})(.{4})(.{4})(.{4})(.{12})", "$1-$2-$3-$4-$5") {{/Wp_Eval}}</cbc:UUID> <cbc:IssueDate>{{InvoiceDate}}</cbc:IssueDate> <cbc:IssueTime>00:00:00</cbc:IssueTime> <!-- Zuora doesn't store Time value !--> <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode> <cbc:DocumentCurrencyCode>{{Account.Currency}}</cbc:DocumentCurrencyCode> <cbc:TaxCurrencyCode>{{Account.Currency}}</cbc:TaxCurrencyCode> <cac:Signature> <cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID> <cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod> </cac:Signature> {{#BusinessRegion}} <cac:AccountingSupplierParty> <cac:Party> <cac:PartyIdentification> <cbc:ID schemeID="CRN">{{VarBusinessNumber}}</cbc:ID> </cac:PartyIdentification> <cac:PostalAddress> <cbc:StreetName>{{AddressLine1}}</cbc:StreetName> <cbc:BuildingNumber>{{AddressLine2}}</cbc:BuildingNumber> <!-- This merge field should have Integer value with 4digits !--> <cbc:CitySubdivisionName>{{State}}</cbc:CitySubdivisionName> <cbc:CityName>{{City}}</cbc:CityName> <cbc:PostalZone>{{PostalCode}}</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>SA</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cbc:CompanyID>{{VarBusinessNumber}}</cbc:CompanyID> <cac:TaxScheme> <cbc:ID>{{VarTaxCode}}</cbc:ID> </cac:TaxScheme> </cac:PartyTaxScheme> <cac:PartyLegalEntity> <cbc:RegistrationName>{{BusinessName}}</cbc:RegistrationName> </cac:PartyLegalEntity> </cac:Party> </cac:AccountingSupplierParty> {{/BusinessRegion}} <cac:AccountingCustomerParty> <cac:Party> <cac:PartyIdentification> <cbc:ID schemeID="CRN">{{Account.EInvoiceProfile.BusinessNumber}}</cbc:ID> </cac:PartyIdentification> <cac:PostalAddress> <cbc:StreetName>{{#Wp_Eval}} "{{BillToContact.Address1}}" != '' ? "{{BillToContact.Address1}}":"{{Account.BillTo.Address1}}"{{/Wp_Eval}}</cbc:StreetName> <cbc:BuildingNumber>{{#Wp_Eval}} "{{BillToContact.Address2}}" != '' ? "{{BillToContact.Address2}}":"{{Account.BillTo.Address2}}"{{/Wp_Eval}}</cbc:BuildingNumber> <!-- This merge field should have Integer value with 4digits !--> <cbc:CitySubdivisionName>{{#Wp_Eval}} "{{Invoice.BillToContact.State}}" != '' ? "{{Invoice.BillToContact.State}}":"{{Account.BillTo.State}}"{{/Wp_Eval}}</cbc:CitySubdivisionName> <cbc:CityName>{{#Wp_Eval}} "{{Invoice.BillToContact.City}}" != '' ? "{{Invoice.BillToContact.City}}":"{{Account.BillTo.City}}"{{/Wp_Eval}}</cbc:CityName> <cbc:PostalZone>{{#Wp_Eval}} "{{Invoice.BillToContact.PostalCode}}" != '' ? "{{Invoice.BillToContact.PostalCode}}":"{{Account.BillTo.PostalCode}}"{{/Wp_Eval}}</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>SA</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cac:TaxScheme> <cbc:ID>{{VarTaxCode}}</cbc:ID> </cac:TaxScheme> </cac:PartyTaxScheme> <cac:PartyLegalEntity> <cbc:RegistrationName>{{Account.EInvoiceProfile.BusinessName}}</cbc:RegistrationName> </cac:PartyLegalEntity> </cac:Party> </cac:AccountingCustomerParty> <cac:Delivery> <cbc:ActualDeliveryDate>{{Invoice.InvoiceDate}}</cbc:ActualDeliveryDate> <cbc:LatestDeliveryDate>{{Invoice.InvoiceDate}}</cbc:LatestDeliveryDate> </cac:Delivery> <cac:PaymentTerms> <cbc:Note>05</cbc:Note> <!-- Internal proposal to have value -5 !--> <cbc:Amount currencyID="{{Account.Currency}}">{{Amount|Round(2)}}</cbc:Amount> </cac:PaymentTerms> <cac:TaxTotal> <cbc:TaxAmount currencyID="{{Account.Currency}}">{{TaxAmount|Round(2)}}</cbc:TaxAmount> </cac:TaxTotal> <cac:TaxTotal> <cbc:TaxAmount currencyID="{{Account.Currency}}">{{TaxAmount|Round(2)}}</cbc:TaxAmount> {{#InvoiceItems|GroupBy(TaxCode)}} {{Cmd_Assign(GroupedByTaxCode,_Group)}} <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="{{Account.Currency}}">{{GroupedByTaxCode|Sum(ChargeAmount)|Round(2)}}</cbc:TaxableAmount> <cbc:TaxAmount currencyID="{{Account.Currency}}">{{GroupedByTaxCode|FlatMap(TaxationItems)|Sum(TaxAmount)|Round(2)}}</cbc:TaxAmount> {{#GroupedByTaxCode|FlatMap(TaxationItems)|First(1)}} <cac:TaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>{{#Wp_Eval}} {{TaxRate}} * 100|Round(2) {{/Wp_Eval}}</cbc:Percent> <cac:TaxScheme> <cbc:ID>{{TaxRateDescription}}</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> {{/GroupedByTaxCode|FlatMap(TaxationItems)|First(1)}} </cac:TaxSubtotal> {{/InvoiceItems|GroupBy(TaxCode)}} </cac:TaxTotal> <cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="{{Account.Currency}}">{{AmountWithoutTax|Round(2)}}</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="{{Account.Currency}}">{{AmountWithoutTax|Round(2)}}</cbc:TaxExclusiveAmount> <cbc:AllowanceTotalAmount currencyID="{{Account.Currency}}">0.00</cbc:AllowanceTotalAmount> <cbc:PrepaidAmount currencyID="{{Account.Currency}}">0.00</cbc:PrepaidAmount> <cbc:PayableAmount currencyID="{{Account.Currency}}">{{Amount|Round(2)}}</cbc:PayableAmount> </cac:LegalMonetaryTotal> {{Cmd_Assign(LineSerialNumber,"1",true)}} {{#Invoice.InvoiceItems|FilterByValue(ProcessingType,NE,1)}} <cac:InvoiceLine> <cbc:ID>{{#Wp_Eval}}{{LineSerialNumber}}+1|SetToVar(LineSerialNumber){{/Wp_Eval}}</cbc:ID> <cbc:InvoicedQuantity unitCode="{{UOM}}">{{Quantity}}</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="{{Account.Currency}}">{{ChargeAmount|Round(2)}}</cbc:LineExtensionAmount> <cac:PricingReference> <cac:AlternativeConditionPrice> <cbc:PriceAmount currencyID="{{Account.Currency}}">{{ChargeAmount|Round(2)}}</cbc:PriceAmount> <cbc:PriceTypeCode>02</cbc:PriceTypeCode> </cac:AlternativeConditionPrice> </cac:PricingReference> <cac:TaxTotal> <cbc:TaxAmount currencyID="{{Account.Currency}}">{{TaxAmount|Round(2)}}</cbc:TaxAmount> <cbc:RoundingAmount currencyID="{{Account.Currency}}">{{#Wp_Eval}} {{ChargeAmount|Round(2)}} + {{TaxAmount|Round(2)}} {{/Wp_Eval}}</cbc:RoundingAmount> </cac:TaxTotal> <cac:Item> <cbc:Name>{{ChargeName}}</cbc:Name> {{#TaxationItems}} <cac:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>{{#Wp_Eval}} {{TaxRate}} * 100|Round(2) {{/Wp_Eval}}</cbc:Percent> <cac:TaxScheme> <cbc:ID>{{TaxRateDescription}}</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> {{/TaxationItems}} </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="{{Account.Currency}}">{{UnitPrice}}</cbc:PriceAmount> </cac:Price> </cac:InvoiceLine> {{/Invoice.InvoiceItems|FilterByValue(ProcessingType,NE,1)}} </Invoice> {{/Invoice}} </sci:SovosCanonicalInvoice> </svs:SovosDocument> </StandardBusinessDocument>