Skip to main content
Vindicia Subscribe can automatically issue customer email notifications for predefined events in a billing cycle, such as an upcoming billing, an overdue payment, or other relevant event. In order for Vindicia Subscribe to issue an email notification, you must first provide Vindicia with a customized email template for the particular event type. An email template includes a combination of the general message content (the greeting and so on) in HTML format, and email tags which are replaced by data from Vindicia Subscribe when the email is generated. Vindicia Subscribe generates an email when a trigger event occurs. You must designate the events which trigger an email notification, such as a successful call to AutoBill.update, Transaction.authCapture, or Refund.perform. For more information about the billing and invoicing events which can trigger email notifications, see Working with Customer Notifications in the Vindicia Subscribe SOAP API Programming Guide. Note: Vindicia Subscribe does not issue default emails. If a trigger event occurs but you have not provided a template for it, Vindicia Subscribe does not issue an email. (However, the trigger event is recorded in the SOAP log for troubleshooting purposes.)

The Email Template Uploading Process

To upload email templates, you must provide the templates to Vindicia. You cannot directly upload email templates into Vindicia Subscribe. To upload email templates:
  1. Create a set of email templates that incorporate email tags supported by Vindicia Subscribe and provide them to Vindicia.
  2. Vindicia loads the templates into the database in Staging for testing by your organization.
  3. The load/test process repeats until the templates have passed your QA.
  4. When the email templates are ready to launch, Vindica loads the template into Production.
  5. If you need to make changes to the templates after they are in live production, open a support ticket and give the updated templates to Vindicia Client Technical Support (CTS.)

Email Tags: Tuples vs. Template Toolkit

Vindicia Subscribe supports two syntax forms to embed email tags into your email content:
  • A tuple is an ordered set of values. Tuples are simplistic devices that allow only for the replacement of the single data element the tag represents, such as “amount”, “name”, and so on.
  • Template Toolkit is a set of open-source Perl modules (not developed by Vindicia) which can be used to employ programmatic constructs around email tags. For example, an array of transaction items can be iterated through and tested for specific values using statements such as FOREACH and IF, and regular expression matching such as “==” and “!=”. For more information about Template Toolkit, see http://template-toolkit.org/.
You must use either the tuple structure or the Template Toolkit structure in an email template. You cannot use both in the same template. Note: Not all email tags available in Vindicia Subscribe are populated for every event. For example, there is a tag for “refund_amount” which is blank for every template except the Refund email template.

Using Tuples

Tuples take the form <tpl name="<TAG>"/>. As an example, the tuple for the amount tag is <tpl name="amount"/>, which is replaced with the actual amount generated on a Transaction by Vindicia Subscribe when this email event is triggered. For information about tuples available in Vindicia Subscribe, see Creating Billing Notification Templates in the Vindicia Subscribe Programming Guide.

Using Template Toolkit

Template Toolkit support in Vindicia Subscribe is a method of enveloping the available email tags within the Template Toolkit structure. Some email tags in Vindicia Subscribe can be in the form of an array, which can be unwieldy for the simple tuple structure. For example, in a Transaction with more than one Transaction Item (sku), there are several arrays that can be used together to display a coherent picture of the transaction: sku, price, and desc. The following Template Toolkit example iterates through these tag arrays in order to display the correct amount of purchased items in an email, skipping any items that do not have a value for price:
The following example uses the affiliate tag to change the text in the greeting:

Testing Template Toolkit

When using Template Toolkit, it is useful to test the syntax locally without loading email templates and trigger events. To test syntax, download the Template Toolkit modules and use the tpage tool. Download Template Toolkit modules at http://template-toolkit.org/ The example below uses tpage to test a text template with some tag parameters defined on the command line and some defined in the input file:
  1. The test file test.tt contains the following content:
  2. The command line shown here specifies the data to replace the tags in the test file:
  3. The test generates the following email:

Sample Email Templates using Template Toolkit

The following email template examples represent typical customer notifications.

Pre-Billing (No Payment Method on File)

Pre-Billing (Payment Method on File)

Success on Initial Subscription

Success on Subscription Renewal

Hard Fail On Subscription Renewal

Subscription Expiration

Subscription Cancellation

Refund

End of Trial Event

Sample Code

Under construction. Parent topic:Email Notifications