Advanced Conditions for Email notifications.

dhrupal3
Kilo Explorer

Hi all,

 

I am trying to configure advanced conditions for email notification. I have email notfications for when an incident is opened and resolved, for each of them I have written them in french and englsih. So I have opened incidents email notifincations in french and english and the same for resolved.

 

What I am trying to do is read the language setting of the caller and send the correct language set of the email out to the user. This is the code I have used::

 

if (current.caller_id.preferred_language == French){
 answer = true;   
}

 

On the other email for english i have simply replaced Frech with english. When I complete the action ie. open a call I seem to get both emails in french and english.

 

Can anoyone help ?

 

Thanks

 

Dhrupal

1 ACCEPTED SOLUTION

Matthew Swarts
Tera Guru

Hi Dhrupal,



The language field for users is a choice list on our instance so I'm assuming it is on yours, as well.   Try referencing the value and not the label.   "en" is English on our instance and "fr" is French.



if (current.caller_id.preferred_language == "fr"){


answer = true;


}


View solution in original post

12 REPLIES 12

interesting in my sandbox.. i just went to a notification on the incident table.. and added one for caller.language



when you just go to a list of users can you filter them by language?


Yes — I can.



Weird right?


i would open a hi ticket if when you expand the caller fields you dont' see language and language is a column in the user table... time to have them take a peek and see why it ain't there.