Best practice in configuring Outbound email during assignment creation
I would like to know the best practice in configuring the outbound email once assignment gets created.
Below is the requirement :
1. Once Requestor submits the application, the case will be routed to Manager for approval. We need to send an email notification to Manager and CC-Requestor.
2. Once Manager Approves, the case will be routed to Senior Manager for approval. We need to send an email notification to Senior Manager and CC-Requestor and Manager. Like this we have multiple flows close to 5.
In this scenario i used to follow below scenarios to achieve this requirement :
1. Use SendEmail shape before Assignment shape in the respective flows and pass the necessary parameters.
2. Create a centralized activity of type Notify and call the respective OOTB activitites(Call CorrNew or SendSimpleEmail or SendEmailNotifications) with in the activity and pass the necessary params as per the requirement. Based on the status of the case, capture the params and pass it to the OOTB activities (Call CorrNew or SendSimpleEmail or SendEmailNotifications). Call the Centralized activity under post processing actions of the Flow Action of Requestor & Manager. This centralized activity can also be called from Assignment shape -> properties -> Notifications.
So now, i would like to understand which one from the above two falls under best practice.
I am strongly feeling that having a centralized activity(point 2) will be more useful for maintenance and readability as entire email send functionality will be there in one activity for the whole case type and can delegate this rule(if required).
Point 1 -> needs to be configured in all the flows and maintenance can be a overhead.
Kindly shed some light on these and let me know if there is any other best practice apart from above two.
You can try creating a declare trigger (which gets triggered when pystatuswork changes). A generic activity can be called on the declare trigger. In the activity, you can call a decision table to map the pystatuswork with To Address,subject, and template. In the generic activity, you can use sendsimpleemail and input the out parameters from the decision table. In this approach, there will be less maintenance overhead because if anything needs to be changed, You can directly change in the decision table. And there is no need to change all the flow actions