13 Sub-processes 13.1 Sub-processes: Configuration and Usage Modes Subprocesses are particular types of processes that can be called within other processes defined as “parent”. To proceed with their configuration, you must create a process by inserting the entry “when the subprocess is launched” in the initial condition (Figure 1) In the “Entity” field it will not be possible to select any module, as the instance defined in the “parent” process will be inherited. Figure 1 In order to configure the rest of the Tasks/Action Tasks defined in the flowchart (and therefore be able to use all the data of the "parent" process), you must first call the subprocess within the "parent" process using the following procedure: 1) Define a Task within the flowchart of the parent process (Figure 2) Figure 2 2) Select the "Sub process (collapsed)" item from the available options by clicking on the wrench symbol (Figure 3 and 4) Figure 3 Figure 4 NOTE: if you configure a subprocess in a version PREVIOUS to 24.08, after each "Sub process (collapsed)" Task configured in the "parent" process, you must insert a subsequent Task that allows the "parent" process to interrupt its flow until the called subprocess has finished its execution (Figure 5) Instead, from version 24.08 onwards the system will automatically manage the interruption and resumption of the flow of the "parent" process. Figure 5 3) Access the Task in configuration mode and select the subprocess to involve (Figure 6) NOTE: even if in versions prior to 24.08 the "parent" processes will also be visible in this screen, if selected they will not produce any result, this is because only the subprocesses can be selected. Figure 6 At this point, within the subprocess it will be possible to exploit all the data of the instances of the modules involved in the "parent" process (Figure 7) Figure 7 Due to a structural technical limitation of the system, it is NOT possible to call the same subprocess multiple times within a "parent" process. However, it is possible to circumvent this limitation by composing a flowchart that allows the process to go back and re-execute the "Sub process (collapsed)" type Task in which the involved subprocess is called (Figure 8). Figure 8  13.2 Example: Opportunity Management Process Configuration Main Process: Opportunity Management Process The SubProcess task is used to call other processes (subprocesses) and therefore simplify the logic of the main process. In the case proposed below there are 2 SubProcesses: 1st Send a summary email to the assignee and create reminder events assigned to the same user. 2nd Create a pre-filled Quote (only if the previous conditions are true) and send it via email also updating the status of the Opportunity. The screenshot shows the configured process. The following process is activated when a new Opportunity is created and follows the flow for a possible reassignment and sales stage update. To activate it, check the box “active” once the diagram and configuration are complete Here on the side, the first task has been filled in, which represents the initial condition to start the process. Therefore, the linked entity “Opportunity” is selected and on When to run the check “at creation”. A Group of conditions is then specified to actually start the process, in this case that the Sales Stage is different from those indicated (“In Prospect”, “Qualification”, “In Estimate”) This task represents the call to another process (subprocess), which inside it executes its own execution flow. Therefore, it is necessary to choose which one to call from the proposed list. Inside it there will be a Task for sending emails to inform the opening of a new Opportunity and the creation of 2 reminders, one 5 days before the deadline, the other 3. This task represents a check on the status of the opportunity (Sales Stage). The possible cases of the values ​​to be managed are therefore defined. In this case, it is verified whether the value of this field has changed in one of these: - In Perspective - To be Analyzed - Perception Analysis - Proposal / Price Estimate - Negotiation / Review - Proposed value - Decision-making power OR - Closed WON - Closed LOST This task represents an Exclusive Gateway, which defines the possible flows based on the previously set conditions. In this case, if the Sales Stage is one of those described previously (In Prospect, To be Analyzed, Perception Analysis, Price Proposal/Estimate, Negotiation/Revision, Value Proposed, Decision-making Power), it continues to the next task called “Request for change of assignee”. Otherwise, if it is equal to “Closed WON” or “Closed LOST”, the execution continues towards the “Send Summary Email” Task. This task uses the so-called “ProcessHelper” which interfaces with the user and requires, as already defined, manual intervention. The “Show popup in the linked entity” box is flagged to make a window (dynamic form) appear with a set of read-only data as a summary and a user field from which it is possible to select the new assignee and a Button type field to change the value of the “Confirm” picklist. You must then confirm to proceed This Task verifies the ProcessHelper data. As already mentioned, a dynamic form displays summary fields and a confirmation picklist (YES/NO) for the new re-assignment. Therefore, the confirmation field of the Dynamic Form is checked to verify that it has been set to “YES OR “NO”. At this point, Exclusive Gateway, we assign the previously configured roads based on the response given in the Dynamic Form. If the user has confirmed (YES) proceeds with the reassignment of the Opportunity, otherwise (NO) we proceed directly to the Status control of the latter (Sales Stage). This task performs an update action. The previous user selected via the dynamic form is now set among the attributes of the opportunity in question. Therefore, a NEW ACTION is added - Update entity. Select the Opportunity entity and modify the Assigned to field by taking the reference of the field present in the Dynamic Form, in our case "New Assignee". This task represents the sending of an information email to the new assignee of the Opportunity. This will then receive a small summary of the data relating to the latter. The main fields sender, recipient, subject and body, necessary for sending the email, are then filled in. This task represents a second check on the opportunity status (Sales Stage). The possible cases of the values ​​to be managed are then defined. In this case, it is checked whether the sales stage is equal to “Proposal Quote/Price” or not. If equal to this, it continues with the call to the “Pre-filled Quote” Sub-Process, otherwise it continues directly to the “Send Summary Email” Task. This task represents a further Exclusive Gateway, which defines the possible flows based on the previously set conditions. In this case, if the Sales Stage is “Estimate/Price Proposal”, it continues to the next task as mentioned, that is, to the call of the “Pre-filled Estimate” sub-process. Otherwise, it continues with sending emails. This task is a call to another sub-process, which will create a quote and when it is in the “Reviewed” state, will send the summary email and update the Sales Stage of the Opportunity. This task performs a control action on the Sales Stage of the Opportunity, to verify the complete and entire execution of the Sub-Process. If this is equal to “Negotiation/Review”, the flow continues with the next Task of sending the Final Summary email. This task represents the last action, that is, a summary email to inform the assignee about the data relating to the Opportunity. Therefore, click on NEW ACTION - Email Sending and insert the necessary fields. After this Task, you reach the end of the process, therefore towards the End Event. As mentioned, the process ends its execution at this node, i.e. the End Event. The “Opportunity” entity is connected and the status is set to “Terminated”. Sub-Process:  Opportunity Expiration The Task represented is the initial Task for the launch of the Sub-Process. In fact, no entity is selected and in “When to execute the check” “at the launch of the sub-process” is selected. In this Task, the email sending is configured for the Opportunity assignee. A NEW ACTION is then configured - Email sending. The main information is entered (sender, recipient, subject, body, ...). In the task described here on the side we see the creation of a reminder, or a calendar Event in view of the expected Deadline. In fact, this is planned 5 days from the “Expected Closing Date” entered in the Opportunity. Therefore, the various fields are filled in as desired and 5 days are subtracted from the indicated date. In this task we have the creation of a second reminder, that is, a Calendar Event in view of the Actual Deadline. This, unlike the first, is planned 3 days from the “Actual Closing Date” entered in the Opportunity. Therefore, the various fields are filled in as desired and 3 days are subtracted from the indicated date. Sub-Process: Pre-filled Quote As in the previous Subprocess, also in this case we find the initial Task for the start. In fact, no entity is selected and on “When to execute the check” we select “at the start of the subprocess”. In this Task, a NEW ACTION - Create Entity is configured, selecting the “Quotes” module, so as to create a pre-filled one. The title of the action is entered, the various fields also relating the Opportunity in question and setting the expiry date in 30 days. At this point the Subprocess blocks the execution flow on the Task described below. In fact, it waits for the Preventive Stage of the previously created entity (in the “created” state) to pass to “Revised”. Only when this condition is true will the process continue. Once the value “Revised” is set as the Preventive Stage, the process continues and sends the details of this via email to the address of the related entity (Company or Contact) and to the assignee in copy. Once the Quote has been created, checked that the Status has changed to “Revised” and the email has been sent, we update the Sales Stage of the Opportunity to “Negotiation/Revision”. At this point the execution of the Sub-process ends. 13.3 Example: Potential Management Process Activation PROCESS ACTIVATION At this point we have finished configuring the process and its sub-processes. Therefore, let's proceed with checking that they are working correctly. We then enter the creation of a New Opportunity. In this case, we set the Sales Stage to "Open". Once the Opportunity is saved, the assignee will receive an email summarizing the data. In addition, there will already be 2 related events, namely the deadlines, one 5 days from the Expected Closing Date and the other 3 days from the Actual End Date. At this point the process has stopped and waits for the Sales Stage to change value to one of those previously configured. In this case we set the value “Quote Proposal/Price”. Once saved, a popup will appear to the assignee of the Opportunity with a summary of the read-only data and the possibility of reassigning it to another user. Once the desired user has been selected, select the value “YES” from the picklist (you can click the “CONFIRM/CANCEL ASSIGNMENT” button to change the value of the same picklist to YES/NO) and proceed by clicking on SAVE. Once confirmed (selected the value “YES” in the popup, the assignee of the Opportunity is updated and will receive an email with the data and confirmation of acceptance. From the reports we can already see that the email has been related and the estimate has been created, as the Sales Stage was “Proposal/Estimate Price”. By analyzing the report we can see the details of the created Estimate. At this point, we can go into detail, modify the data, insert products and change the Estimate stage to “Revised”. The process continues the flow and sends the email to the assignee containing the data of the Quote itself. In addition, the Sales Stage of the Opportunity is set to “Negotiation/Review”. At this point, the assignee receives a final summary email with all the data of the Opportunity. From the “Process Graph” tab we can see that the process has finished the execution flow.