Workflow or BPM possibilities?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bradaks
    Active Community Member
    • Aug 2017
    • 251

    Workflow or BPM possibilities?

    Hello,

    We have a relationship that allows us to put several contacts in an entity. Is there a way to create a workflow or BPM to create another entity based on all of the contacts selected?

    For example.. We have an Opportunity with Contact 1, Contact 2, and Contact 3. When the opportunity moves from Prospecting to Closed Won the workflow kicks in and creates three different Leads. Each lead is created specifically for Contact 1, 2, and 3 individually. Is there a way to accomplish this?
  • yuri
    Member
    • Mar 2014
    • 8444

    #2
    Hi,

    1. Workflow rule for Opportunity that updates related contacts. Set some status field to a specific value.
    2. Workflow rule for contact that gets triggered when status field gets changed to the specific and creates lead.
    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

    • bradaks
      Active Community Member
      • Aug 2017
      • 251

      #3
      Yuri,

      Thanks for the response. That makes a lot of sense!! Let me take it one step further. What if, instead of creating a Lead I want it to create a payment for each Contact that was listed? The payment-contact is a many-to-many relationship?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8444

        #4
        You can create a payment from contact. Both Create Record and Create Related Record actions allow it.
        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

        • bradaks
          Active Community Member
          • Aug 2017
          • 251

          #5
          Hello again,

          The workflow works great in creating one related payment but how can I make it create all the related payments if multiple contacts are selected?
          Last edited by bradaks; 10-10-2018, 03:16 PM.

          Comment

          • bradaks
            Active Community Member
            • Aug 2017
            • 251

            #6
            Here is the real problem I am having.. We have a custom entity that can list many contacts. When the entity status is marked "Complete" it will make a payment in the system for each of the contacts:


            Comment

            • tanya
              Senior Member
              • Jun 2014
              • 4308

              #7
              If you want to create one payment with several contacts, you can create a rule for Opportunity, use action Create Record (or Create Related Record, if you have relationship between Payment and Opportunity) (and don't need created before Leads) and copy needed fields.
              You can map fields with select boxes or with formula entity\addLinkMultipleId('contacts', opportunity.contactsIds);
              https://www.espocrm.com/documentatio...linkmultipleid

              Comment

              Working...