Skip to main content
Aria Knowledge Central

e-invoicing Email Template

Overview

Aria also supports internal electronic invoicing (e-invoicing) to help you realize greater billing efficiency, cost savings, faster payments, and compliance with European e-invoicing standards. Once enabled for your account, Aria automatically emails an XML file and a PDF document to your account holders, based on your client-configured e-invoicing email template. By default, only invoices with Aria-managed tax lines are included; you can choose to include all invoices instead.

To enable this feature and configure the required client parameters (controlling whether e-invoicing applies only to invoices with Aria-managed tax lines, or to all invoices), contact your Aria representative.

Feature Summary

  • An Electronic Invoice (EI) email template class, used exclusively for e-invoicing.
  • A batch process that automatically emails an XML file and a PDF version of each qualifying invoice to the account holder, using your configured EI template.
  • A VAT Registration Number field on the Company Profile.
  • An email address field for Legal Entities.
  • Support for storing a Government Invoice ID (Leitweg-ID) at the account and billing group level, for German public-sector e-invoicing.
  • The ability to assign the EI (and Invoice/Credit Note) email templates to an account in a single API call.

E-Invoicing Template and Batch Delivery

EI Email Template Class

You can create and manage an Electronic Invoice (EI) email template from the Email Templates admin screen. The EI template supports XML content only and includes dedicated sections—template body, payment application, tax line, and invoice line—each with its own reference replacement strings, so you can build and maintain the e-invoicing XML independently by section.

Automatic Batch Delivery

Once e-invoicing is enabled for your account, Aria generates and emails the e-invoice for each qualifying invoice after your regular statement delivery completes. Each email includes both the XML file and a PDF rendering of the invoice, sent to the account's statement contact (or billing/admin contact if no statement contact is on file).

By default, Aria sends e-invoices only for invoices containing Aria-managed tax lines. You can choose to have Aria send e-invoices for all invoices regardless of tax lines, using a client parameter setting. Contact your Aria representative to enable e-invoicing and configure this setting.

Company and Legal Entity Enhancements

VAT Registration Number

A VAT Registration Number field is included on the Company Profile, viewable and editable from the Company Profile screen (Configuration > Client Settings > Company Profile) or via the set_company_profile_m API. Aria uses this value as the seller's tax identification on e-invoices when a Legal Entity VAT number isn't available.

Legal Entity Email Address

You can also add an email address to a Legal Entity from the Legal Entity screen (if this has been set up for you) or via either the create_legal_entity_m or update_legal_entity_m APIs. Aria uses this address as the seller's contact on e-invoices for accounts assigned to that Legal Entity.

Government Invoice ID (Leitweg-ID) Support

For accounts requiring German public-sector e-invoicing, you can store a Government Invoice ID (Leitweg-ID) at the account level, the billing group level, or both. When both are set, Aria uses the billing group value. Aria includes this value on the e-invoice so it can be routed to the correct public-sector recipient.

Assign e-invoicing Email Templates to an Account via API

Additionally, you can assign the Invoice, Credit Note, and Electronic Invoice email templates to an account in a single API call instead of setting each template class separately. This replaces the previous single-template fields, which remain available for backward compatibility.

Use either the create_acct_complete_m or update_acct_complete_m APis with the new <email_template_override> input array. Each entry in the array specifies:

  • <template_class>—I (Invoice), CN (Credit Note), or EI (Electronic Invoice); defaults to I when not supplied
  • <template_no>—the Aria-assigned template number
  • <client_template_id>—your own client-defined template identifier

If both <template_no> and <client_template_id> are provided for the same entry, <template_no> takes precedence. Values passed in <email_template_override> take precedence over the <legacy alt_msg_template_no>, <client_alt_msg_template_id>, <cn_alt_msg_template_no>, and <client_cn_alt_msg_template_id> fields when both are supplied in the same call. Those legacy fields continue to work as before when <email_template_override> is not used.

Capture E-Invoicing Fields on Accounts and Billing Groups

To support values required for jurisdiction-specific e-invoicing—such as the Buyer Reference/Endpoint ID (Leitweg-ID) required for German e-invoicing—you can now store e-invoicing-specific key/value fields on an account or a billing group. A billing group-level value takes precedence over an account-level value of the same field name.

Email template/statement stubs and loops used for e-invoicing

Since the e-invoicing XML invoice rendering consists of multiple logical sections such as Payment Application, Tax Line, and Invoice Line, Aria has introduced dedicated stub sections for the e-invoicing template class to improve manageability and maintainability via the UI. These appear below:

Section Editor Label Replacement String Header
Main XML content Template body E-Invoicing Inputs
Payment Details (stub 1) Payment Application Payment Application Inputs
Tax Breakdown Details (stub 2) Tax Line Tax Line Inputs
Invoice Line-item Details (stub 3) Invoice Line Invoice Line Inputs

The following replacement strings are available for use in e-invoicing (EI) templates:

Header

UBL field Replacement string Source Notes
ID (invoice no) insertGLInvNo gl.invoice_no
IssueDate insertGLBillDate gl.bill_date Format YYYY-MM-DD
DueDate insertGLDueDate gl.due_date Format YYYY-MM-DD
InvoicePeriodStartDate (new for EI templates) insertGLOverallFromDate gl.from_date Format YYYY-MM-DD
InvoicePeriodEndDate (new for EI templates) insertGLOverallToDate gl.to_date Format YYYY-MM-DD
DOcumentCurrencyCode + all @currencyID insertUpperCurrencyCode gl.currency ISO 4217, upper-cased
BuyerReference insertBuyerReference acct.acct_no Same token reused for Buyer PartyIdentifiction/ID

