Assigning the tickets to groups from alerts

Renu4
Tera Contributor

Hello All,

 

I have a question regarding assigning the tickets based on the code in Subject line of the assignment group.

Situation: We have alerts coming from our firewall support team.

These are alert emails.In the subject line of the email we have the location names mentioned.

I want to extract these location codes and asign the tickets to the local Servicedesk.

Eg: if ticket is from india then assign it to it_servicedesk india

if it is china the IT_Servicedesk_China etc.

Now i have written an inbound email which creates a ticket but does not assign the ticket to the groups.

Help would be appreciated.

 

Thanks in advance,

Renu.

6 REPLIES 6

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @Renu4 ,

 

You can try the below code in your inbound email, iam not sure how many codes and assigenment logics you have to check. You can adjust the below code to add more 'else if' condition based on your need.

 

if((email.subject.indexOf('put code u want here') != -1){

current.assignment_group = 'sys_id' // use sys_id of the group or call sys_properties 
} else if ((email.subject.indexOf('put code u want here') != -1){

current.assignment_group = 'sys_id' // use sys_id of the group or call sys_properties 
} ((email.subject.indexOf('put code u want here') != -1){

current.assignment_group = 'sys_id' // use sys_id of the group or call sys_properties 
}

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Hi Sohail,

Could you check my conditions and code below and correct me ?