{
 "actions": [],
 "allow_rename": 1,
 "autoname": "Prompt",
 "creation": "2014-07-11 17:18:09.923399",
 "doctype": "DocType",
 "document_type": "System",
 "engine": "InnoDB",
 "field_order": [
  "enabled",
  "is_standard",
  "module",
  "column_break_2",
  "channel",
  "slack_webhook_url",
  "filters_section",
  "subject",
  "event",
  "document_type",
  "col_break_1",
  "method",
  "date_changed",
  "datetime_changed",
  "days_in_advance",
  "minutes_offset",
  "datetime_last_run",
  "value_changed",
  "sender",
  "send_system_notification",
  "sender_email",
  "section_break_9",
  "condition_type",
  "filters_editor",
  "condition",
  "filters",
  "column_break_6",
  "html_7",
  "property_section",
  "set_property_after_alert",
  "property_value",
  "column_break_5",
  "send_to_all_assignees",
  "recipients",
  "message_sb",
  "message_type",
  "message",
  "message_examples",
  "view_properties",
  "column_break_25",
  "attach_print",
  "print_format",
  "column_break_llcs",
  "attach_files",
  "from_attach_field"
 ],
 "fields": [
  {
   "default": "1",
   "fieldname": "enabled",
   "fieldtype": "Check",
   "label": "Enabled"
  },
  {
   "fieldname": "column_break_2",
   "fieldtype": "Column Break"
  },
  {
   "default": "Email",
   "depends_on": "eval: !doc.disable_channel",
   "fieldname": "channel",
   "fieldtype": "Select",
   "label": "Channel",
   "options": "Email\nSlack\nSystem Notification\nSMS",
   "reqd": 1,
   "set_only_once": 1
  },
  {
   "depends_on": "eval:doc.channel=='Slack'",
   "description": "To use Slack Channel, add a <a href=\"#List/Slack%20Webhook%20URL/List\" rel=\"noopener noreferrer\">Slack Webhook URL</a>.",
   "fieldname": "slack_webhook_url",
   "fieldtype": "Link",
   "label": "Slack Channel",
   "mandatory_depends_on": "eval:doc.channel=='Slack'",
   "options": "Slack Webhook URL"
  },
  {
   "fieldname": "filters",
   "fieldtype": "Code",
   "hidden": 1,
   "label": "Filters",
   "options": "JSON",
   "read_only": 1
  },
  {
   "depends_on": "eval: in_list(['Email', 'Slack', 'System Notification'], doc.channel)",
   "description": "For a dynamic subject, use Jinja tags like this: <code>{{ doc.name }} Delivered</code>",
   "fieldname": "subject",
   "fieldtype": "Data",
   "ignore_xss_filter": 1,
   "in_list_view": 1,
   "label": "Subject",
   "mandatory_depends_on": "eval: in_list(['Email', 'Slack', 'System Notification'], doc.channel)"
  },
  {
   "fieldname": "document_type",
   "fieldtype": "Link",
   "in_list_view": 1,
   "in_standard_filter": 1,
   "label": "Document Type",
   "options": "DocType",
   "reqd": 1,
   "search_index": 1
  },
  {
   "default": "0",
   "fieldname": "is_standard",
   "fieldtype": "Check",
   "label": "Is Standard",
   "no_copy": 1
  },
  {
   "depends_on": "is_standard",
   "fieldname": "module",
   "fieldtype": "Link",
   "in_standard_filter": 1,
   "label": "Module",
   "options": "Module Def"
  },
  {
   "fieldname": "col_break_1",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "event",
   "fieldtype": "Select",
   "in_list_view": 1,
   "label": "Send Alert On",
   "options": "\nNew\nSave\nSubmit\nCancel\nDays After\nDays Before\nMinutes After\nMinutes Before\nValue Change\nMethod",
   "reqd": 1,
   "search_index": 1
  },
  {
   "depends_on": "eval:doc.event=='Method'",
   "description": "Trigger on valid methods like \"before_insert\", \"after_update\", etc (will depend on the DocType selected)",
   "fieldname": "method",
   "fieldtype": "Data",
   "label": "Trigger Method"
  },
  {
   "depends_on": "eval:doc.document_type && (doc.event==\"Days After\" || doc.event==\"Days Before\")",
   "description": "Send alert if date matches this field's value",
   "fieldname": "date_changed",
   "fieldtype": "Select",
   "label": "Reference Date"
  },
  {
   "default": "0",
   "depends_on": "eval:doc.document_type && (doc.event==\"Days After\" || doc.event==\"Days Before\")",
   "description": "Send days before or after the reference date",
   "fieldname": "days_in_advance",
   "fieldtype": "Int",
   "label": "Days Before or After"
  },
  {
   "depends_on": "eval:doc.document_type && doc.event==\"Value Change\"",
   "description": "Send alert if this field's value changes",
   "fieldname": "value_changed",
   "fieldtype": "Select",
   "label": "Value Changed"
  },
  {
   "depends_on": "eval: doc.channel == 'Email'",
   "fieldname": "sender",
   "fieldtype": "Link",
   "label": "Sender",
   "options": "Email Account"
  },
  {
   "fieldname": "sender_email",
   "fieldtype": "Data",
   "label": "Sender Email",
   "options": "Email",
   "read_only": 1
  },
  {
   "fieldname": "section_break_9",
   "fieldtype": "Section Break"
  },
  {
   "depends_on": "eval:doc.condition_type===\"Python\"",
   "description": "Optional: The alert will be sent if this expression is true",
   "fieldname": "condition",
   "fieldtype": "Code",
   "ignore_xss_filter": 1,
   "in_list_view": 1,
   "label": "Condition"
  },
  {
   "fieldname": "column_break_6",
   "fieldtype": "Column Break"
  },
  {
   "depends_on": "eval:doc.condition_type===\"Python\"",
   "fieldname": "html_7",
   "fieldtype": "HTML",
   "options": "<p><strong>{{ __(\"Condition Examples\") }}:</strong></p>\n<pre><code class=\"language-python\">doc.status==\"Open\"<br>doc.due_date==nowdate()<br>doc.total &gt; 40000\n</code></pre>\n"
  },
  {
   "collapsible": 1,
   "fieldname": "property_section",
   "fieldtype": "Section Break",
   "label": "Set Property After Alert"
  },
  {
   "fieldname": "set_property_after_alert",
   "fieldtype": "Select",
   "label": "Set Property After Alert"
  },
  {
   "fieldname": "property_value",
   "fieldtype": "Data",
   "label": "Value To Be Set"
  },
  {
   "depends_on": "eval:doc.channel !=\"Slack\"",
   "fieldname": "column_break_5",
   "fieldtype": "Section Break",
   "label": "Recipients"
  },
  {
   "fieldname": "recipients",
   "fieldtype": "Table",
   "label": "Recipients",
   "mandatory_depends_on": "eval:doc.channel!=='Slack' && !doc.send_to_all_assignees",
   "options": "Notification Recipient"
  },
  {
   "fieldname": "message_sb",
   "fieldtype": "Section Break",
   "label": "Message"
  },
  {
   "default": "Add your message here",
   "fieldname": "message",
   "fieldtype": "Code",
   "ignore_xss_filter": 1,
   "label": "Message",
   "options": "Jinja"
  },
  {
   "fieldname": "message_examples",
   "fieldtype": "HTML",
   "label": "Message Examples",
   "options": "<h5>Message Example</h5>\n\n<pre>&lt;h3&gt;Order Overdue&lt;/h3&gt;\n\n&lt;p&gt;Transaction {{ doc.name }} has exceeded Due Date. Please take necessary action.&lt;/p&gt;\n\n&lt;!-- show last comment --&gt;\n{% if comments %}\nLast comment: {{ comments[-1].comment }} by {{ comments[-1].by }}\n{% endif %}\n\n&lt;h4&gt;Details&lt;/h4&gt;\n\n&lt;ul&gt;\n&lt;li&gt;Customer: {{ doc.customer }}\n&lt;li&gt;Amount: {{ doc.grand_total }}\n&lt;/ul&gt;\n</pre>"
  },
  {
   "fieldname": "view_properties",
   "fieldtype": "Button",
   "label": "View Properties (via Customize Form)"
  },
  {
   "collapsible": 1,
   "collapsible_depends_on": "attach_print",
   "fieldname": "column_break_25",
   "fieldtype": "Section Break",
   "label": "Attachment Settings"
  },
  {
   "default": "0",
   "fieldname": "attach_print",
   "fieldtype": "Check",
   "label": "Attach Print"
  },
  {
   "depends_on": "attach_print",
   "fieldname": "print_format",
   "fieldtype": "Link",
   "label": "Print Format",
   "options": "Print Format"
  },
  {
   "default": "0",
   "depends_on": "eval: doc.channel !== 'System Notification'",
   "description": "If enabled, the notification will show up in the notifications dropdown on the top right corner of the navigation bar.",
   "fieldname": "send_system_notification",
   "fieldtype": "Check",
   "label": "Send System Notification"
  },
  {
   "default": "0",
   "depends_on": "eval:doc.channel == 'Email'",
   "fieldname": "send_to_all_assignees",
   "fieldtype": "Check",
   "label": "Send To All Assignees"
  },
  {
   "default": "Markdown",
   "depends_on": "is_standard",
   "fieldname": "message_type",
   "fieldtype": "Select",
   "label": "Message Type",
   "options": "Markdown\nHTML\nPlain Text"
  },
  {
   "depends_on": "eval:doc.document_type && (doc.event==\"Minutes After\" || doc.event==\"Minutes Before\")",
   "description": "Send alert if datetime matches this field's value",
   "fieldname": "datetime_changed",
   "fieldtype": "Select",
   "label": "Reference Datetime"
  },
  {
   "default": "0",
   "depends_on": "eval:doc.document_type && (doc.event==\"Minutes After\" || doc.event==\"Minutes Before\")",
   "description": "Send <b>at the earliest</b> this number of minutes before or after the reference datetime. The actual sending may be delayed by up to 5 minutes due to the scheduler's trigger cadence.",
   "fieldname": "minutes_offset",
   "fieldtype": "Int",
   "label": "Minutes Offset"
  },
  {
   "depends_on": "eval:doc.document_type && (doc.event==\"Minutes After\" || doc.event==\"Minutes Before\")",
   "fieldname": "datetime_last_run",
   "fieldtype": "Datetime",
   "label": "Last Run",
   "read_only": 1
  },
  {
   "default": "Python",
   "fieldname": "condition_type",
   "fieldtype": "Select",
   "label": "Condition Type",
   "options": "Python\nFilters"
  },
  {
   "depends_on": "eval:doc.condition_type===\"Filters\"",
   "fieldname": "filters_editor",
   "fieldtype": "HTML",
   "label": "Filters Editor"
  },
  {
   "fieldname": "filters_section",
   "fieldtype": "Section Break",
   "label": "Filters"
  },
  {
   "fieldname": "column_break_llcs",
   "fieldtype": "Column Break"
  },
  {
   "fieldname": "attach_files",
   "fieldtype": "Select",
   "label": "Attach Files",
   "options": "\nFrom Field\nAll"
  },
  {
   "depends_on": "eval:doc.attach_files === \"From Field\"",
   "fieldname": "from_attach_field",
   "fieldtype": "Select",
   "label": "From Attach Field",
   "mandatory_depends_on": "eval:doc.attach_files === \"From Field\""
  }
 ],
 "grid_page_length": 50,
 "icon": "fa fa-envelope",
 "index_web_pages_for_search": 1,
 "links": [],
 "modified": "2026-04-22 15:37:19.355265",
 "modified_by": "Administrator",
 "module": "Email",
 "name": "Notification",
 "naming_rule": "Set by user",
 "owner": "Administrator",
 "permissions": [
  {
   "create": 1,
   "delete": 1,
   "export": 1,
   "read": 1,
   "report": 1,
   "role": "System Manager",
   "share": 1,
   "write": 1
  }
 ],
 "row_format": "Dynamic",
 "sort_field": "creation",
 "sort_order": "DESC",
 "states": [],
 "title_field": "subject",
 "track_changes": 1
}
