Sending Emails to Organization Units (system administration objects) from Email Process Element

How can I send an email from a business process to a group of recipients who are in the same Organizational Unit?

For example, highlighted in the picture below I tried to make a process that sent an email to the contacts in the organizational role "Strategic Partner Support", however when the process ran, no email was sent. So instead I had to add individual contacts, but I am trying to avoid needing to update individual contacts in this process element as our employees come and go or change roles.

I also tried using a system setting, and added a organizational role to that system setting, but that did not send an email either. Can anyone advise on the best way to do this?

 

Like 0

Like

2 comments

Unfortunately, there is no opportunity to send an email to the organizational role via a business process element "Send email".

However the functionality can be implemented. An idea is to use a script task element in order to select all contact emails which are included in the role. They are selected from the database via EntitySchemaQuery. Then join all selected emails into a string using ";" as separator. After that use the newly built string of emails as an email for sending.

The basic business process "Send email to case group" works in the same way. Please feel free to use the business process as an example. I recommend you to copy the process, change conditions for launching according to your purpose and change an email template. Pay attention to the script task element "Prepare Recipient Emails".

 

Show all comments