Announcement

Collapse
No announcement yet.

Bounce emails when case is closed

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

  • Bounce emails when case is closed

    I'm using the built in "Case create" on emails together with Process Flowcharts (Advanced pack).

    I'd like to bounce any emails sent to a case that is closed using a template stating "Your case is closed. Please open a new one". I've searched and are only able to find people reopening a case when mail is received.

    Upon trying to make my own flowchart with criterias:
    Target entity: Email
    Conditional start: After record created && Parent status == Closed

    But this does not trigger on the mails that goes inside the opened cases. Instead it seems to trigger when I close the case.

    Please see attachment of how i've built my BPM Flowchart.

    Any help appreciated.
    Attached Files
    Last edited by hrdy90; 01-29-2024, 07:49 PM.

  • #2
    Your condition looks fine. I can't check at the moment, but according this topic, it works for workflows.

    Comment


    • #3
      I looked over it again and it does trigger. Seems my "Send message task" is the one not working.. How do i make it send the mail to the user that sent the mail? Or if possible the primary contact of the related case?

      Heres the available options:
      1. User assigned to Process
      2. Specified Teams
      3. Specified Users
      4. Specified Contacts
      5. Specified Email Address
      6. Related: Created By
      7. Related: Modified By
      8. Related: Assigned User
      9. Related: Assigned Users
      10. Related: Users
      11. Related: Sent By (Selected)
      12. Related: Parent
      13. Related: createdEvent
      14. Related: Account
      15. Related: Replied.Created By
      16. Related: Replied.Modified By
      17. Related: Replied.Assigned User
      18. Related: Replied.Sent By (Selected)
      19. Related: Replied.Account
      20. Related: Group Folder.Created By
      21. Related: Group Folder.Modified By
      22. Related: Account.Followers
      23. Related: Account.Created By
      24. Related: Account.Modified By
      25. Related: Account.Assigned User
      26. Related: Parent.Assigned User
      27. Related: Parent.Followers
      28. Related: createdEvent.Assigned User
      29. Related: createdEvent.Follower

      Comment


      • #4
        How exactly it's not working. Does the flow chart node get Failed status? If yes, anything in the log? Sending email is run by cron.

        Comment


        • #5
          No, the process goes through all green. I missed that it works. But the email is not sent to the correct address. I want the "Send message task" to send email to the person that sent the mail. I've tried a few of the available option in "To" but the email is still not sent to the sender. So I either need to use attribute to get the "From" address or somehow get the email from the related cases contact.

          Comment


          • #6
            I figured it out. I created a script task before the email task with:
            $email = bpm\targetEntity\attribute('fromAddress');

            And used {$$email} in the to field.

            Thank you for the help

            Comment


            • #7
              Btw. Is there any way to:
              Not send any notifications to the user / group that is assigned to the case if the case is closed
              Not paste the incoming email to the old closed case and instead only bounce the email with a template like i'm already doing?

              Btw, for some reason I had to update my workflow from "After record created" to "After record updated" for it to start working again. It only worked during testing with the first one.

              Comment


              • #8
                Also, is it somehow possible to relate the newly sent message using "Send Message Task" to the incident so it shows up in the history?

                Comment


                • #9
                  If you want to link the send Message Task to the current case, you can add another task another the Send Message Task and choose in action (Update Created Record) you will be able to select the send message task (based on it is given name) and then update the parent name to Case and the parentId to to the targetEntity parentId as below:

                  PHP Code:
                  parentName = Case;
                  parentId bpm\targetEntity\attribute('parentId');​ 
                  Rabii
                  Web Dev | Freelancer

                  Comment

                  Working...
                  X