Create, customize, and manage notification templates in X Dairy Automate
Step 1: Access Notification Templates #
Log in to your admin panel
Go to Configuration → Notification Templates
Or open directly: /notification-templates
Step 2: Create a New Template #
Click Add New Template
Complete the fields in the form
Step 3: Template Details #
Basic Information #
Field Description Required Example Code Unique identifier (used programmatically) ✅ vaccination_dueName Template display name ✅ Vaccination Due ReminderType Notification category ✅ Health, Reproduction, etc. Priority Urgency level ❌ Low, Normal, High, Critical Icon FontAwesome icon class ❌ fa-syringe, fa-bell
Template Types #
Type Used For Health Vaccinations, treatments, medical alerts Reproduction Breeding, pregnancy, calving Milk Collection, yield, quality issues Financial Payments, invoices, expenses System Logins, backups, system updates Reminder General reminders & tasks
Step 4: Write Notification Content #
Title Template #
Keep it short and attention-grabbing:
Vaccination Due: {animal_name}
Body Template #
Provide clear details:
Animal {animal_name} (ID: {animal_id}) is due for {vaccine_name} vaccination on {due_date}.
Step 5: Using Variables #
Variables allow templates to display dynamic data. Use the format: {variable_name}
Common Variables (All Types) #
Variable Description {user_name}Logged-in user’s name {date}Current date {time}Current time {branch_name}Farm/branch name
Health Variables #
Variable Description {animal_id}Animal ID {animal_name}Animal name {animal_tag}Tag number {vaccine_name}Vaccine name {due_date}Vaccination due date {treatment_name}Treatment name {veterinarian}Veterinarian name
Reproduction Variables #
Variable Description {expected_calving_date}Expected calving date {days_remaining}Days until calving {pregnancy_stage}Pregnancy stage {insemination_date}Insemination (AI) date {bull_name}Bull/sire name
Milk Variables #
Variable Description {milk_quantity}Actual quantity {expected_quantity}Expected quantity {collection_date}Collection date {quality_issue}Quality issue description
Financial Variables #
Variable Description {customer_name}Customer name {supplier_name}Supplier name {amount_due}Amount due {invoice_number}Invoice number {payment_link}Payment link
Step 6: Email Content (Optional) #
If your email needs different content than the notification:
Field Description Email Subject Subject line Email Body HTML or plain-text content
💡 Leave blank to automatically use the notification title and body.
Step 7: Configure Delivery #
Option Function ✅ Active Enable or disable the template ✅ Send In-App Notification Show inside notification bell ✅ Send Email Notification Deliver via email
Step 8: Preview & Test #
Preview #
Click 👁 Preview on the template list
Review how the notification will appear with sample data
Test Email #
Open the template edit page
Enter a test email address
Click Send Test Email
Template Examples #
Vaccination Reminder #
Code: vaccination_due
Type: Health
Title: 🔔 Vaccination Due: {animal_name}
Body: Animal {animal_name} ({animal_tag}) needs {vaccine_name} vaccination by {due_date}.
Please schedule with {veterinarian}.
Calving Alert #
Code: calving_approaching
Type: Reproduction
Title: 🐄 Calving Soon: {animal_name}
Body: {animal_name} is expected to calve in {days_remaining} days ({expected_calving_date}).
Prepare the calving area.
Payment Due #
Code: payment_reminder
Type: Financial
Title: 💰 Payment Due from {customer_name}
Body: Invoice {invoice_number} for {amount_due} is due on {due_date}.
Leave a Reply
You must be logged in to post a comment.