Please enable JavaScript to view this site.

WebOffice  2.67 Complete Guide

Navigation: Support Menu > Message Forwarding

Message Forwarding Templates

Scroll Prev Top Next More
Menu:Support -> Message Forwarding -> Message Forwarding Templates
Note:
Templates for event and purchase forwarding are typically maintained and added by developers.

The message templates determine the format in which events originating from terminals are presented to users via e‑mail or SMS.  Message templates are generally based on files in the .xslt format.  These files are normally produced by developers, and templates are designed for a specific means of communication: SMS or e‑mail.  When it comes to message templates designed for forwarding via e‑mail, different templates are used depending on whether the customer’s e‑mail system handles HTML messages or messages in plain text only.

The Message Forwarding Templates page shows all current message templates used for forwarding events and purchases.  To display the list, select Cale Support > Message Forwarding > Message Forwarding Templates on the WebOffice menu.

CALEWE~1_img225

To view the details for a message template, click CALEWE~1_img121.

Note:
When sending a purchase receipt by e-mail, the actual receipt will be included as a PDF attachment. The xslt-template should just contain the message body. The ReceiptMailBodyText attribute is used for that.

Example of a template

This example sends the field name[tab]field value[LF][CR] for each fields in the template

<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="text" />
  <xsl:template match="/">
      <xsl:value-of select="/PurchaseReceipt/Company/Name/@Value" />
      <xsl:text>&#10;</xsl:text>
      <xsl:if test="/PurchaseReceipt/Company/VatRegNo/@Value != ''">
          <xsl:value-of select="/PurchaseReceipt/Company/VatRegNo/@Value" />
      <xsl:text>&#10;</xsl:text>
      </xsl:if>
      <xsl:value-of select="/PurchaseReceipt/Purchase/PurchaseDateLocal/@Value" />
      <xsl:text>&#10;</xsl:text>
        <xsl:if test="/PurchaseReceipt/Terminal/TerminalID/@Value != ''">
          <xsl:value-of select="/PurchaseReceipt/Terminal/TerminalID/@Value" />
      <xsl:text>&#10;</xsl:text>
      </xsl:if>
      <xsl:value-of select="/PurchaseReceipt/Purchase/PurchaseStateName/@Key" />
      <xsl:text>: </xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/PurchaseStateName/@Value" />
      <xsl:text>&#10;</xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/Amount/@Key" />
      <xsl:text>: </xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/Amount/@Value" />
      <xsl:text>&#10;</xsl:text>
      <xsl:text>&#10;</xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/OriginCountryState/@Key" />
      <xsl:text>: </xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/OriginCountryState/@Value" />
      <xsl:text>&#10;</xsl:text>
      <xsl:if test="/PurchaseReceipt/Purchase/VatAmount/@Value != ''">
          <xsl:value-of select="/PurchaseReceipt/Purchase/VatAmount/@Key" />
          <xsl:text>: </xsl:text>
          <xsl:value-of select="/PurchaseReceipt/Purchase/VatAmount/@Value" />
          <xsl:text>&#10;</xsl:text>
      </xsl:if>
      <xsl:value-of select="/PurchaseReceipt/Purchase/EndDateLocal/@Key" />
      <xsl:text>: </xsl:text>
      <xsl:value-of select="/PurchaseReceipt/Purchase/EndDateLocal/@Value" />
      <xsl:text>&#10;</xsl:text>
      <xsl:if test="/PurchaseReceipt/Purchase/Code/@Value != ''">
          <xsl:value-of select="/PurchaseReceipt/Purchase/Code/@Value" />
          <xsl:text>&#10;</xsl:text>
      </xsl:if>
  </xsl:template>
</xsl:stylesheet>