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