Scripting Multi-Lang IVR (with language specific variables)

Hi, I've already asked in CSC forum, but I'd like to try my luck also in here with scripting-reladed forum.

 I've got single-language IVR script which distributes calls into two separate CSQ (services and logistics) based on caller input in IVR menu. Each CSQ contains several agents. There is sub-flow script which is checking if a current day is holiday (similar to Cisco example HolidayCheck.aef)

 

Now I have to expand this script and make it multilangual. Many aspects in the script like dates.xml to check, name of CSQ (each lang have services and logistics), lang for IVR prompts are exactly the same called wav files localized to specific national enviroment in different directories.

My idea is to parse input (IVR or by called number specific to each country) and on this basis set some variable named input_lang (string) with values "en", or "sk" or other). Then set other variables for right localization based on this input_lang variable.

 

I've variables for customization:

input_lang (String) = ""

holiday_datelist (Document) = DOC[]

ivr_lang (Language) = L[]

CSQ_service (String) = ""

CSQ_logistics (String) = ""

 

When I set variable input_lang, for example to "sk" (Slovak), I have other variables defined like:

set holiday_datelist = "DOC[dates-" + input_lang + ".xml]"

set ivr_lang = "L[" + input_lang + "]"

set CSQ_service = "CSQ_servis-" + input_lang

set CSQ_logistics = "CSQ_logistics-" + input_lang

 

But this result into this wierd values (not so wierd, because all of them are "String-like")

holiday_datelist = "DOC[dates-sk.xml]" instead of DOC[dates-sk.xml]

ivr_lang = "L[sk]" instead of L[sk]

etc.. but CSQs names are also strings and results are OK

 

Script halts and throws an exception of unidentified/error value of variable.

 

Is there any way how to re-type variable from string like representation to lang/document like? I think I have to get rid of those quotes in the beginning and end of value! I only want to concatenate variable values from sub strings based on each lang.

 

Or I'm following the bad way and this all have to be done in a different manner?

 

Thanx a lot for any advice!

 

(UCCX Enhanced, version 5.0.2)

reply to "SCRIPTING MULTI-LANG IVR" post

 Hi there,

I know you've asked this long ago now, and probably found a solution, but I'll answer anyway.

I think what you need is define holiday_datelist_path = String, NOT as DOC[]
and then do
holiday_datelist_path = "dates-sk.xml"

Afterwords you can put a "Create File Document" where you put "holiday_datelist_path" on Filename and holiday_datelist to output Document.
This way you sucsessfully open the document you need and parse it into your DOC[] structure which later on you can use in "Get XML Document Data" step.

Hope this helps,

George,

CCIE #19926
http://cciejunk.blogspot.com/

Recommended Reading: