BPM Flowchart Email Action - User assigned to Process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qpoint
    Member
    • Aug 2021
    • 39

    BPM Flowchart Email Action - User assigned to Process

    We have a Flowchart that uses the Email Action on a Contact entity. The Send Message Task has "From" set as "User assigned to Process". This workflow was created by a user we'll call User1, (who also has administrative privileges).

    When the workflow is triggered by User2 (trigger is based on the change in state of a field, with type "After record updated"), the user assigned to the process is User1, resulting in an email sent from User1. Note that User2 is the assigned user on both the Contact and Account.

    Expected behavior: the user assigned to the process expected to be User2, with Email From expected to be from User2.

    Please advise. The goal is for multiple users to utilize the same flowchart, but have the emails come from the respective users.

    Using Advanced Pack 2.11.1.

    ps - it would be nice to have a Send Message Task, From option to include Contact.Assigned User.

    Thanks
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    hi,
    set from like this :


    'from', env\userAttribute('emailAdresses')
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • shady farid
      Junior Member
      • Aug 2022
      • 1

      #3
      hi,
      Please i want to send auto email message by new lead been distributed to assigned user , email template for that will solve the issue i think

      Comment

      • qpoint
        Member
        • Aug 2021
        • 39

        #4
        Originally posted by item
        hi,
        set from like this :


        'from', env\userAttribute('emailAdresses')
        I don't see where a formula can be used in an Email Action. The options in the From dropdown are pre-defined.

        Comment

        • rabii
          Active Community Member
          • Jun 2016
          • 1250

          #5
          Originally posted by qpoint
          We have a Flowchart that uses the Email Action on a Contact entity. The Send Message Task has "From" set as "User assigned to Process". This workflow was created by a user we'll call User1, (who also has administrative privileges).

          When the workflow is triggered by User2 (trigger is based on the change in state of a field, with type "After record updated"), the user assigned to the process is User1, resulting in an email sent from User1. Note that User2 is the assigned user on both the Contact and Account.

          Expected behavior: the user assigned to the process expected to be User2, with Email From expected to be from User2.

          Please advise. The goal is for multiple users to utilize the same flowchart, but have the emails come from the respective users.

          Using Advanced Pack 2.11.1.

          ps - it would be nice to have a Send Message Task, From option to include Contact.Assigned User.

          Thanks
          on the send task you can just make sure that it is sent from (assigned user) the system will track down who is the current assigned user of the contact/account and then will send the email from their email address. hence the flowchart is targeting the contact entity you just need to send it from entity('assignedUser').
          Rabii
          Web Dev

          Comment

          • qpoint
            Member
            • Aug 2021
            • 39

            #6
            Originally posted by rabii

            on the send task you can just make sure that it is sent from (assigned user) the system will track down who is the current assigned user of the contact/account and then will send the email from their email address. hence the flowchart is targeting the contact entity you just need to send it from entity('assignedUser').
            Thanks for response. Do you mean "Related: Assigned User"? Attached is set of (undocumented) choices as presented in UI.

            I don't see where formulas such as entity('assignedUser') are applied.

            btw- there are use cases where the sender (From) is not the owner of the contact or account. Hence the desire to have the Process owned by the user that triggered it.
            For example, sales owns Accounts and contacts. Someone in accounting wants to start a renewal reminder workflow. There are other situations like this.

            Comment

            • item
              Active Community Member
              • Mar 2017
              • 1476

              #7
              Hi,
              if understand.. you use another action.
              my sample is use like print-screen.. and there you can write formula : https://docs.espocrm.com/administrat.../#extemailsend


              If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

              Comment

              • rabii
                Active Community Member
                • Jun 2016
                • 1250

                #8
                Originally posted by qpoint

                Thanks for response. Do you mean "Related: Assigned User"? Attached is set of (undocumented) choices as presented in UI.

                I don't see where formulas such as entity('assignedUser') are applied.

                btw- there are use cases where the sender (From) is not the owner of the contact or account. Hence the desire to have the Process owned by the user that triggered it.
                For example, sales owns Accounts and contacts. Someone in accounting wants to start a renewal reminder workflow. There are other situations like this.
                yes that is what i meant related: assigned user.

                The way it works is that whoever own the contact and trigger the flowchart by meeting the conditions set, the system will use their email address as they are the assigned user for the contact. If i am correct you still have only one assigned user per each contact then whenever you assign that account/contact to a new user if they trigger the flowchart condition then the system will use their email to send the email. Just be careful because sometimes a user might not have an email set up on their profile. It is safe to add a condition to check if the email address of the assigned user exists.
                Rabii
                Web Dev

                Comment

                • qpoint
                  Member
                  • Aug 2021
                  • 39

                  #9
                  Thanks for info, most helpful. Workflow was changed to Related: Assigned User and this behaves as desired. It creates the Process using the owner of the Contact as the assigned user on the Process. This resolves the immediate use case.

                  Good to know about ext\email\send.

                  We still have the use case like the renewal reminder described above, in which non-owners trigger a workflow. This use case is not immediate, so we have some time to figure this out.

                  Comment

                  • rabii
                    Active Community Member
                    • Jun 2016
                    • 1250

                    #10
                    i think for second situation you could use related: Modified By in this case the system will use the user who modified the contact/account to send email using their email address.
                    Rabii
                    Web Dev

                    Comment

                    Working...