Question about creating cases from email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PavelZ
    Member
    • Jan 2023
    • 50

    #1

    Question about creating cases from email


    Hi,

    I currently have Email Account → Create Case from Email enabled. This means that when someone sends an email and our address appears in To, CC, or BCC, a case is created automatically.

    I would like to ask if it is possible to change this behavior.

    Is there a way to set a filter or rule so that a case is created only when our email address is in the “To” field? If the address appears only in CC or BCC, the case should not be created.

    Thank you in advance for your help.
  • rabii
    Active Community Member
    • Jun 2016
    • 1389

    #2
    you can achieve that using https://docs.espocrm.com/administrat...e-save-script/

    just need to check the to and check that parent is case and block creation
    Rabii
    EspoCRM Custom Development

    🔗 Portfolio & Builds

    Comment

    • PavelZ
      Member
      • Jan 2023
      • 50

      #3
      Hi rabii, thanks for the suggestion. Just to clarify — since the case is created automatically by the Group Email Account (Create Case from Email) process, will the Before Save Script actually trigger in this situation? I'm not sure it would intercept cases created by the email processor.

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1389

        #4
        hey PavelZ

        you are right api before save won't work in this case because this whole behavior is trigger by a hook so you need a different solution here is reply from Yuri about how to solve such problem https://forum.espocrm.com/forum/deve...8384#post98384

        in this thread they are talking about the same hook that trigger the autocreate but different issue but you follow Yuri instructions to customize the behavior
        Rabii
        EspoCRM Custom Development

        🔗 Portfolio & Builds

        Comment

        Working...