Seller

All-or-nothing precedence: when the account has a Legal Entity (LE) assigned, all 7 Seller address tokens are sourced from client_legal_entity; otherwise, all 7 fall back to client. Per-field mixing between the two sources is not permitted.

UBL field Replacement string Source Notes
PartyIdentification/ID insertClientNo client.client_no

Party Name/Name
PartyLegalEntity/
RegistrationName

insertClientName client.client_name
EndpointID insertSellerEmail LE email/Client billing_email schemeID EM
PostalAddress/StreetName insertSellerAddress1 LE/Client address1
AdditionalStreetName insertSellerAddress2 LE/Client address2
CityName insertSellerCity LE/Client city
PostalZone insertSelletZip LE postal_code/Client postal_code
CountrySubentity insertSellerStateProv LE state/Client state_prov
Country/IdentificationCode insertSellerISOCountry LE/Client country Must be ISO 3166-1 alpha-2
(e.g. GB)
PartyTaxScheme/CompanyID insertSellerVatId LE/Client vat_registration_no Must be country=prefixed (e.g. GB123...); free-text input

Buyer

UBL field Replacement string Source Notes
PartyTaxScheme/CompanyID insertBuyerVatId acct.taxpayer_id Must be country-prefixed;
free-text input
PartyName/Name
PartyLegalEntity/
RegistrationName
insertBuyerCompanyName acct_address.company_name
PostalAddress/StreetName insertBuyerAddress1 acct_address.address1
AdditionalStreetName insertBuyerAddress2 acct_address.address2
CityName insertBuyerCity acct_address.city
PostalZone insertBuyerZip acct_address.zip
CountrySubentity insertBuyerStateProv acct_address.state
Country/IdentificationCode insertBuyerISOCountry acct_address.country Must be ISO 3166-1 alpha-2
Contact/Name insertBuyerFirstName + insertBuyerLastName acct_address.first_name , last_name Concatenated
Contact/Telephone insertBuyerIntlPhone acct_address.intl_phone
Contact/ElectronicMail insertBuyerEmail acct_address.email

Buyer address precedence: acct_billing_group.statement_address_seq > billing_info.bill_address_seq > acct.acct_address_seq.

Payment Means (per payment)

UBL field Replacement string Source Notes
PaymentID insertPaymentReference payments.payment_id
PaymentMandate/ID insertDirectDebitMandateId billing_info.mandate_id
PaymentMandate/PayerFinancialAccount/ID insertBankIdCd billing_info.bank_id_cd
PayeeFinancialAccount/ID insertBankAcctSuffix billing_info.suffix Masked: LPAD(suffix,16,'*')
—16 chars, last 4 visible

Invoice Line

UBL field Replacement string Source Notes
InvoiceLine/ID insertLineItemNo gl_detail.seq_num
LineExtensionAmount insertItemAmount gl_detail.debit fmt_ubl_num, 2 decimal point
InvoicedQuantity insertItemUnits gl_detail.usage_units Needs @unitCode (default EA) in template
Price/PriceAmount insertItemRate gl_detail.usage_rate Client rate scale: USAGE_/RECURRING_RATE_PER_UNIT_SCALE, else currency scale
Item/Name insertItemPlanName gl_detail.plan_name
Item/Description insertItemSimpleLabel gl_detail.comments
ClassifiedTaxCategory/Percent insertItemTaxRate SUM(gl_tax_detail.tax_rate)
for the line
x 100 (stored fraction > percentage)

Tax Breakdown

UBL field Replacement string Source Notes
TaxSubtotal/TaxableAmount insertTaxSubtotalTaxableAmount MAX(gl_detail.debit) of taxed line MAX is constant within the group
TaxSubtotal/TaxAmount insertTaxSubtotalTaxAmount SUM(gl_tax_detail.debit) Signed —+ve on charges, - ve on credits
TaxCategory/Percent insertTaxSubtotalPercent SUM(gl_tax_detail.tax_rate) x 100; SUM handles compoint tax
TaxTotal/TaxAmount insertTaxTotalTaxAmount Sum of all subtotal tax amounts Signed

Monetary Totals

UBL field Replacement string Source Notes
LineExtensionAmount (BT-106) and TaxExclusiveAmount (BT-109)

insertInvoiceNetAmount

ExcludingTax

(no break above - edited for presentation only)icon.png

SUM(gl_detail.debit) where services.is_tax !=1

One token feeds both elements
TaxInclusiveAmount (BT-112)

insertInvoiceNetAmount

IncludingTax

(no break above - edited for presentation only)icon.png

line-ext + total tax 

 PayableAmount (BT-115) insertGLBalDue gl.debit - gl.credit Balance after applied payments

Statement Sequence Strings

UBL field Replacement string Source Notes
(statement seq) insertAcctStatementSeqStr acct_statement.acct_statement_seq_str
(second statement seq) insertSecondAcctStatementSeqStr

acct_statement.second_acct_statement_seq_str

To enable e-invoicing for your account, along with configuring the client parameters that control which invoices are eligible, contact your Aria representative.

TOP
  • Was this article helpful?