Twig template variables: Contact records
The contact record variables show data of a contact record (for example, the name, the contact methods, the addresses and the patients). Each variable starts with contact.
The contact variables also work for department, business and clientContact. The contact variables also work after a variable that gives a contact, for example invoice.ClientContact or animal.ResidingContact.
Variables that check a condition
Some of these variables show if a condition is true. For example, contact.HasPostalAddress is true if the postal address of the contact record has a street line.
To use a variable of this type:
- Put the variable in a Twig
ifstatement. - Between the
iftag and theelsetag, put the text to show when the condition is true. - Between the
elsetag and theendiftag, put the text to show when the condition is not true.
if statement, the variable shows 1 when the condition is true. When the condition is not true, the variable shows no value.Example:
Consent to send documents by post
I, {{ contact.FirstName }} {{ contact.LastName }}, give consent for Callisto Vets to send my invoices and statements by post to:
{% if contact.HasPostalAddress %}
{{ contact.PostalAddressText }}
{% else %}
______________________________
{% endif %}
Signature: ______________________________
Date: ______________________________In this example:
- The template is a consent letter that the client signs at the veterinary practice.
contact.HasPostalAddressis true if the postal address of the contact record has a street line.- When the condition is true, the letter shows the postal address of the client.
- When the condition is not true, the letter shows a blank line. The client writes the postal address on the printed letter.
| Record | The document shows |
|---|---|
| Miss Kochanski, Kristine (200021). The postal address has a street line. The condition is true. | Consent to send documents by post I, Kristine Kochanski, give consent for Callisto Vets to send my invoices and statements by post to: 3000 Internet Blvd Ste 200 Frisco TX 75034 United States Signature: ______________________________ Date: ______________________________ |
| Mr Riker, Will (200019). The postal address has only a country. The condition is not true. | Consent to send documents by post I, Will Riker, give consent for Callisto Vets to send my invoices and statements by post to: ______________________________ Signature: ______________________________ Date: ______________________________ |
Variables that show a list
Some of these variables show a list. For example, contact.Animals shows a list of the patients of the client.
To use a variable of this type:
- Put the variable in a Twig
forloop. - Between the
fortag and theendfortag, put the text to show for each item. - After
for, enter a name for each item in the list.
Example:
{% for pet in contact.Animals %}
{{ pet.Name }}: {{ pet.Age }}
{% endfor %}In this example:
contact.Animalsis the list of the patients of the client.petis the name for each item in the list.pet.Nameshows the name of each patient.pet.Ageshows the age of each patient.- The document shows the text between the tags one time for each item in the list.
Variables that show a date
Some of these variables show a date. To show the date in a format that is easy to read, use the dateformat Twig filter. The Function column of each variable of this type has a note about the dateformat filter.
After the variable name, enter a vertical bar and dateformat.
Example:
{{ contact.CreatedDate|dateformat }}In this example:
contact.CreatedDateshows the date that a staff member made the contact record.- The
dateformatfilter shows the date in a format that is easy to read.
Variables
| Name | Classic template system equivalent? | Function |
|---|---|---|
{{ contact.ContactNotes }} | {ContactNotes} | Shows the notes of the client. |
{{ contact.TemplateVarAllFaxes }} | {ClientContactAllFaxes} | Shows all fax numbers of the client. |
{{ contact.TemplateVarAllContactMethods }} | {ClientContactAllContactMethods} | Shows:
|
{{ contact.DateOfBirth }} | {ContactDOB} | Shows the full date of birth of the person of the contact record. |
{{ contact.TitleName }} | {ClientContactTitle} | Shows the title of the client. The possible values are:
|
{{ contact.FirstName }} | {ContactFirst} | Shows the first name of the client. |
{{ contact.LastName }} | {ContactLast} | Shows the last name of the client. |
{{ contact.ClientName }} | {ClientContactName} | Shows the name of the client. |
{{ contact.DdDay }} | No | Shows the day of the month of the client's direct debit instruction. |
{{ contact.EmailAddress }} | No | Shows the first email address of the person or business of the contact record. |
{{ contact.ReminderEmail }} | {ContactRemindersEmails} | Shows the email address selected as the preferred method to send reminders to the client. |
{{ contact.AlternateName }} | {ContactSecondaryName} | Shows the name of the Secondary Contact box of the contact record. Note: This variable shows the first name then the last name. |
{{ contact.NameInformal }} | {ContactNameInformal} | Shows the name of the client. Note: This variable shows the first name then the last name. |
{{ contact.Distance }} | No | Shows the distance that the client must travel to the veterinary practice. |
{{ contact.CreatedDate }} | No | Shows the date that a staff member made the contact record. |
{{ contact.XeroNumber }} | No | Shows the Xero account code of the contact record. |
{{ contact.SuppliedGstRate }} | No | Shows the GST rate of the contact record. Note: If the contact record does not have a configured GST rate, this variable shows the default GST rate of your ezyVet site. |
{{ contact.BusinessName }} | {ContactBusinessName} | Shows the name of the business of the contact record. |
{{ contact.CreditStatus }} | No | Shows the credit status of the client. |
{{ contact.CreditStatusStringHtml }} | No | Shows the credit status of the client. Note: This variable also shows the color of each credit status. |
{{ contact.ContactMethod.Name }} | No | Shows the preferred contact method of the contact record. |
{{ contact.Website }} | No | Shows the website of the contact record. |
{{ contact.BusinessPhone }} | No | Shows the phone number of the business of the contact record. |
{{ contact.FirstEmail }} | No | Shows the first email address of the contact record. |
{{ contact.StaffMember }} | No | Shows the the staff member who made the contact record. |
{{ contact.CompanyNumber }} | {ContactPhoneNumber} | Shows the phone number of the client. |
{{ contact.BankAccountNumber }} | No | Shows the bank account number of the client. |
{{ contact.PaymentReference }} | No | Shows the payment reference information for electronic payments of the client. |
{{ contact.TaxNumber }} | No | Shows the tax number of the client. |
{{ contact.AccountNumber }} | {SupplierContactAccountCode} | Shows the account code of the supplier account. |
{{ contact.Country.Name }} | No | Shows the country of the client. |
{{ contact.SatisfactionLevel }} | No | Shows the customer satisfaction value of the client. Note: The range of possible values shown by this variable is 0 to 10. A value of 10 is the best possible customer satisfaction. |
{{ contact.SatisfactionNote }} | No | Shows the content of the Notes box of the Customer Satisfaction section of the contact record. |
{{ contact.AlternateFirstName }} | {ContactSecondaryFirst} | Shows the first name of the Secondary Contact box of the contact record. |
{{ contact.AlternateLastName }} | {ContactSecondaryLast} | Shows the last name of the Secondary Contact box of the contact record. |
{{ contact.AlternateTitleText }} | No | Shows the Title set in the Secondary Contact of the contact record. |
{{ contact.AlternateNameInformal }} | {ContactSecondaryNameInformal} | Shows the Secondary Contact name of the contact record. Note: This variable shows the first name then the last name. |
{{ contact.ContactName }} | {ClientContactName} | Shows the name of the client. Note: If the contact type is set to Business, the variable shows the name of the business. If the contact type is set to Individual, the variable shows the name of the person. |
{{ contact.ChargedInterest }} | No | Shows the method that ezyVet uses to charge interest in the Charge Late Fees/Interest report. The possible values are:
|
{{ contact.InterestRate }} | No | Shows the rate of the annual interest charged to the client. This variable shows the information as a percentage |
{{ contact.TaxOverrideCode }} | No | Shows the tax code of the client. |
{{ contact.TemplateVarGeneralLandlines }} | {ContactGeneralLandlines} | Shows the landline phone number selected as the preferred method to send general information to the client. |
{{ contact.TemplateVarGeneralMobiles }} | {ContactGeneralMobiles} | Shows the mobile phone number selected as the preferred method to send general information to the client. |
{{ contact.TemplateVarGeneralEmails }} | {ContactGeneralEmails} | Shows the email address selected as the preferred method to send general information to the client. |
{{ contact.TemplateVarGeneralFaxes }} | {ContactGeneralFaxes} | Shows the fax number selected as the preferred method to send general information to the client. |
{{ contact.TemplateVarAllLandlines }} | {ContactAllLandlines} | Shows all landline phone numbers of the client. |
{{ contact.TemplateVarAllMobiles }} | {ContactAllMobiles} | Shows all mobile phone numbers of the client. |
{{ contact.TemplateVarAllEmails }} | {ContactAllEmails} | Shows all email addresses of the client. |
{{ contact.TemplateVarAllFaxes }} | {ContactAllFaxes} | Shows all fax numbers of the client. |
{{ contact.TemplateVarAllContactMethods }} | {ContactAllContactMethods} | Shows:
|
{{ contact.EmailPhonesList }} | No | Shows the email addresses and phone numbers of the client. Note: The variable uses this format to show the data:
|
{{ clientContact.AllContacts }} | {ContactCode} | Shows the name of the contact record and its Secondary Contact name. Note: The template variable shows & between the two names. Note: If the contact record does not have a Secondary Contact name, the template variable shows the name of the contact record only. |
{{ contact.Addresses }} | No | Shows a list of the addresses of the contact record. Note: Use this variable in a Twig for loop. For example:In the loop, you can use all address variables. For more information, refer to Variables that show a list. |
{{ contact.PostalAddressText }} | No | Shows the full postal address of the contact record in the address format of your region. |
{{ contact.LabelAddress }} | No | Shows the first street line, second street line, suburb and city of the physical address of the contact record, for address labels. Tip: To show the values with a comma between each value, enter {{ contact.LabelAddress|join(", ") }}. |
{{ contact.HasPhysicalAddress }} | No | True if the physical address of the contact record has street address information. |
{{ contact.HasPostalAddress }} | No | True if the postal address of the contact record has street address information. |
{{ contact.PostalSameAsPhysical }} | No | True if the postal address of the contact record is the same as the physical address. |
{{ contact.CanPost }} | No | True if the contact record has a postal address. |
{{ contact.HasEmail }} | No | True if the contact record has an email address. |
{{ contact.HasFaxNumber }} | No | True if the contact record has a fax number. |
{{ contact.CanCall }} | No | True if the contact record has a phone number. |
{{ contact.CanSms }} | No | True if the contact record has a mobile number. |
{{ contact.CanSmsReminder }} | No | True if the contact record has a Mobile contact method with Reminders/Automated Communication selected. |
{{ contact.SendingEmailEnabled }} | No | True if the contact record has an Email contact method. |
{{ contact.SendingFaxEnabled }} | No | True if the contact record has a Fax contact method. |
{{ contact.SendingLandlineEnabled }} | No | True if the contact record has a Landline contact method. |
{{ contact.SendingMobileEnabled }} | No | True if the contact record has a Mobile contact method. |
{{ contact.WorkPhoneNumber }} | No | Shows the landline phone number of the contact record. Note: At this time, this variable shows the same value as the home phone number. |
{{ contact.AllEmailPhones }} | No | Shows a list of the contact methods of the contact record, for example email addresses, phone numbers and fax numbers. |
{{ contact.Animals }} | No | Shows a list of the patients of the client. Note: Use this variable in a Twig for loop. For example:In the loop, you can use all patient variables. For more information, refer to Variables that show a list. |
{{ contact.Consults }} | No | Shows a list of the clinical records of the client. |
{{ contact.NextAnimalVaccinationsAndTreatments }} | No | Shows a list of the patients of the client that are not deceased, with the name and the next vaccinations and treatments of each patient. Note: This variable shows structured data. Speak to your ezyVet support team for help with this variable. |
{{ contact.BillingContact }} | No | Shows the contact record of the billing contact of the client. Note: If the client does not have a billing contact, this variable shows no value. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.BillingContact.Name }}. |
{{ contact.ContactToBill }} | No | Shows the contact record that ezyVet invoices for the client. Note: If the client does not have a billing contact, this variable shows the contact record of the client. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.ContactToBill.Name }}. |
{{ contact.PaymentTerms }} | No | Shows the payment terms record of the client. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.PaymentTerms.Name }}. |
{{ contact.AbsolutePaymentTerms }} | No | Shows the payment terms record that ezyVet uses for the client. Note: If the client does not have payment terms, this variable shows the payment terms that are configured for your ezyVet site. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.AbsolutePaymentTerms.Name }}. |
{{ contact.IsChargedInterest }} | No | True if ezyVet charges interest to the client for an overdue account. Note: If Charge Interest in the contact record is set to Default, this variable uses the Charge Interest setting of your ezyVet site. |
{{ contact.ChargeableInterestRate }} | No | Shows the interest rate for the overdue balance of the client. Note: If Interest Rate (%p.a) in the contact record is set to Default, this variable shows the interest rate of your ezyVet site. Tip: This variable shows the interest rate with four decimals. To show the interest rate with two decimals, enter {{ contact.ChargeableInterestRate|number_format(2) }}. |
{{ contact.PenaltyChargeProduct }} | No | Shows the record of the product that ezyVet uses to charge interest or late fees to the client. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.PenaltyChargeProduct.Name }}. |
{{ contact.TotalDiscount }} | No | Shows the total discount quantity of all invoices of the client. |
{{ contact.InsuranceSupplier }} | No | Shows the contact record of the insurance supplier of the client. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.InsuranceSupplier.Name }}. |
{{ contact.VetClinic }} | No | Shows the contact record of the regular veterinary clinic of the contact record. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.VetClinic.Name }}. |
{{ contact.VetContact }} | No | Shows the contact record of the regular veterinarian of the contact record. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.VetContact.Name }}. |
{{ contact.SalesPerson }} | No | Shows the record of the staff member who is the sales person of the client. Tip: To show more information about the record, add one more variable after this variable, for example {{ contact.SalesPerson.Name }}. |
{{ contact.DefaultSupplierAccount }} | No | Shows the supplier account record of your veterinary practice with the supplier. Note: This variable is applicable to supplier contact records. |
{{ contact.NoSpam }} | No | True if No Electronic Marketing (Spam Act Opt Out) is selected. |
{{ contact.OnDirectDebit }} | No | True if Direct Debit is selected. |
{{ contact.IsBusiness }} | No | True if the Contact Type of the record is Business. |
{{ contact.IsIndividual }} | No | True if the Contact Type of the record is Individual. |
{{ contact.IsCustomer }} | No | True if the Contact Type of the record is Customer. |
{{ contact.IsSupplier }} | No | True if the Contact Type of the record is Supplier. |
{{ contact.IsVet }} | No | True if the Contact Type of the record is Vet. |
{{ contact.IsPharmacy }} | No | True if the Contact Type of the record is Pharmacy. |
{{ contact.IsStaffMember }} | No | True if Staff Member is selected for the contact record. |
{{ contact.IsSyndicate }} | No | True if the Contact Type of the record is Syndicate. |
{{ contact.IsStopCredit }} | No | True if the credit status of the contact record is STOP. |
{{ contact.IsNotesImportant }} | No | True if Notes Important is selected. |
{{ contact.IsPriceBasedOnOuter }} | No | True if the prices of the supplier are for each outer pack. |
{{ contact.ItemiseStatements }} | No | True if the Use Detailed Statements setting of the contact record is Yes. |
{{ contact.GroupStatementsByAnimal }} | No | True if the Group Statements By Patient setting of the contact record is Yes. |
{{ contact.AmalgamatePaymentsOnStatementsByDay }} | No | True if the Amalgamate Payments on Statements By Day setting of the contact record is Yes. |
{{ contact.HasRecurringInvoices }} | No | True if the contact record has one or more recurring invoices that are not inactive. Note: This variable includes approved and unapproved recurring invoices. |