View Categories

Notification Templates Guide – X Dairy

1 min read

Create, customize, and manage notification templates in X Dairy Automate


Step 1: Access Notification Templates #

  1. Log in to your admin panel
  2. Go to Configuration → Notification Templates
  3. Or open directly: /notification-templates

Step 2: Create a New Template #

  1. Click Add New Template
  2. Complete the fields in the form

Step 3: Template Details #

Basic Information #

FieldDescriptionRequiredExample
CodeUnique identifier (used programmatically)vaccination_due
NameTemplate display nameVaccination Due Reminder
TypeNotification categoryHealth, Reproduction, etc.
PriorityUrgency levelLow, Normal, High, Critical
IconFontAwesome icon classfa-syringe, fa-bell

Template Types #

TypeUsed For
HealthVaccinations, treatments, medical alerts
ReproductionBreeding, pregnancy, calving
MilkCollection, yield, quality issues
FinancialPayments, invoices, expenses
SystemLogins, backups, system updates
ReminderGeneral 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) #

VariableDescription
{user_name}Logged-in user’s name
{date}Current date
{time}Current time
{branch_name}Farm/branch name

Health Variables #

VariableDescription
{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 #

VariableDescription
{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 #

VariableDescription
{milk_quantity}Actual quantity
{expected_quantity}Expected quantity
{collection_date}Collection date
{quality_issue}Quality issue description

Financial Variables #

VariableDescription
{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:

FieldDescription
Email SubjectSubject line
Email BodyHTML or plain-text content

💡 Leave blank to automatically use the notification title and body.


Step 7: Configure Delivery #

OptionFunction
ActiveEnable or disable the template
Send In-App NotificationShow inside notification bell
Send Email NotificationDeliver via email

Step 8: Preview & Test #

Preview #

  1. Click 👁 Preview on the template list
  2. Review how the notification will appear with sample data

Test Email #

  1. Open the template edit page
  2. Enter a test email address
  3. 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}.

Powered by BetterDocs

Leave a Reply

Need help? Call our best support team at (+92 3063403387

From nothing to everything, we believe in making.

Copyright © 2022 - 2025 CodeX Link Limited. All Rights Reserved.