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:

  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

Screenshot 2024-08-24 at 1 30 29 PMhttps://github.com/user-attachments/assets/d55ae36e-77e6-4cd5-8391-d376b4b350e2">

  1. 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"
  1. Now whenever an email will be received on Account 1, agent 1 & 2 will be assigned and vice versa
Discard
Save