Finding the parent type in BPM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MatLudlam
    Senior Member
    • Aug 2016
    • 288

    Finding the parent type in BPM

    Hi I am trying to build a BPM workflow that does the following (basically sending a breakup email to someone who is not responding):
    • Looks for tasks of that meet a specific criteria (easy)
    • Sends the customers related to those tasks an email (the problem)
    • Tags the task as being done (easy)
    The challenge is that the email address is in different places depending on the parent type. If the parent is a "Lead" then it is an address on the Lead, if it is an "Opportunity" the email is in a different place.

    How do I work out in BPM what the parent type is, so that I can test for it, and pick up the right data?

    Thoughts, help advice etc. welcome.
  • yuri
    Member
    • Mar 2014
    • 8669

    #2
    Hi Mat,

    You can use a diverging gateway https://github.com/espocrm/documenta...lusive-gateway
    Depending on conditions (defined with formula in the gateway parameters: parentType == 'Lead') it will direct the flow to 2 different Send Email tasks.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • MatLudlam
      Senior Member
      • Aug 2016
      • 288

      #3
      Awsome, thanks.

      Is "parentType" documented anywhere? It seems that there are lots of variables used by the system like this that it would be great to know about.

      Thanks

      Comment

      • yuri
        Member
        • Mar 2014
        • 8669

        #4


        parent is a system field name (can be obtained from Administration > Entity Manager).
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • MatLudlam
          Senior Member
          • Aug 2016
          • 288

          #5
          Ah thanks. I didn't know this existed, much more details than https://www.espocrm.com/documentatio...ation/formula/ which is what I usually use.

          Comment

          • Jessica48
            Junior Member
            • Dec 2019
            • 1

            #6
            It seems that there are lots of variables used by the system like this that it would be great to know about.







            dgcustomerfirst
            Last edited by Jessica48; 12-19-2019, 04:32 AM.

            Comment

            Working...