created data structure for email automation
diff --git a/erpnext/crm/doctype/campaign_email_schedule/__init__.py b/erpnext/crm/doctype/campaign_email_schedule/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/crm/doctype/campaign_email_schedule/__init__.py
diff --git a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.json b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.json
new file mode 100644
index 0000000..2d90094
--- /dev/null
+++ b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.json
@@ -0,0 +1,38 @@
+{
+ "creation": "2019-06-30 15:56:20.306901",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "send_after_days",
+ "email_template"
+ ],
+ "fields": [
+ {
+ "fieldname": "send_after_days",
+ "fieldtype": "Int",
+ "in_list_view": 1,
+ "label": "Send After (days)",
+ "reqd": 1
+ },
+ {
+ "fieldname": "email_template",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Email Template",
+ "options": "Email Template",
+ "reqd": 1
+ }
+ ],
+ "istable": 1,
+ "modified": "2019-06-30 15:56:20.306901",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Campaign Email Schedule",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
+}
\ No newline at end of file
diff --git a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py
new file mode 100644
index 0000000..8445b8a
--- /dev/null
+++ b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+# import frappe
+from frappe.model.document import Document
+
+class CampaignEmailSchedule(Document):
+ pass
diff --git a/erpnext/crm/doctype/email_campaign/__init__.py b/erpnext/crm/doctype/email_campaign/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/crm/doctype/email_campaign/__init__.py
diff --git a/erpnext/crm/doctype/email_campaign/email_campaign.js b/erpnext/crm/doctype/email_campaign/email_campaign.js
new file mode 100644
index 0000000..6020028
--- /dev/null
+++ b/erpnext/crm/doctype/email_campaign/email_campaign.js
@@ -0,0 +1,8 @@
+// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Email Campaign', {
+ // refresh: function(frm) {
+
+ // }
+});
diff --git a/erpnext/crm/doctype/email_campaign/email_campaign.json b/erpnext/crm/doctype/email_campaign/email_campaign.json
new file mode 100644
index 0000000..49b3c06
--- /dev/null
+++ b/erpnext/crm/doctype/email_campaign/email_campaign.json
@@ -0,0 +1,100 @@
+{
+ "autoname": "naming_series:",
+ "creation": "2019-06-30 16:05:30.015615",
+ "doctype": "DocType",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "field_order": [
+ "campaign_section",
+ "campaign_name",
+ "lead",
+ "column_break_4",
+ "start_date",
+ "status",
+ "email_schedule_section",
+ "email_schedule",
+ "naming_series"
+ ],
+ "fields": [
+ {
+ "fieldname": "campaign_section",
+ "fieldtype": "Section Break",
+ "label": "CAMPAIGN "
+ },
+ {
+ "fieldname": "campaign_name",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Campaign Name",
+ "options": "Campaign",
+ "reqd": 1
+ },
+ {
+ "fieldname": "lead",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Lead",
+ "options": "Lead",
+ "reqd": 1
+ },
+ {
+ "default": "Started",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "label": "Status",
+ "options": "\nStarted\nIn Progress\nCompleted"
+ },
+ {
+ "fieldname": "column_break_4",
+ "fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "start_date",
+ "fieldtype": "Date",
+ "label": "Start Date",
+ "reqd": 1
+ },
+ {
+ "fieldname": "email_schedule_section",
+ "fieldtype": "Section Break",
+ "label": "EMAIL SCHEDULE"
+ },
+ {
+ "fieldname": "email_schedule",
+ "fieldtype": "Table",
+ "label": "Email Schedule",
+ "options": "Campaign Email Schedule",
+ "reqd": 1
+ },
+ {
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Naming Series",
+ "options": "MAIL-CAMP-.YYYY.-",
+ "reqd": 1
+ }
+ ],
+ "modified": "2019-06-30 16:23:00.696185",
+ "modified_by": "Administrator",
+ "module": "CRM",
+ "name": "Email Campaign",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "share": 1,
+ "write": 1
+ }
+ ],
+ "quick_entry": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1
+}
\ No newline at end of file
diff --git a/erpnext/crm/doctype/email_campaign/email_campaign.py b/erpnext/crm/doctype/email_campaign/email_campaign.py
new file mode 100644
index 0000000..baa82e8
--- /dev/null
+++ b/erpnext/crm/doctype/email_campaign/email_campaign.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+# import frappe
+from frappe.model.document import Document
+
+class EmailCampaign(Document):
+ pass
diff --git a/erpnext/crm/doctype/email_campaign/test_email_campaign.py b/erpnext/crm/doctype/email_campaign/test_email_campaign.py
new file mode 100644
index 0000000..f5eab48
--- /dev/null
+++ b/erpnext/crm/doctype/email_campaign/test_email_campaign.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+# import frappe
+import unittest
+
+class TestEmailCampaign(unittest.TestCase):
+ pass