FAQ
Q1. How to support 2 email accounts in Frappe Helpdesk, based on accounts assign different Agents.
A1. You can do so via Server Script, we at Frappe has also done the similar thing,
Steps:
1. Create 2 agent groups by going to HD Team DocType.
2. 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)
3. Go to assignment rule for each and enable them
4. Go to server script, create something like
<img width="746" alt="Screenshot 2024-08-24 at 1 30 29 PM" src="https://github.com/user-attachments/assets/d55ae36e-77e6-4cd5-8391-d376b4b350e2">
5. 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"
6. Now whenever an email will be received on Account 1, agent 1 & 2 will be assigned and vice versa