Inbound Action: When CC has a Value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:04 AM
I have an inbound action that creates an incident and assigns that incident to a specific group when a specific email address (i.e. email.address@domain.com) is the recipient. The problem is when there is a different email address in the CC in addition to 'email.address@domain.com' in the To field the incident is created, but not assigned to the specified group. Below is the part of the script used to assign the incident.
AJ
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:15 AM
@TStark ,
email.recipients - Contains a comma-separated list of recipient addresses as a plain text string, in the To: box.
Can you try below
if(email.recipients.indexOf('email.address@domain.com')>-1){
current.assignment_group = '------------------------'; //sys_id of the assignment group
current.impact = 1;
current.urgency = 2;
}
Please mark helpful, if this helped.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:21 AM - edited 12-22-2023 08:26 AM
@TStark : Could you try replacing '==' with 'indexOf' in your if condition, as in this case recipients hold multiple email addresses.
email.recipients.indexOf('email.address@domain.com')>-1
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.