home

Browse documentation

ezyVet Knowledge Center

Get access to documentation, training, and other high-quality resources.

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 if statement.
  • Between the if tag and the else tag, put the text to show when the condition is true.
  • Between the else tag and the endif tag, put the text to show when the condition is not true.
Note: When you use the variable without an 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.HasPostalAddress is 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.
RecordThe 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 for loop.
  • Between the for tag and the endfor tag, put the text to show for each item.
  • After for, enter a name for each item in the list.
Note: Use the same name in the variables in the loop.

Example:

{% for pet in contact.Animals %}
{{ pet.Name }}: {{ pet.Age }}
{% endfor %}

In this example:

  • contact.Animals is the list of the patients of the client.
  • pet is the name for each item in the list.
  • pet.Name shows the name of each patient.
  • pet.Age shows 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.CreatedDate shows the date that a staff member made the contact record.
  • The dateformat filter shows the date in a format that is easy to read.

Variables

NameClassic 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:
  • All email addresses of the client
  • All fax numbers of the client
  • All landline phone numbers of the client
  • All mobile phone numbers of the client
{{ 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:
  • Mr
  • Mrs
  • Miss
  • Ms
  • Dr
  • Mx
{{ 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 }}NoShows the day of the month of the client's direct debit instruction.
{{ contact.EmailAddress }}NoShows 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 }}NoShows the distance that the client must travel to the veterinary practice.
{{ contact.CreatedDate }}NoShows the date that a staff member made the contact record.
Note: Use this variable with the dateformat Twig filter. Refer to Variables that show a date.
{{ contact.XeroNumber }}NoShows the Xero account code of the contact record.
{{ contact.SuppliedGstRate }}NoShows 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 }}NoShows the credit status of the client.
{{ contact.CreditStatusStringHtml }}NoShows the credit status of the client.
Note: This variable also shows the color of each credit status.
{{ contact.ContactMethod.Name }}NoShows the preferred contact method of the contact record.
{{ contact.Website }}NoShows the website of the contact record.
{{ contact.BusinessPhone }}NoShows the phone number of the business of the contact record.
{{ contact.FirstEmail }}NoShows the first email address of the contact record.
{{ contact.StaffMember }}NoShows the the staff member who made the contact record.
{{ contact.CompanyNumber }}{ContactPhoneNumber}Shows the phone number of the client.
{{ contact.BankAccountNumber }}NoShows the bank account number of the client.
{{ contact.PaymentReference }}NoShows the payment reference information for electronic payments of the client.
{{ contact.TaxNumber }}NoShows the tax number of the client.
{{ contact.AccountNumber }}{SupplierContactAccountCode}Shows the account code of the supplier account.
{{ contact.Country.Name }}NoShows the country of the client.
{{ contact.SatisfactionLevel }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoShows the method that ezyVet uses to charge interest in the Charge Late Fees/Interest report. The possible values are:
  • -1 (the report uses the default financial settings of the ezyVet site)
  • 1 (the report charges interest)
  • 0 (the report does not charge interest)
{{ contact.InterestRate }}NoShows the rate of the annual interest charged to the client. This variable shows the information as a percentage
{{ contact.TaxOverrideCode }}NoShows 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:
  • All email addresses of the client
  • All fax numbers of the client
  • All landline phone numbers of the client
  • All mobile phone numbers of the client
{{ contact.EmailPhonesList }}NoShows the email addresses and phone numbers of the client.
Note: The variable uses this format to show the data:
  • Name1: number or email
{{ 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 }}NoShows a list of the addresses of the contact record.
Note: Use this variable in a Twig for loop. For example:
{% for address in contact.Addresses %}
  {{ address.AddressText }}
{% endfor %}
In the loop, you can use all address variables. For more information, refer to Variables that show a list.
{{ contact.PostalAddressText }}NoShows the full postal address of the contact record in the address format of your region.
{{ contact.LabelAddress }}NoShows 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 }}NoTrue if the physical address of the contact record has street address information.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.HasPostalAddress }}NoTrue if the postal address of the contact record has street address information.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.PostalSameAsPhysical }}NoTrue if the postal address of the contact record is the same as the physical address.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.CanPost }}NoTrue if the contact record has a postal address.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.HasEmail }}NoTrue if the contact record has an email address.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.HasFaxNumber }}NoTrue if the contact record has a fax number.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.CanCall }}NoTrue if the contact record has a phone number.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.CanSms }}NoTrue if the contact record has a mobile number.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.CanSmsReminder }}NoTrue if the contact record has a Mobile contact method with Reminders/Automated Communication selected.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.SendingEmailEnabled }}NoTrue if the contact record has an Email contact method.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.SendingFaxEnabled }}NoTrue if the contact record has a Fax contact method.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.SendingLandlineEnabled }}NoTrue if the contact record has a Landline contact method.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.SendingMobileEnabled }}NoTrue if the contact record has a Mobile contact method.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.WorkPhoneNumber }}NoShows 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 }}NoShows a list of the contact methods of the contact record, for example email addresses, phone numbers and fax numbers.
Note: Use this variable in a Twig for loop. Refer to Variables that show a list.
{{ contact.Animals }}NoShows a list of the patients of the client.
Note: Use this variable in a Twig for loop. For example:
{% for pet in contact.Animals %}
  {{ pet.Name }}
{% endfor %}
In the loop, you can use all patient variables. For more information, refer to Variables that show a list.
{{ contact.Consults }}NoShows a list of the clinical records of the client.
Note: Use this variable in a Twig for loop. Refer to Variables that show a list.
{{ contact.NextAnimalVaccinationsAndTreatments }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoTrue 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.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.ChargeableInterestRate }}NoShows 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 }}NoShows 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 }}NoShows the total discount quantity of all invoices of the client.
{{ contact.InsuranceSupplier }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoShows 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 }}NoShows the supplier account record of your veterinary practice with the supplier.
Note: This variable is applicable to supplier contact records.
{{ contact.NoSpam }}NoTrue if No Electronic Marketing (Spam Act Opt Out) is selected.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.OnDirectDebit }}NoTrue if Direct Debit is selected.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsBusiness }}NoTrue if the Contact Type of the record is Business.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsIndividual }}NoTrue if the Contact Type of the record is Individual.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsCustomer }}NoTrue if the Contact Type of the record is Customer.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsSupplier }}NoTrue if the Contact Type of the record is Supplier.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsVet }}NoTrue if the Contact Type of the record is Vet.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsPharmacy }}NoTrue if the Contact Type of the record is Pharmacy.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsStaffMember }}NoTrue if Staff Member is selected for the contact record.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsSyndicate }}NoTrue if the Contact Type of the record is Syndicate.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsStopCredit }}NoTrue if the credit status of the contact record is STOP.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsNotesImportant }}NoTrue if Notes Important is selected.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.IsPriceBasedOnOuter }}NoTrue if the prices of the supplier are for each outer pack.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.ItemiseStatements }}NoTrue if the Use Detailed Statements setting of the contact record is Yes.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.GroupStatementsByAnimal }}NoTrue if the Group Statements By Patient setting of the contact record is Yes.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.AmalgamatePaymentsOnStatementsByDay }}NoTrue if the Amalgamate Payments on Statements By Day setting of the contact record is Yes.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.
{{ contact.HasRecurringInvoices }}NoTrue if the contact record has one or more recurring invoices that are not inactive.
Note: This variable includes approved and unapproved recurring invoices.
Note: Use this variable in a Twig if statement. Refer to Variables that check a condition.