I would like to use the value of a request field to determine which security group to send the email notification to at a given workflow step. We have multiple security groups that may or may not have to be notified at a step depending on that field.
The way we handled it, was to have the user choose the group as an additional field within the request. We used 'Assigned To Group', and then based off their choice the appropriate notifications would go to the people within that group. When I put in a HP case for this, they never came up with an answer, so that was our resolution.
Hello Linda. You can use any custom field you added to the request type or the request header type. All you need is its token name. The field should use one of the standard validations for security groups like 'CRT - Assigned Group - Enabled'; you can also configure the field as multi-select. In the configuration of the notification add a recipient with the option "Enter a User Defined Token". The token value is one of the following: [REQ.P.TOKENNAME] [REQD.P.TOKENNAME] [REQ.VP.TOKENNAME] [REQD.VP.TOKENNAME]
Chose [REQD... if the custom field is defined in the request type or [REQ... if it is defined in the request type header. Then use .P. to work with the hidden values of the field (that would be the security group ids) or use .VP. to use the visible value (security group names). In any case make sure the suitable option in 'Recipient Type' is chosen.
Thanks everyone for your input. I ended up using a subworkflow at the notification point, that uses an automatic data directed routing step to choose the correct team to get the notification. Then flows out to four separate data directed notify steps based on the output. I think from the last two answers, I could have simplified this!
Hi - regarding Sascha's answer - this seems to be a proper solution for that however I can't get it working: Data: Request type field token: ITBA Field validation: CRT - Assigned To â Enabled Notification: - Type: User defined token - User defined token: REQD.P.ITBA - Recipient Type: Username
I got an error in Server Log: EmailNotificationAgent: querynotificationImmediateOnly: ERROR: parent without recipients EmailNotificationAgent: querynotificationImmediateOnly: ERROR: parent ID = 30061
Other notifications work perfectly. I just wonder whether using token which value is set to user First Name + Last Name (not username) should be a Username recipient type. If so - how to obtain username (or email) from this validation?
1)create a request type rule that fills a new token with the email address of the user, whenever the user id field is changed. Sql would be like this: select email_address, email_address from KNTA_USERS_V where user_id = '[REQD.P.TOKEN NAME]' -->whatever token holds the user id
2)Create a field on the request type that is not displayed that holds this email address (or display if you wish)
3)Create a notification using this token, where the recipient type is Email Address.