Configuring E-mail Notifications

Configuring E-mail Notifications

Mail templates are specified on storefront settings level. They will be applied to all reseller's storefront notifications unless explicitly overridden.

The following templates can be customized in Ecommerce:

  • Activate Service Notification
  • Suspend Service Notification
  • Cancel Service Notification
  • Payment Received Notification
  • New Invoice Notification

Common Template Engine Notes

  • DNP uses Ader Template engine to render Activate Service, Suspend Service, Cancel Service, Payment Received and Invoice Summary templates
  • If you need to render # (sharp) symbol, for example HTML color value, it should be written as ## (double sharp), because # is reserved symbol in template engine.
  • All template engine processing tags ("ad:if", "ad:foreach", etc.) should be well-formed:
    • Have closing tag for each corresponding opening tag
    • All tag attributes should be surrounded with double quotes.
    • All tag names should be written in lower case.
  • More information about Ader Template engine can be found at: http://www.adersoftware.com/index.cfm?page=templateEngine2

New Invoice Notification

new_invoice_tmpl.gif

Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.

Template Variables

#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:

  • Username (string)
  • Password (string)
  • Email (string)
  • SecondaryEmail (string)
  • FirstName (string)
  • LastName (string)
  • CompanyName (string)
  • Address (string)
  • City (string)
  • Country (string)
  • State (string)
  • Zip (string)
  • PrimaryPhone (string)
  • SecondaryPhone (string)
  • Fax (string)
  • InstantMessenger (string) 

In templates it can be used as following:

Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#


#Tax# - invoice tax if applicable. It is a complex structure with the following available fields:

  • TaxationId (int)
  • ResellerId (int)
  • Country (string)
  • State (string)
  • Description (string)
  • Type (TaxationType enum) can be Fixed = 1 or Percentage = 2
  • Amount (decimal)
  • Active (bool)

In templates it can be used as following:

#Tax.Description#: #Tax.Amount.ToString("0.00")# 


#Invoice# - customer's invoice. It is a complex structure with the following fields available:

  • InvoiceId (int)
  • UserId (int)
  • Username (string)
  • ResellerId (int)
  • Created (DateTime)
  • DueDate (DateTime)
  • InvoiceNumber (string)
  • Total (decimal)
  • SubTotal (decimal)
  • TaxationId (int)
  • TaxAmount (decimal)
  • Currency (string)
  • Paid (bool)

In templates it can be used as following:

Hello, #Invoice.Username#
Your invoice number is: Invoice ## #Invoice.InvoiceId# and total is: #Invoice.Total.ToString("0.00")#

 

#InvoiceLines# - the collection of invoice items for the invoice. Each item in the collection is a complex structure with the following fields:

  • ItemId (int)
  • InvoiceId (int)
  • ServiceId (int)
  • ItemName (string)
  • TypeName (string)
  • Quantity (int)
  • Total (decimal)
  • SubTotal (decimal)
  • UnitPrice (decimal)
  • Processed (bool)
  • TcoId (string)

In the templates collection can be iterated as following:

You have the following invoice items:

<ad:foreach collection="#InvoiceLines#" var="Line" index="i"> 
   <h2>#Line.ItemName# - #Line.TypeName#</h2>
</ad:foreach>

Payment Received Notification

payment_rcvd_tmpl.gif

Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.

Template Variables

#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:

  • Username (string)
  • Password (string)
  • Email (string)
  • SecondaryEmail (string)
  • FirstName (string)
  • LastName (string)
  • CompanyName (string)
  • Address (string)
  • City (string)
  • Country (string)
  • State (string)
  • Zip (string)
  • PrimaryPhone (string)
  • SecondaryPhone (string)
  • Fax (string)
  • InstantMessenger (string) 

In templates it can be used as following:

Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#

 

#Payment# -  customer's payment information. It is a complex structure with the following available fields:

  • PaymentId (int)
  • InvoiceId (int)
  • ResellerId (int)
  • UserId (int)
  • Username (string)
  • TransactionId (string)
  • Total (decimal)
  • Currency (string)
  • Created (DateTime)
  • MethodName (string)
  • PluginId (int)
  • ProviderName (string)
  • StatusId (int)
  • Status (TransactionStatus enum) can be Pending = 0, Approved = 1, Declined = 2

In templates it can be used as following:

Hello, #Payment.Username#,
Your payment transaction id is #Payment.TransactionId#. Please preserve it for future references.

Activate / Suspend / Cancel Service Notification 

service_notification_tmpl.gif

Set or update “From”, “CC”, “Subject” and both HTML and Plain Text templates and then click “Save” button.

Template Variables

#Customer# - service customer account. It is a <key field>=<field value> dictionary with the following key fields available:

  • Username (string)
  • Password (string)
  • Email (string)
  • SecondaryEmail (string)
  • FirstName (string)
  • LastName (string)
  • CompanyName (string)
  • Address (string)
  • City (string)
  • Country (string)
  • State (string)
  • Zip (string)
  • PrimaryPhone (string)
  • SecondaryPhone (string)
  • Fax (string)
  • InstantMessenger (string) 

In templates it can be used as following:

Hello, #Customer["FirstName"]#
Your registered e-mail address is: #Customer["Email"]#  

#Service# - customer's service. It is a complex structure with the following fields available:

  • ServiceId (int)
  • ResellerId (int)
  • ParentId (int)
  • ServiceName (string)
  • TypeId (int)
  • Username (string)
  • UserId (int)
  • Status (ServiceStatus enum) can be Ordered = 0, Active = 1, Suspended = 2, Cancelled = 3
  • Created (DateTime)
  • Modified (DateTime)

In templates it can be used as following:

Hello, #Service.Username#
Your service #Service.ServiceName # status is #Service.Status.ToString()#


Add Feedback