Articles on: OneHash CRM | Email and SMS

Notification Configurations

You can configure various notifications in your system to remind you of important activities.

The completion date of a Task.
Expected Delivery Date of a Sales Order.
Expected Payment Date.
A reminder of follow up.
If an Order greater than a particular value is received or sent.
Expiry notification for a Contract.
Completion/Status change of a Task.

To access notification setup, go to:

Home > Settings > Notification

Setting Up an Alert

To set up a Notification:

Select the Document Type you want to watch changes on.

Define what events you want to watch under Send Alert On. Events are:
New: When a new document of the selected type is made.
Save/Submit/Cancel: When a document of the selected type is saved, submitted, or canceled.
Days Before/Days After: Trigger this alert a few days before or after the Reference Date. To set the days, set Days Before or After. This can be useful in reminding you of upcoming due dates or reminding you to follow up on certain leads of quotations.
Value Change: When a particular value in the selected type changes.
Method: Sends notification when a specific method is triggered. Eg: before_insert.
Custom: Send a notification to an Email Account selected

Set additional Conditions if required.
Set the recipients of this alert. The recipient could either be a field of the document or a list of fixed Email Addresses.
Compose the message.
Save.


Setting a Subject


You can retrieve the data for a particular field by using doc.[field_name]. To use it in your subject/message, you have to surround it with {{ }}. These are called Jinja tags. For example, to get the name of a document, you use {{ doc.name }}. The following example sends an email on saving a Task with the Subject, "TASK#### has been created"





Setting Conditions


Notifications allow you to set conditions according to the field data in your documents. For example, if you want to receive an Email if a Lead has been saved as "Interested" as it's status, you put doc.status == "Interested" in the conditions textbox. You can also set more complex conditions by combining them.



The above example will send a Notification when a Task is saved with the status "Open" and the "Expected End Date" for the Task is the date on or before the date on which it was saved on.


Setting a Message


You can use both Jinja Tags ({{ doc.[field_name] }}) and HTML tags in the message textbox.



Setting a Value after the Alert is Set


Sometimes to make sure that the Notification is not sent multiple times, you can define a custom property (via Customize Form) like "Notification Sent" and then set this property after the alert is sent by setting the Set Property After Alert field.

Then you can use that as a condition in the Condition rules to ensure emails are not sent multiple times





Example


Defining the Criteria



Setting the Recipients and Message




Slack Notifications

If you prefer to have your notifications sent to a dedicated Slack channel, you can also choose the option "Slack" in the channel options and select the appropriate Slack Webhook URL.



Slack Webhook URL


A Slack webhook URL is a URL pointing directly to a Slack channel.

To generate webhook URLs, you need to create a new Slack App:

Go to https://api.slack.com/slack-apps.
Click on "Create a Slack App".



Give your App a name and choose the right workspace. Once your app is created, go to the "Incoming Webhooks" section and add a new Webhook to Workspace.



Copy the created link, go back to OneHash and use it to create a new Slack Webhook URL in Integrations > Slack Webhook URL.


Select Slack and your Slack channel in the channel and Slack channel fields within your notification.


Message Format


Unlike Email messages, Slack doesn't allow HTML formatting.

Instead, you can use markdown formatting: Slack Documentation

Example: Order Overdue





System Notifications

System notifications are introduced for Assignments, mentions, documents shared, and Energy Points. These notifications show up in the notifications dropdown on the the navigation bar's top right corner.

We have also introduced an additional channel to send alerts - System Notifications:




Choosing this channel will send a system notification when a notification is triggered, instead of an Email or a Slack notification.



Clicking on the notification routes to the Notification Log document which contains the configured subject, message as well as the attached file, if Attach Print is set:




If Email/Slack alerts and System Notifications both are required, the main channel can be set as Email or Slack and this option can be checked:



WhatsApp
In Version 13 we have introduced an additional channel to send alerts - WhatsApp: Notifications WhatsApp Channel

If you prefer to have your notifications sent to a WhatsApp number, you can also choose the option "WhatsApp" in the channel options and select the appropriate Twilio Number. Twilio Numbers can be added to Twilio settings in Frappe. WhatsApp messages can only be sent to numbers which have country codes in them.


Twilio Settings



1. Twilio Settings

In order to configure Twilio settings, you need to first obtain Twilio credentials from your Twilio Account's account settings. You can only add those phone numbers that have been activated in your Twilio Account with WhatsApp access. Twilio Credentials



2. Message Format

WhatsApp allows their users to only send those message templates that are pre-approved by them to your customers. Failure to do so might result in restrictions on your Twilio account.



SMS




In order to use this channel, you would need to complete the configuration of SMS Settings.

Updated on: 01/04/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!