On the Send Communication page, there is a toolbar button called "Insert Database Field". This help page describes the fields/commands that this button puts into your communication template.
When you click this button, you'll see a list that includes:
- All visible database fields for your site
- Special processing options. These are all prefixed with the value "Button" or "Special Logic".
When you select a field using this tool, and click OK, we'll insert a code into the text of your message at your current cursor position. Please be careful if you try to change how these codes are displayed -- if you change the formatting for part of the code, we may not be able to interpret the code properly, but you can always undo any formatting by highlighting the code and clicking the "Remove Formatting" button (the button has the letters Tx on it).
The codes are not case sensitive. You can type the codes directly into the template without using the "Insert Database Field" tool, if you are comfortable doing so.
Mail Merge Fields
Mail Merge Fields are in the format: #FieldName#
When the communication is generated, the code will be replaced with the value of the field from the database.
Standard Buttons
If you are sending an e-mail to someone, you can use any of the Button options to insert a button into the e-mail that the recipient can click to perform common functions in Online Mooring. The options are:
View Application - Clicking this button will bring the user to their application
Renew - Clicking this button will bring the user to their renewal application
Pay - Clicking this button will bring the user to PayPal to pay their remaining balance
Cancel - Clicking this button will cancel the application
Approve - Clicking this button will approve the application, and can only be used by people with rights to do so
Reject - Clicking this button will reject the application, and can only be used by people with rights to do so
BUTTON Command
You can create your own button, by inserting the following command:
{button text="Button Text" color="color" URL="http://www.google.com"}
For example, if you wanted a button that a boater could click to get to your ordinances, and wanted the color of the button to be blue, and the URL was http://www.provider.com/ordinances, you'd use the following command: {button text="Ordinances" color="blue" url="http://www.provider.com/ordinances"}
There are standard color names that are allowed for the color parameter, which are listed here
TEMPLATE Command
You can include templates inside of other templates, by using the command:
{template name="Template Name"}
We envision that this would normally be used to include standard headers and footers across multiple templates. You can create a header template, and then use this command to include that header in any messages where you want it to appear. If you called the header template "Header", then your command would be: {template name="Header"} and you'd put that command at the location in your template where you want the header to appear.
ABBREVIATION Command
You can send out shortened versions of database fields, using the abbreviation command.
{abbreviation name="text" length="number" overflow="text"}
For example, if you wanted to display the first three characters of the MooringLocation field, you would do the following:
{abbreviation name="#MooringLocation#" length="3"}
If you wanted to display the first 20 characters of the OwnerName field, and display a "..." at the end if the text is longer than that, you would do the following:
{abbreviation name="#OwnerName#" length="20" overflow=",,,"}
IF Command
You can put text into your communication when a condition that you define is true, by using the command:
{if value1="#FieldName#" op="=" value2="value"}Text to put into your communication{end-if}
The op parameter can have one of the following values:
- =, use this when you want to insert text if the two values are equal
- <>, use this when you want to insert text if the two values are not equal
- <=, use this when you want to insert text if value1 is less than or equal to value2
- >=, use this when you want to insert text if value1 is greater than or equal to value2
- <, use this when you want to insert text if value1 is less than value2
- >, use this when you want to insert text if value1 is greater than value2
- blank, use this when you want to insert text if value1 is blank
- not blank, use this when you want to insert text if value1 is not blank
For example, you might want to include a button if you are sending an e-mail, but show other text if you are sending a letter. To do that, use the following commands:
{if value1="#CommunicationType#" op="=" value2="Email"}#RenewLink#{end-if}
{if value1="#CommunicationType#" op="=" value2="Letter"}Enter access code #guid#{end-if}
SECTION Command
If you have a part of your template that you'd like to repeat multiple times, or a part of your template that should only be sent once to each person, use this command:
{section for="tablename" type="typevalue" status="statusvalue" date="datevalue"}
Text to repeat
{end-section}
The valid values for the "for" parameter are:
- person - Use this section if you want each person to get one communication, even if they have multiple applications/actions/etc. Put the text into this section that should only appear once for each person.
- application - Use this section to repeat information once for each application
- action - Use this section to repeat information once for each action. This should be placed inside of an application section.
- attachment - Use this section to repeat information once for each attachment. This should be placed inside of an application section.
- waitlist - Use this section to repeat information once for each wait list that the person is on. This should be placed inside of an application section.
- payment - Use this section to repeat information once for each payment made by the applicant. This should be placed inside of an application section.
The type parameter can be used to limit which records are displayed in the communication. The meaning of the "type" parameter depends on the value in the "for" parameter, as shown in the table below. For example, if a boater had both a mooring permits and a transient applications, you could specify type="Mooring Permit" and the section would only be generated once for each Mooring Permit application.
The status parameter can be used to limit which records are displayed in the communication. The valid values for the "status" parameter depend on the value in the "for" parameter, as shown in the table below. For example, if a boater had both an approved permit and an expired permit, you could use status="Approved" to only display information for the approved permit.
The date parameter can be used to limit which records are displayed in the communication. This will look at the date field listed in the table below, to see whether it meets your conditions. The valid comparisons are:
- today - this will display information for the specified record if the date is today. For example, if you want to display information for an action that just occurred, and not the historical actions, you could use date="today".
- expired - this can be used only on the attachment section. If you use this, the section will display only if there are no current attachments (of the specified type), and you cannot use any of the mail merge tags associated with an attachment inside this section.
- this-month - this will display information for the specified record if the date occurred this month
- this-year - this will display information for the specified record if the date occurred this year
for |
type |
status |
date |
person |
N/A |
N/A |
N/A |
application |
application type |
application status |
N/A |
action |
action type |
N/A |
action date |
attachment |
attachment type |
N/A |
expiration date |
waitlist |
wait list name |
N/A |
wait list date |
payment |
payment type |
N/A |
payment date
|
flag |
flag type |
N/A |
last update date |
activity |
activity type |
N/A |
start date |
communication |
communication type |
N/A |
send date |
TABLE and COLUMN Commands
If you would like to display information in your communication so that it looks like a spreadsheet, use the following commands:
{table for="tablename" type="typevalue" status="statusvalue" date="datevalue"}
{column header="Header Text" value="Value Text" footer="Footer Text"}
{column header="Header Text2" value="Value Text2" footer="Footer Text2"}
{end-table}
All of the parameters for the SECTION command apply to the TABLE command as well.
Each database record that satisfies your filter conditions will generate a row in your table. Each COLUMN command that you use will generate a column in your table. You can use as many columns as you like.
The HEADER parameter for the COLUMN command lets you control what the header row will say for that column. You can put any text that you'd like, and even put a mail merge tag in that parameter. For example, to display "Mooring Number" in the header of a column, use the parameter header="Mooring Number".
The VALUE parameter for the COLUMN command lets you specify what will be displayed in the column on each data row. Typically, you'd put a mail merge tag in that parameter. For example, to display the actual mooring number, you'd use the parameter value="#MooringName#". You can even put buttons in the parameter.
The FOOTER parameter for the COLUMN column is optional and lets you control what will appear at the bottom of the table in that column. You can put any text that you'd like, and even put a mail merge tag in that parameter. If you'd like to display a total of all the values in that column, specify a value of #sum# (so, footer="#sum#")