Announcement

Collapse
No announcement yet.

Filter emails into cases, tasks, etc.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Filter emails into cases, tasks, etc.

    I'm really new to EspoCRM, and am coming from Highrise. I'm interested in a way to filter incoming emails into certain cases, tasks, opportunities, etc. For example, if an email comes into a shared inbox with a code after a "+" in the email address (e.g., "sharedinbox+caseID@email.com"), can the email automatically be assigned to that entity? It looks like Email Filters can only be used to put items into folders--can folders automatically be associated with tasks/cases/opps?

    If none of this is possible in the base functionality, is there an existing extension for it, or are there good hooks in place for me to write one? I'm comfortable with programming.

  • #2
    Hello,
    You can link an email record to a specified record of another entity via the Parent field. So you can try to use Formula in order to auto-assign email to some specified record. In Formula, you will need to define appropriate values to the 'parentType' and 'parenrId' parameters. Eg.:
    Code:
    parentType = 'Case';
    parentId = '5f77170e4252a05b1'
    You can set formula in Administration -> Entity Manager -> Email -> down arrow button on the very right of the screen -> Formula.
    Read more about Formula feature here https://docs.espocrm.com/administration/formula/.

    In order to add some entity to the email parent relation, you need open Administration -> Entity Manager -> Email -> Relationships -> emails/parent -> edit -> add new entity to the 'Parent Entity Types' scope.

    Comment


    • #3
      This is an awesome start, thank you! I'm working through this now. What's a good way to debug the formula code I'm writing? For instance, a way I can add to standard EspoCRM logs? I've bumped my logging level up to DEBUG and I'm not seeing any output when the script would run.

      Comment


      • #4
        The EspoCRM Logger logs only either Syntax errors (e.g. missed the ')' symbol, etc.) or Exception errors (e.g. 'Division by zero' error, etc.). So you won't see any Formula execution flow in the log.
        Also, you can use a simple workaround for debugging as I do (In cases when I have a big complex formula, and I need to find out whether a proper value was fetched somewhere in the flow, I store this value either to the description field or some other field with the same data type and check it).The EspoCRM Logger logs only either Syntax errors (e.g. missed ')' symbol, etc.) or Exception errors (e.g. Division by zero error, etc.). So you won't see any Formula execution flow in the log.
        Also, you can use a simple workaround for debugging as I do (In cases when I have a big complex formula, and I need to find out whether a proper value was fetched, I store this value to the description or some other field with the same data type and check it).

        Comment

        Working...
        X