Email Accounts Configuration
How to support 2 email accounts in Frappe Helpdesk, based on accounts assign different Agents.
You can do so via Server Script, we at Frappe has also done the similar thing,
Steps:
Create 2 agent groups by going to HD Team DocType.
Add agent 1&2 in Group 1, agent 3&4 in Group 2. ( when you do so , an assignment rule is also created for the same)
Go to assignment rule for each and enable them
Go to server script, create something like
https://github.com/user-attachments/assets/d55ae36e-77e6-4cd5-8391-d376b4b350e2">
- In the script type:
# here we check whether communication for the email was created or not
communication_exits = frappe.db.exists("Communication",{"reference_name":doc.name})
if communication_exits:
email_account = frappe.db.get_value("Communication",communication_exits,"email_account")
# every email you create will have a name, add that name here
if (email_account == "Account 1"):
doc.agent_group = "Group 1"
elif (email_account == "Account 2"):
doc.agent_group = "Group 2"
- Now whenever an email will be received on Account 1, agent 1 & 2 will be assigned and vice versa