- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2014 03:28 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2014 05:25 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2014 05:25 AM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2017 10:40 PM
may I know where this "answer" field is used? is it in boxes (under conditions)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2014 06:32 AM
Just out of curiosity why use an advanced script?
i am assuming you have 2 email notifications here.. one for english and one for french...
why not in the regular conditions just set caller.language is English <or french>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 02:00 AM
Thanks so much for the "en" and "fr" works.
I am unable to use the regular conditions because it does not have the option to select language, hence the use of advanced conditons