Notification

ERPNext lets you set up different kinds of notifications that will automatically let users know about important tasks and events. Notifications keep teams up to date and make sure that actions are taken in a timely manner. They are good for reminders, such as the due date for a task.

• The date the sales order is due to be delivered.

• The date that customers or vendors are supposed to pay.

• Reminders to follow up on leads or quotes.

• Notifies you when an order worth more than a certain amount is sent or received.

• Reminders for when contracts or subscriptions are about to end.

• Updates on the status or completion of tasks.

To set up Email Digest, go to:

Home >Settings > Notification

1. Making an Notification

You can set up notifications by choosing certain events and conditions on documents where you want to get alerts. These steps will help you set up a notification: 1.1 Set up Event (Send Alert On)

You need to decide when ERPNext should send the notification. Some events that are available are:

• New: When a new document of the type you chose is made.

• Save, Submit, or Cancel: This happens when the document is saved, sent, or cancelled.

Days Before / Days After: This option automatically triggers the alert based on a reference date field in the document, either before or after a certain number of days. Great for reminding you of due dates or deliveries that are coming up.

• Value Change: This happens when the value of a certain field in the document changes.

• Method: Sends an alert when a backend method, like before_insert or validate, is called.

• Custom: Lets you send notifications to a certain email address no matter what happens with the document.

You can also choose Child Document Types for triggers like Days Before or Days After starting with Version 16.

1.2 Type of Document

Choose the Document Type (like a Sales Order, Task, or Project) that you want ERPNext to keep an eye on for changes and send you alerts.

1.3 Terms

You can set conditions to narrow down when the notification should go out. For example: • Only send a notification when the total of the Sales Order is more than $10,000.

• Only send a reminder if the Task status is "In Progress."

You can also set up complicated conditions that use operators like "and" and "or."

1.4 People who get it

You have the option to:

• Dynamic Recipients: Choose a field in the document (like "Assigned To") to send the notification to.

• Static Recipients: Type in email addresses that don't change.

1.5 Write a Message

Use plain text, HTML tags, and Jinja Tags to write the message body. Jinja Tags will pull document fields into the message automatically.

For instance:

CopyEdit

Order Overdue

The transaction {{ doc.name }} is past its due date. Please do something.

Customer: {{ doc.customer }}

Amount: {{ doc.total_amount }}

1.6 Save

After you set up all the options, save your Notification settings.

1.1 Setting a Subject

Notification

• Use Jinja Tags (like doc.name ) to change the subject line based on the data in the document.

•For example:

Subject: "TASK {{ doc.name }} has been made"

This makes sure that every email subject is different and useful.

1.2 Setting Conditions

Use logical expressions in the Condition field, such as: • doc.status == "Open"

• doc.total_amount > 10000

Depending on the document data, these decide whether or not to send the notification.

1.3 Sending a Message

You can use HTML tags to style your notification message.

• Jinja Tags to get the values of document fields.

Message Example: html

CopyEdit

Details of the Order

Order ID: {{ doc.name }}

Customer: {{ doc.customer }}

Total Amount: {{ doc.grand_total }}

Please take care of this order as soon as you can.

1.4 Setting a Value After the Alert Is Set

To stop sending the same notification twice:

• Make a new field, like "Notification Sent."

• Use the Set Property After Alert feature in the Notification setup to change this field after the notification has been sent.

• After that, you can add a condition to stop it from happening again.

1.5 Example

For example:

• Trigger: When a task is made.

• Condition: The status must be "Open."

• Recipient: The email address of the user who was assigned the task.

• Message: Don't forget about the new task.

2. Notifications from Slack

You can send notifications directly to Slack channels with ERPNext.

2.1 Slack Webhook URL Steps:

  1. Visit the Slack API.

  2. Click the button that says "Create a Slack App."

  3. Make Incoming Webhooks and a Webhook URL.

  4. Copy the link.

  5. In ERPNext, click on Integrations and then Slack Webhook URL.

Put in the URL for your Slack Webhook.

Choose Slack as the channel and your Slack Webhook URL when you set up notifications.

2.2 Message Style

Instead of HTML, Slack uses Markdown formatting.

Example Slack Message: "Order Overdue"

The due date for transaction {{ doc.name }} has passed.

Please look over.

Client: {{ doc.customer }}

Amount: {{ doc.grand_total }}

3. System Notifications:

Notification

• You can see notifications in ERPNext itself, in the Notifications dropdown in the top right corner.

• System Notifications don't send emails or messages on Slack.

• You can turn on both System Notification and Email/Slack at the same time.

Each notification has a link to a Notification Log that shows the message, subject, and any files that were attached.

4. WhatsApp was added .

• The Twilio API lets you send notifications directly to WhatsApp numbers.

• Country codes must be included in phone numbers.

4.1 Twilio Settings

• Get your Twilio Account credentials.

• In ERPNext's Twilio Settings, add phone numbers that can use WhatsApp.

4.2 Message Format

Notification

• WhatsApp only lets you use message templates that have been approved ahead of time.

• You need to send your notification template to Twilio for approval.

Your Twilio account may be limited if you don't use approved templates.

5. SMS—This feature was also added .

• You can send notifications by SMS using the SMS Gateway that is set up.

• Needs to be set up in SMS Settings.

• SMS Settings

• Document Follow

7. Reminders that only happen once

A lighter version of Notifications that is currently in nightly builds.

How to set a one-time reminder:

  1. Open a document, like a Sales Order.

  2. Click the three dots in the Menu and then Remind Me.

  3. Set the time and the reminder.

  4. A notification from the system will let you know at the right time.

This feature is great for quick, one-time reminders that don't require setting up a full notification rule.

More To Follow

Discard
Save

On this page

Review Changes ← Back to Content
Message Status Space Raised By Last update on