How do I notify team members of a potential action to-do if they are not assigned to the action?

Issue

How do I notify team members of a potential action to-do if they are not assigned to the action?

Background

Since a WorkflowGen action can only be assigned to one user at a time, there are options to automatically target the assigned user when sending out a notification. When configuring an additional action notification you can do this by selecting the Action assignee recipient option. No matter which selected event is used when configuring an additional notification, selecting Action assignee will always target the current assigned user.

Solution

In some cases an action is not assigned to a specific user but is instead to be handled by a team using the Self-Service assignment method. In this case, even though the action is technically not assigned to a user, WorkflowGen will automatically interpret the Action assignee recipient option to mean all team members, and therefore all team members will receive the email*.

When sending an Automatic: To do email and the action is assigned, the recipient will receive an email with a link to directly launch the action from the email. If the same event (To do) is used when sending an additional notification to a team (with the action not assigned), the team will receive a similar default email, but since the action is not assigned to a user, the link to directly launch the action will not be present.

*The number of users receiving this email will be limited to the number provided in the Maximum number of users to notify setting, under User notification on the Portal tab in the Configuration Panel.

Hi @eddy.daouk,
Is it possible to send “action closed” notification to Requester Manager, if Manager is not involved in the process? I had idea to map in manager email in the initial form and create data element of it. Unfortunately, only manager information that can be used from “macro list” is first, last name and username.

Thank you
Marina

Hi @marinam,

You can use a query similar to the following post to retrieve the Manager’s email:

Instead of SELECT [LASTNAME],[FIRSTNAME] put SELECT [EMAIL]

Eddy.

Hi @eddy.daouk,
I implemented the code you listed above and changed firstname, lastname to email.
But now I am receiving the following error:


Could you please help me with this?
Thank you,
Marina

Hi @marinam,

The code needs to be inside of a method (for example inside the PageLoad() method)
From what I’m seeing this code is put on the class level which is not supported in C#.

Regards,
Eddy.

@eddy.daouk Sorry for following up on this question multiple times. Unfortunately, we do not have any Dev type resources in our team, so it is really hard to follow those code instructions. This is what we have at this moment:

    string email;
    string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MainDbSource"].ToString();
string queryString = "SELECT [EMAIL], FROM [USERS] WHERE USERNAME = '" + USERNAME + "'";

using(System.Data.SqlClient.SqlConnection sqlConnection = new System.Data.SqlClient.SqlConnection(connectionString))
{
System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(queryString, sqlConnection);
sqlConnection.Open();
using (System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read()){
email = reader.GetString(0);
}
}

How should I update the code to refer to PageLoad method? Thank you a lot!