cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2934
Views
15
Helpful
10
Replies

Persistent Language between UCCX Scripts

jayflesher
Level 1
Level 1

I have a situation where we have an increasing amount of scripts that present a caller with the option to choose a language (either English or Spanish) and want to keep the language persistent between the scripts and not prompt the user to select their language every time.

Currently, we are keeping the language persistent between these scripts using the call subflow with a language input mapping but this becomes problematic as I have to update every script with a call subflow when I make a change to the called script. Is there a different, preferably easier way to do this?

1 Accepted Solution

Accepted Solutions

Okay, I took some time to run these scripts and came to the realization, that yup--you are going to need to use Session Set/Get steps to make this work.  I had to refresh my memory on how I did this previously--and for some reason, I thought the Contact Info attributes were persistent in themselves...  This was incorrect on my part. 

I modified your scripts a bit to work in my test environment and got this working as desired.

(I removed your user.layout attribute on the Set Enterprise step, because I don't have your finesse/workflows...etc).  I also removed and added tags to assist with interactive debugging.

For the most part, it's the same.  I did make some modifications to the resource selection and queuing, as there were some concerns there.

Let me know if this helps.

-Sean

View solution in original post

10 Replies 10

Anthony Holloway
Cisco Employee
Cisco Employee

Is your biggest issue, knowing whether or not you've already asked the caller for their language preference?

 

If so, your best friend is going to be Sessions.  Have you worked with Sessions before?

I have worked very little with sessions. The one time I did, I ended up getting the language stuck to the selection of the last caller. I attached this failed attempt.

 

I initially tried to use the following video on Youtube from CiscoVoiceDude to help with understanding sessions, and I must have implemented it wrong. https://www.youtube.com/watch?v=9HXivETA8bE

Without knowing what exactly you are having difficulties with regarding "Persistent Language" between scripts, I would like to offer some assistance.

I have had considerable success working with multi-language environments.  I do not think you necessarily need to transfer a "variable" with a stored language attribute from script to script, but rather, learn to leverage the use of the Contact Language Attribute.  Your script if written properly can evaluate, and re-evaluate, this if it is set when the contact selects their language preference--use a "Set Contact Info" step for the Language attribute.  After being set, this attribute stays with the Contact as it traverses your applications and sub-flows.  No real need to create Session Mapping (however, this could work as well..).

The UCCX Engine also knows to select recorded prompts from the appropriate Language directory in the Prompt repository, when this is done.  All you have to do is name the prompts with the EXACT same name (and dot wav suffix)--so you only have to write one script..   In a few cases you may need to evaluate the Contact Language attribute to set variables appropriately--and evaluate with custom logic, but you will develop techniques over time to improve consistency and efficiency.

Here is a screen shot of a script that I developed to create Text To Speech in multiple languages (works not just for English and Spanish--but however many Languages you have configured on your UCCX server).

Image:

2019-0723-contLangAttribute.png

 

The power and flexibility in this method lies in using a "Get Contact Info" step for the language attribute (which I usually assign to an internal script variable 'langContact' -- usable for the duration of the time the script is active) and use the logic to evaluate it:

IF langContact.equals(langSelectedAltLangForPrompts) ... TRUE/FALSE ...the sky is the limit from there!

 

...let me know if this looks applicable to what you are trying to resolve.

 

Sincerely,

 

Sean

Thanks for the reply. I have also tried using get contact info and set contact info. If I do a call redirect after setting the language to something other than the default, the get contact info was reverting to the script default (L[en_US]). I was attempting to make it to where if the language is anything other than the default, to skip the request for language selection and move on playing in the contact's selected language.

 

I recreated my original attempt with the get contact info, and it is attached.

Check to see if your Languages configured on your system includes L[es_US] and not another Spanish Language variant like L[es_MX] etc...  You need use the one configured on your system.

 

Initially when I looked at this, I thought you were setting things to English (L[en_US] -- which was not the case). 

Let me know what is configured.

 

-Sean

Our system includes both L[en_US] and L[es_US]. L[en_US] is our trigger default. 

Okay, I took some time to run these scripts and came to the realization, that yup--you are going to need to use Session Set/Get steps to make this work.  I had to refresh my memory on how I did this previously--and for some reason, I thought the Contact Info attributes were persistent in themselves...  This was incorrect on my part. 

I modified your scripts a bit to work in my test environment and got this working as desired.

(I removed your user.layout attribute on the Set Enterprise step, because I don't have your finesse/workflows...etc).  I also removed and added tags to assist with interactive debugging.

For the most part, it's the same.  I did make some modifications to the resource selection and queuing, as there were some concerns there.

Let me know if this helps.

-Sean

I reviewed the revised scripts you sent. I see how you did the sessions and realize what I may have been doing wrong in my original attempt with the sessions. however, I noticed you set the connect failed step to go back to SELECT_RESOURCE; what does this do differently than putting the caller into the queue loop?

 

For setting callers as handled when successfully transferred, I figured it would only matter in the current script and becomes unhandled again after the transfer as the other contact info is not persistent between scripts. I did a bit of digging and found a note on the Call Redirect Step page about setting calls as handled before transferring to another application. https://developer.cisco.com/docs/contact-center-express/#!call-redirect-step/call-redirect-step

Thanks for the reply.  ...and also, thank you for the explanation and link on "marking the contact as handled" after a successful redirect.  This was a good refresher for me.  I actually do use this.  I just am very selective about when and where.  In our environment, we are very cautious about marking a call as handled.  In this example, I agree, it would be appropriate, because this is what you designed the script to do--transfer a call. 

Regarding the explanation on why I changed the location of the "Goto" in the Failed branch of the connect step; short answer, this is a Cisco Best Practice, I learned.

This is my take on why it is done this way...  (Just out of curiosity, was your original script4 working as desired using the steps and target you had selected?  I actually didn't even try it...).

By definition the Select Resource step and Connect Steps, states:

2019-0725-selectResourceOpts.PNG


https://developer.cisco.com/docs/contact-center-express/#!select-resource-step/select-resource-step

 

2019-0725-connectStep.PNG

https://developer.cisco.com/docs/contact-center-express/#!connect-step/connect-step

 

In your original original script I noticed:

2019-0725-concern2.png

In the above Select Resource step you have the "Connect" parameter set to "Yes" and by definition, it is my understanding in this scenario, you do not need to use a "Connect Step" the output branch for this is, the agent is connected.

 

2019-0725-corrected2.png

When using the "Connect - No" parameter in the Select Resource step, this allows you to place additional step items under the "Selected" output branch in sequence prior to adding the "Connect" step, where the resource and call is then connected.  As in the image above, a Set Enterprise step is placed so that Peripheral and Expanded Call Variables can be made available to Finesse from the Enterprise Data Manager (or even other logic can be added).  In these items, I also have learned to make sure that the Timeout setting is at least 1 second less than the Ring No Answer timer on the CUCM Line Setting for the agent device.  You want to make sure that RMCM maintains control of the call in a Return on No Answer (RONA) scenario.  I noticed you had yours set at 20 seconds.  That equates to nearly 5 ring cycles(correct?).  You want to make sure your agent lines are above this...if so; because if the line times-out for RNA on the telephone line on the CUCM side before the timeout period in your UCCX script parameter, strange things can happen in the land of JTAPI and CTI call control for the contact...

Which leads to the final explanation to your question: "Why 'Goto' Select Resource instead of Queue?"  ...because you want the system to make sure it retains control of the contact (caller in this case).  In the case of a "Failed" output branch on the "Connect" step--you want the system to first check and re-select a new agent resource; and then if one is not available, you want the system to place the contact back in the queue.  Remember, queuing happens when an agent is not available.  Essentially, we can't just place a caller in queue without first attempting to select and find an available resource.  If no resource available--queue the caller.  So that logic is what I was concerned about in your original step(s). 

Did you test this in the interactive debugger?  When the call is placed in queue after a failed branch output, does the next available agent answer and able to connect?  ...just curious.

I wish for you happy scripting...

-Sean

Thank you for the explanation. You have helped me figure some things out, and it makes sense to keep trying to find an available resource until none are available before queuing.

 

For your question about testing my script, the next agent does get selected after failing as expected. My system was initially put in by a vendor who wrote the first few this way. Being new I just carbon copied most of the parts, and now all of the scripts have the Select Resource Step set the same way as it is in my original Script. My system's RNA is the default 24 seconds.