Bookmark page
Send to a Friend
Print this page
Experts in:
Bespoke Solutions for Exchequer

XML eGateway Loyalty Points Plug-in Online Send Promotional Literature:

A program to scan all Enterprise accounts records, and merges to an HTML template to produce a hard copy, or e-mail based on the points statement/promotional literature.

Loyalty Points Document Sender

Test Send

When [Start Send] is pressed the program will use the HTML in TemplateToSend\template.html to print, using PDF writer, and e-mail out promotional e-mails based on the template.html.   more information about template.html

Use [Test Send] to only process to accounts listed in <TestAccountList> tag in the system setting. This allows the merged data to be checked before sending for real. It is suggested that the accounts be a mix of small and large accounts. Depending on the options ticked it will show/print each document generated and/or e-mail all to <TestAccountEmail>

Live send

It is recommended to use [Print all Documents for real] first. This will print all the required documents to printer.

Then use [e-mail all Documents for real] this will start the e-mail process. The program will send up to x e-mails, as started in system setting <SMTPSendLimit> tag.   The remaineder will be send every day in <SMTPSendHour> until finished.

Documents are e-mailed if they have an email address entered in Enterprise account record.

e-mail opt out

This must be maintained manually.  it is suggested that e-mails contain a line "Please e-mail back STOP to unsubscribe".  Simply enter the e-mail address in the "OptOut" table, in LoyaltyPoints.mdb.

template.html File:

This file contains the HTML used to create the Promotional Literature.  It must contain the styles within the file, and any images must be stored and referenced on a web server.

The file can be customised using any web publishing package such as Dreamweaver.  Always make a backup first.  It basically contains simple tags, which are replaced with Exchequer data, and a table which lists the last few transactions the customer has earned points for.

Table Options

The header section of the file contains a section which defines:

Field Name



Put last x transactions in table, 0 if off


Put last x days transactions in table, 0 if off


Text to use in email subject


Text to appear if line/transaction is/contains a redemption of points


Allows for formatting before and after a redemption line




Account Data Tags

The following tags are replaced with Enterprise data when merging data.

Field Name



Account code




Company name


Main address on account






Loyalty Points earned

[AcUser1]  … [AcUser4] 



Todays date

Note: These are case sensitive


Table Structure

The format of the table to show the transactions is quite complex.  It contains transaction header and lines, with titles for each section.   This can be customised by altering the styles.

<html xmlns="">

<!-- Settings for the Loyalty Points table and reports
    <emailSubject>PureTone Loyalty Points [AcPoints]</emailSubject>





<style type="text/css">






<p>Date:<strong>[date] </strong></p>


... <!-- Promotional text-->


<table class="outerTable">
    <th><p>Our Ref</p></th>


  <data1>  <!-- Transaction Header data -->
    <td class="cell runningTot">[runningTot]</td>
    <td class="cell ourRef">[ourRef] [redemptiontext]</td>
    <td class="cell transDate">[transDate]</td>
    <td class="cell yourRef">[yourRef]</td>
    <td class="cell altRef">[altRef]</td>
    <td class="cell user">[user]</td>

  <data2>  <!-- Transaction Line Headings -->
    <td class="cell2 " colspan="5">

    <table class="innerTable">
      <th scope="col"><p class="th2 th2r">Total Points</p></th>
      <th scope="col"><p class="th2 th2r">Points</p></th>
      <th scope="col"><p class="th2 th2r">Net</p></th>
      <th scope="col">&nbsp; </th>

      <data3>  <!-- Transaction Line data -->
      <td class="cell2 fig totPoints">[totPoints]</td>
      <td class="cell2 fig points">[points] [redemptiontext]</td>
      <td class="cell2 fig net">[net]</td>
      <td class="cell2 stockCode" colspan="2">[stockCode]</td>




  <data4> <!-- Table footer for openeing balance -->
    <td class="cell " colspan="5">[footerText]</td>


... <!-- Promotional text-->




Forms a table like:

Loyalty points example report



Table Tags:<data1> section

The following tags are replaced with Enterprise Transaction Header data when merging data.

Field Name



Transaction ref


Transaction date


Your Ref


alt Ref


Text to appear if a redemption line


Loyalty Points runnning total

Note: These are case sensitive

Table Tags:<data3> section

The following tags are replaced with Enterprise Transaction Line data when merging data.

Field Name



Loyalty Points runnning total


Point earned


Net for line




Text to appear if a redemption line


Stockcode and description

Note: These are case sensitive