Recently I fielded a question on managing prompts in Cisco's Unified Contact Center Express (UCCX) using CRS scripts. The person posing the question knew that they needed to use the Upload prompt script step but wasn't sure how to authenticate a user to the system. This process is pretty straight forward, but there are a few steps involved. I figured I would do a quick blog/"how to". Why not? Right?
As with most things, I am sure there are multiple ways to accomplish this task. This just happens to be the approach I take. The context for the following example is based on the need to manage prompts remotely. For every CCX solution NetCraftsmen deploys, we add a "prompt changer" application.
At a high level, our "prompt changer" application does the following:
- Accepts the call
- Authenticates the user
- Allows the user to manage dynamic/"live" prompts (i.e. instantly active prompts)
- Allows the user to pre-record prompts by a specific prompt ID (for later upload)
- Allows the user to open/close a call center
The following example focuses on the second step: User Authentication.
The example uses the following variables:
- intRetryCnt: (integer) Used to control the number of times we ask the caller to authenticate themselves
- strUserExtension: (string) Used to store the agent extension as provided by the caller
- usrWhoAmI: (user) Stores the user object retrieved from CUCM
- blnSupervisor: (boolean) Flagged true if the user object is a CCX supervisor
- strCCMUserID: (string) User ID for the CUCM user held in usrWhoAmI
- strUserPIN: (string) User PIN as defined in CUCM (provided by the caller)
Our first task is to initialize the variable intRetryCnt to 0 and then play a prompt to provide basic instructions for authenticating to the system.
Next, we show the simplistic loop control. We have a label "AUTHENTICATE_LOOP" and then we increment the retry counter, do a quick check, and if the counter is greater than 3 we send the caller to the script termination routine.
First things first. Since the user is using a telephone to call into the script, it makes sense to make it easier on the caller by asking them for their CCX agent extension. The agent extension is programmed in CUCM as "ICD Extension" or "IPCCX Extension". The "Get Digit String" step basically plays a prompt with instructions and defines digit filters like length and termination string.
If we collect digits successfully, we move to step 2.
We use the "Get User" step to tell the CRS scripting engine to retrieve the user object associated with the agent extension that the user provided. If the user provided an erroneous agent extension, then the "Unsuccessful" branch is engaged. Otherwise, we have successfully grabbed the user object and wrote it to the usrWhoAmI variable. Proceed to step 3.
This step is optional. I just like to restrict contact center control to designated supervisors. You could allow it so that anyone can manage the contact center. I don't advise it, but you could. Anyway, all we are doing is checking an attribute tied to the user object stored in usrWhoAmI. Specifically, we are asking if the user is a CCX supervisor and storing the value in blnSupervisor.
Again, we are extracting an attribute from the user object stored in usrWhoAmI. In this case, we are grabbing the end user ID. This is the user ID as configured in CUCM (e.g. bbell). This is an attribute of type string, so we push it into a string variable: strCUCMUserID.
We check to see if the user object is a supervisor. If it is then we proceed. We are now going to prompt the caller to enter their Personal Identification Number (PIN). This is the PIN as defined in CUCM. Similar to the procedure in Step 1, we are using "Get Digit String" to store the PIN. We push this into a string variable: strUserPIN.
OK, all previous steps are needed to reach this point. We are going to take the user ID stored in strCUCMUserID and the PIN stored in strUserPIN and authenticate the user against CUCM. If the PIN and User ID match up with what is stored in CUCM, then we are good to go and allow the caller to manage the prompts and/or contact center.
Unsuccessful and Timeout Steps:
Many of the steps we have provided have a branch for handling exceptions (e.g. Unsuccessful or Timeout). Each of these has a similar structure:
- Play a prompt to user to clue them in on what they did or didn't do
- Send the caller back to AUTHENTICATE_LOOP (which will increment the counter, and see if we should try this again)
That's it, now you have a method to authenticate users before they destroy your contact center. Thanks for reading!