Use this article as a reference point when creating email templates and you want to insert computed values for personalized messages. 

These values can be used in the subject and the body of the email. These placeholders will be replaced by the respective values when the email is generated and sent to the recipient. 

Company

These values relate to your company, as set up in the Company Options.

  • {{company.address_block}}   =   Complete physical address in block format
  • {{company.address_line}}   =   Complete physical address in one continuous line
  • {{company.email}}   =   Email address 
  • {{company.logo}}   =   Logo image 
  • {{company. name}}   =   Company name
  • {{company.phone}}   =   Company phone number
  • {{company.portal_tagline}}   =   This tagline is set up in the Portal Options 
  • {{company.portal_url}}   =   This is your unique Customer Portal URL

Customer

These values relate to your customer records in the database.

  • {{customer.address_block}}   =   Complete physical address in block format
  • {{customer.address_line}}   =   Complete physical address in one continuous line
  • {{customer.device_count}}   =   This will display the total number of devices that have been added to a notification batch for a specific customer

customer.devices   =   This is a list of all devices for a specific customer that have been added to a notification batch. It needs to be used like in the example below:

     {% for device in customer.devices %}
     Device Serial Number: {{device.serial}}
     Device Location: {{device.location}}
     Last Tested Date: {{device.last_tested_at}}
   
 {% endfor %}

  • {{customer.email}}   =   Email address
  • {{customer.name}}   =   Full name
  • {{customer.phone}}   =   Phone number 1
  • {{customer.phone2}}   =   Phone number 2
  • {{customer.portal_login_email}}   =   Customer's email address used for logging into the portal

customer.portal_user?   =   True or false value representing whether or not the customer is enrolled in the portal. It is often used like the following example.

     
{% if customer.portal_user? == true %}
      You can login to the portal using {{customer.portal_login_email}}
     
{% endif %}

customer.test_yearly?   =   True or false value representing if the customer is marked as test yearly for auto testing.

      {% if customer.test_yearly? == true %}
      You are set up for our auto-test program each year.
     
{% endif %}

customer.tests   =   This is a list of all tests for the specific devices that have been added to a notification batch. It needs to be used like in the following example.

     {% for test in customer.tests %}
     Commit Date: {{test.commit_date}}
     Price:
{{test.price}}
   
 {% customer.tests %}

Device

These values relate to the customer's device records in the database. 

  • {{device.address_block}}   =   Complete physical address in block format
  • {{device.address_line}}   =   Complete physical address in one continuous line
  • {{device.last_test_price}}   =   Price of the last test performed for that device; it will be blank if it has not been tested previously
  • {{device.last_tested_at}}   =   Date the device was last tested; it will be blank if there is no last tested date in the system
  • {{device.location}}   =   Device Location field, not the address 
  • {{device.make}}   =   Manufacturer of the device
  • {{device.model}}   =   Model of the device

device.requires_appointment?   =   This is a True or False value stating whether or not  the device requires an appointment. An example of how to use this is:

      {% if device.requires_appointment? == true %}
      One of more of your devices require an appointment, please contact us.
     
{% endif %}

  • {{device.serial}}   =   Serial number of the device
  • {{device.size}}   =   Size of the device
  • {{device.type}}   =   Device type
  • {{device.testing_frequency}}   =   Testing Frequency, such as annually
  • {{device.water_purveyor_name}}   =   Name of the water purveyor set on the device

device.tests   =   This can be used to loop through the tests for a device.

      {% for test in device.tests %}
      Commit Date: {{test.commit_date}}
      Price:
{{test.price}}
     
{% device.tests %}

Test

These values relate to a past or present test for a device. 

  • {{test.commit_date}}   =   Commit date set for the test
  • {{test.price}}   =   Price set for the test
  • {{test.status}}   =   Status of the test. For example: Submitted, Pending Test, etc.
  • {{test.submitted_at}}   =   Date the test was submitted to the water purveyor
  • {{test.tested_at}}   =   Date the test was performed
  • {{test.tester_name}}   =   Name of the person who performed the test
Did this answer your question?