diff --git a/rangeldigital/__pycache__/__init__.cpython-313.pyc b/rangeldigital/__pycache__/__init__.cpython-313.pyc
index 6c4a073..1482cee 100644
Binary files a/rangeldigital/__pycache__/__init__.cpython-313.pyc and b/rangeldigital/__pycache__/__init__.cpython-313.pyc differ
diff --git a/rangeldigital/__pycache__/api.cpython-313.pyc b/rangeldigital/__pycache__/api.cpython-313.pyc
new file mode 100644
index 0000000..61251b8
Binary files /dev/null and b/rangeldigital/__pycache__/api.cpython-313.pyc differ
diff --git a/rangeldigital/__pycache__/hooks.cpython-313.pyc b/rangeldigital/__pycache__/hooks.cpython-313.pyc
index e7ca74b..16dc493 100644
Binary files a/rangeldigital/__pycache__/hooks.cpython-313.pyc and b/rangeldigital/__pycache__/hooks.cpython-313.pyc differ
diff --git a/rangeldigital/api.py b/rangeldigital/api.py
new file mode 100644
index 0000000..cbb2a4d
--- /dev/null
+++ b/rangeldigital/api.py
@@ -0,0 +1,38 @@
+import frappe
+
+@frappe.whitelist(allow_guest=True) # allow_guest=True if you want unauthenticated access
+def lead_magnet(email,subject,content):
+ try:
+ # Check if a Lead with the given email exists
+ lead = frappe.db.get_value("Lead", {"email_id": email}, "name",)
+
+ if not lead:
+ # Create a new Lead if not found
+ lead_doc = frappe.get_doc({
+ "doctype": "Lead",
+ "first_name": "Unknown",
+ "email_id": email,
+ "status": "Open"
+ })
+ lead_doc.insert(ignore_permissions=True)
+ frappe.db.commit()
+ lead = lead_doc.name # Get the newly created lead name
+
+ # Create a Communication linked to the Lead
+ communication = frappe.get_doc({
+ "doctype": "Communication",
+ "subject": subject,
+ "content": content,
+ "sender": email,
+ "sent_or_received": "Received",
+ "reference_doctype": "Lead",
+ "reference_name": lead # Link to the existing or new lead
+ })
+ communication.insert(ignore_permissions=True)
+ frappe.db.commit()
+
+ return {"success": True, "message": "Lead and communication recorded successfully", "lead": lead}
+
+ except Exception as e:
+ frappe.log_error(f"Lead Creation Error: {str(e)}", "Lead API Error")
+ return {"success": False, "error": str(e)}
diff --git a/rangeldigital/dump.rdb b/rangeldigital/dump.rdb
index c103cd6..c8c98b8 100644
Binary files a/rangeldigital/dump.rdb and b/rangeldigital/dump.rdb differ
diff --git a/rangeldigital/fixtures/web_template_large_heading_section_1.json b/rangeldigital/fixtures/web_template_large_heading_section_1.json
new file mode 100644
index 0000000..f8ad2b3
--- /dev/null
+++ b/rangeldigital/fixtures/web_template_large_heading_section_1.json
@@ -0,0 +1,39 @@
+{
+ "doctype": "Web Template",
+ "name": "Large Heading Section - 1",
+ "module": "Website",
+ "type": "Component",
+"template": "
{% set words = heading.split(' ') %}{% for word in words %}{% if loop.index == highlight_word_number %}{{ word }}{% else %}{{ word }}{% endif %} {% endfor %}