Skip to main content

Display Tags with Dates in Email Templates

Display the exact date a specific tag was added to a record using smart fields in templates.

Kolleno Support avatar
Written by Kolleno Support
Updated this week

The tag_added_date smart field allows you to retrieve and display the date when a specific tag was added to a record such as a customer, invoice, or credit note. This is commonly used in email templates, reminders, and documents where timing and context matter.


Syntax

Use the following syntax inside your template:

{% tag_added_date <record> "<tag_name>" "<record_type>" as <variable_name> %}

Parameters

Parameter

Description

Required

record

The record to check, such as customer or invoice

Yes

tag_name

The exact name of the tag

Yes

record_type

Record type like "customer", "invoice", or "credit_note"

Yes

variable_name

Variable used later in the template

Yes


Supported Record Types

Key

Description

customer

Customer records

customer_group

Customer group records

invoice

Invoice records

credit_note

Credit note records

kolleno_payment

Payment records

account_transaction

Bank transaction records

email_received

Received email records

email_sent

Sent email records


Examples

Example 1: Show when a customer became a VIP

{% tag_added_date customer "VIP" "customer" as vip_tag %} 
{% if vip_tag %}
Congratulations! You've been a VIP customer since {{ vip_tag | date:"F d, Y" }}.
{% endif %}

Output
​


Example 2: Check if an invoice is marked as urgent

{% tag_added_date invoice "Urgent" "invoice" as urgent_date %}
{% if urgent_date %}
This invoice was marked as urgent on {{ urgent_date | date:"M d, Y" }}.
{% else %}
This invoice has standard priority.
{% endif %}

Output:


Example 3: Display a customer membership start date

{% tag_added_date customer "Premium Member" "customer" as membership_date %} 
{% if membership_date %} Your Premium Membership started on {{ membership_date | date:"d/m/Y" }}.
{% endif %}

Output:


Date Formatting

To format dates correctly, refer to the article on current date and time smart fields in the Smart Fields collection.

For more information on managing your smart fields, please refer to the rest of the articles in the Smart Fields Help Centre collection.

Did this answer your question?