How to add a specific user to CC_List in a ticket?
How can I add a specific email address to the CC_LIST when a ticket is created? I only know how to set that person to the CC_LIST which removes anyone else that was already in the list.
Here is what my Update query looks like but this is just replacing the entire list. I need to just add 'user@abc.com' to the existing list.
update HD_TICKET
set HD_TICKET.CC_LIST = 'user@abc.com'
where
(HD_TICKET.ID in (<TICKET_IDS>))
Answers (1)
Top Answer
Your UPDATE statement should look something like:
update HD_TICKET
set HD_TICKET.CC_LIST = CONCAT(HD_TICKET.CC_LIST,', user@abc.com')
where
(HD_TICKET.ID in (<TICKET_IDS>))
I can't recall off the top of my head what the CC_LIST field uses as a delimiter for multiple email addresses (space, comma, semicolon), but make sure to include that inside the quotes, too (I used comma in my example)
Comments:
-
The delimiter is comma - UntchV 8 years ago
-
Thanks, works great! - totero21 8 years ago
-
Thank you for this! I had the same issue with adding an email address to the existing CC list. Until now, I had to create separate rules and play with their priority but it was limited. - rbaranowicz 4 years ago
-
I have a follow-up question. It looks like the 'user@abc.com' is added every time the ticket is saved. This means the CC list is full of entries for the same email address if the ticket is saved multiple times. Is there a way to prevent that? Thank you - rbaranowicz 4 years ago
-
Try adding to the WHERE statement, something like "where (HD_TICKET.ID in (<TICKET_IDS>)) and (HD_TICKET.CC_LIST NOT LIKE '%user@abc.com%')" - BHC-Austin 4 years ago
-
Worked perfectly. I was worries that when CC is empty, and the address is added, it is added as
", user@abc.com"
The comma goes away after the 2nd Save and it doesn't seem to impact the emails. Thanks again and stay safe. - rbaranowicz 4 years ago
Are you looking to have someone be added to the CC list of a ticket based upon the Category of ticket? If so that can be done in Queue Configuration. - MAXintosh 8 years ago