Administration - Email: Templates - Email Syntax

Administration - Email: Templates - Email Syntax

Email Syntax Overview

Email syntax allows you to dynamically include details about the recipient, sender or an attached entity in the email you are sending in XPLAN. Using syntax’s, you can produce custom emails from templates that contain client and user data, making each email personalized to each individual without the need to edit each email. When a report is generated, the Xmerge syntax is used to identify and insert data.

Email syntax can be used when sending an email or creating an email template.

 

Inserting email syntax

Syntax can be manually entered into the body of an email, or by using the X button in the email editor.

Screen_Shot_2018-11-21_at_12.35.31_PM.png

Once within the Syntax editor, you will have 3 main options to help find the particular field you would like to have dynamically entered.

  1. From/To – XPLAN’s email syntax allows you to prepopulate values with either the recipient name or the email sender’s name.

  2. Categories – similar fields are grouped into categories in XPLAN to assist with searching. In this drop down menu, you can choose from a list of groups that provide a way to limit the results that flow through to the ‘Properties’ dropdown menu.

  3. Properties – the ‘Properties’ dropdown menu is where you can select the field you want to have dynamically entered into the email you are sending in XPLAN.

    Screen_Shot_2018-11-21_at_12.35.39_PM.png

 

Manually Insert Email Syntax

While composing an email or email template, type the syntax in the body of the email. Depending on which entity you want to merge details about, the following syntax is used:

  • Recipient - $recipient

  • Sender - $sender

  • Attached entity - $attached_client

  • An entity (client, supplier, professional adviser or referrer) must be attached to the email before using this syntax.

Within the syntax editor, you have different options to insert the desired output:

  1. In the ‘From/To’ list, select the entity who you want to insert details about. You can select the recipient, the attached client or the sender.

  2. In the ‘Categories’ list, select the category of detail you want to insert.

  3. In the ‘Properties’ list, select the specific detail you want to insert.

 

Testing the Syntax

Before you send an email, you can click ‘Preview’ to see a preview of the email, including the merged details from the email syntax.

When creating or editing an email template, you can click ‘Syntax Check’ to view an example email output using the email syntax. When you do a Syntax Check you keep a lookout for the word “Error” as this indicates that the syntax coding has a problem.

 

This can be used as a way of checking that the coding will work.

  1. Click on the Syntax Check button and a pop up screen will appear. Ensure there are no coding errors. Not will be notified of coding errors in the template with the wording: Content Error.

  2. Close the pop up screen.

 

Email Syntax Examples

Below are different types of Email coding syntax examples that you may want to use when creating a template.

 

Date and Time

<:=datetime_merge:> e.g. 05 June 2013 01:24:23 PM

<:=datetime_merge.date:> e.g. 05 June 2013

<:=datetime_merge.time:> (12 hour time) e.g. 02:24:21 PM

<:=datetime_merge.time24:> (24 hour time) e.g. 15:24:24

 

Recipient Contact Details

Home Phone

<:for item in $recipient.contact:>

<:if str(item.type)=='Home Phone':>

<:=item.value:>

<:end:>

<:end:>

 

Work Phone

<:for item in $recipient.contact:>

<:if str(item.type)=='Work Phone':>

<:=item.value:>

<:end:>

<:end:>

 

Postal Address

<:for item in $recipient.address:>

<:if str(item.type)=='Postal':>

<:=item.street:>

<:=item.suburb:> <:=item.state:> <:=item.postcode:>

<:end:>

<:end:>

 

Preferred Email

<:=$recipient.preferred_email:>

 

Residential Address

<:for item in $recipient.address:>

<:if str(item.type)=='Residential':>

<:=item.street:>

<:=item.suburb:> <:=item.state:> <:=item.postcode:>

<:end:>

<:end:>

 

Recipient and partner name

<:=$recipient.preferred_name:>

<:if $recipient.has_partner:> and <:=$recipient.partner.preferred_name:>

<:end:>

 

Recipient and partner, superfund, company or trust name

<:let has = False:><:if $recipent.first_name:><:=$recipient.first_name:>

<:if $recipient.has_partner:> and <:=$recipient.partner.preferred_name:><:let has = True:>

<:end:>

<:end:>

<:if not has:><:=$recipient.superfund_name:><:=$recipient.company_name:>

<:=$recipient.trust_name:>

<:end:>

 

Attached client's opt-in status

<:=$attached_client.opt_in_status:>

 

Sender details

<:=$sender.first_name:> <:=$sender.last_name:> <:=$sender.jobtitle:>

<:=$sender.employer:>

 

Adviser details

Advisers name

<:=$recipient.adviser.first_name:> <:=$recipient.adviser.last_name:>

 

Employer

<:=$recipient.adviser.employer:>

 

Job Title

<:=$recipient.adviser.jobtitle:>

 

Contact Email

<:=$recipient.adviser.preferred_email:>

 

Contact Work Phone

<:for item in $recipient.adviser.contact:> <:if item.type=='Work Phone':><:=item.value:

<:end:>

<:end:>

 

Contact Mobile Phone

<:for item in $recipient.adviser.contact:><:if item.type=='Mobile Phone':><:=item.value:>

<:end:>

<:end:>