Open a closed case if email received

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sathya
    Junior Member
    • Mar 2021
    • 3

    Open a closed case if email received

    Hi there!

    Wondering if its possible change the status of a case from closed to assigned or something else if an email is received to the case when its status is closed.

    Thanks in advance!
  • Jakub Grufik
    Senior Member
    • Aug 2022
    • 361

    #2
    Hello yes it is possible using workflow:

    Target: emails
    Trigger: after record created
    Condition: ParentCase is not empty
    Action: update related record - ParentCase - Case:
    Code:
    ifThen(
        status == 'Closed',
        status = "Assigned"
        );​
    Attached Files

    Comment


    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      hello man, I used the original one I just renamed the label to be able to distinguish it in the workflows. It was just Parent. But then I realized that its always parent and then you can choose which parent (Case, opportunity, etc.) I did not know that every parent entity is under "Parent" in the workflow and then there is a dropdown list with all the parents available.

    • rabii
      rabii commented
      Editing a comment
      yeah i see probably that why you come up with this name. there is already ability in both workflow and BPMN to select the parent and then which parent (case - opportunity etc).

    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      yep that is exactly what I misseed so I renamed the label to make sure that I am selecting proper relation thanks for clarification
  • peterberlin
    Active Community Member
    • Mar 2015
    • 1004

    #3
    Hello Jacob
    That's an interesting suggestion.
    In user ESPOCrm the field ParentCase is not available.
    Which version of ESPO and the advanced pack are you using?​

    Comment


    • rabii
      rabii commented
      Editing a comment
      i think parentCase is a custom relationship defined by Jacob. This is not available in any of espocrm version.

    • Sathya
      Sathya commented
      Editing a comment
      Hi Peter!

      We have configured for cases to be created based on group emails that come in. Each email and its subsequent thread is related to a case. This is done automatically by Espo. You can read more about it here: https://docs.espocrm.com/administrat...#email-to-case

    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      Hello,

      parentCase is relationship created between Case (parent) and Email (children). You need to have some relation between those entities to be able to update one if something happens in the second one.
  • murugappan
    Active Community Member
    • Aug 2017
    • 467

    #4
    Jakub Grufik

    Thank you for your advise. I am not sure i understand you resolution. I did not create another relationship but used the existing one (see screencap below) but it did not work. Please advise.


    Click image for larger version

Name:	Screenshot_4.png
Views:	233
Size:	50.8 KB
ID:	101614

    Comment

    • rabii
      Active Community Member
      • Jun 2016
      • 1250

      #5
      Hey @murugappan

      There is no parentCase in the email entity and you don't need that relationship, there is already a parent to children set by default on the email which should work jus fine, you just need to get a proper workflow set up. Attached how i would use a workflow to achieve that and i have tested it and it works fine.
      Attached Files
      Rabii
      Web Dev

      Comment


      • murugappan
        murugappan commented
        Editing a comment
        Hey @rabii

        Thank you for the update. I tested it and it works. Honestly, i had trouble understanding the various attributes and formula. I took a short route and ask the forum. Is there are reference documentation on these, especially the attributes for the built-in entities?

      • rabii
        rabii commented
        Editing a comment
        Glad it worked for you. Attributes are just fields used in your entities, you can always find all attributes under Entity Manager > Account > Fields (e.g). For formula you can just read the formula documentation here and it is clear https://docs.espocrm.com/administration/formula/
        You just keep learning that is the key and of course we are all here to help each other and learn from each other. So if you face any issues just post it here and we will help you
    Working...