ERPNext Notification Control (Alerts)
Notification ControlA complete guide to staying informed about important business events in ERPNext using automatic email, SMS, and Slack notifications.
Staying on top of critical business events is essential for smooth operations. ERPNext's Notification Control (formerly known as Email Alerts) allows you to automate communication based on document changes.
Whether it's notifying a sales manager about a high-value order, alerting the warehouse team of a new delivery, or sending payment reminders to customers, Notification Control handles it all automatically.
Key Concepts
Important ideas to understand in this code
Triggers
Events that start the notification process. Common triggers include 'New' (document creation), 'Submit' (document finalization), 'Cancel', 'Save', or value changes in specific fields.
Learn moreConditions
Logic checks to determine if the alert should be sent. You can use simple field comparisons or complex Python/JavaScript expressions to target specific scenarios (e.g., Grand Total > 10000).
Learn moreRecipients
Who receives the message? Recipients can be dynamic (document owner, customer contact), fixed email addresses, or specific system Roles (e.g., Accounts Manager).
Step-by-Step Tutorial
Follow along to understand how this code works
Access Notification List
Navigate to the Notification list to manage your alerts. You can find this by searching for 'Notification' in the awesome bar.
Search: Notification ListCreate New Notification
Click 'Add Notification'. Enter a descriptive Subject. In the 'Document Type' field, select the document you want to monitor (e.g., Sales Order, Leave Application).
Subject: High Value Order Alert
Document Type: Sales OrderSet Trigger and Conditions
Choose when the alert sends (e.g., on 'Submit'). Add a condition if needed. For example, to alert only for orders above $5,000:
Send Alert On: Submit
Condition: doc.grand_total > 5000Configure Recipients
Define who gets the message. You can send to specific email fields (like `contact_email`) or to internal users by Role. You can also send to fixed email addresses.
Send To: Sales Manager (Role)
CC: ceo@example.com (Fixed)Design the Message
Draft your message content. You can use Jinja templating to include dynamic data from the document, such as the Customer Name or Grand Total.
Hello,
A new high-value order {{ doc.name }} from {{ doc.customer_name }} amounting to {{ doc.grand_total }} has been submitted.
Regards,
ERP SystemCommon Issues & Solutions
Troubleshoot problems you might encounter