cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
3581
Views
10
Helpful
7
Replies
lharris310
Beginner

CCX Passing variable from one script to another

Hi all,

I have a scenario where the caller is prompted to enter his/her order number in one script and this information in stored in a variable 'strOrderNumber'. The IVR tree presents the callers with options that could route them to another script where upon arrival the caller is immediately asked to enter their Order Number again. I would like to know if there is a way to pass the data stored in the strOrderNumber variable (or the entire variable itself) to another script so that I can check to see if an order number exist prior to requesting that the caller enters their order number again. As usual any help will be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

We'll get you through this, don't worry.  But I like to let people see the solution on their own, versus throwing it in their face.  If this doesn't work for you, because of your learning style, or time constraints, let me know and I'll get right to throwing the solution across the room.

Look at this post I made.  I focused on the small task of creatings a session object, storing something in it, and then retrieving it back out.

I would start off by dragging the Get Session Info step into a script, right click Properties on it, then click Help.  Now read through the documentation on this step and how sessions are used.

Once you've done that, then I think you'll see that you were trying to store the value as the session mapping, as opposed to storing it within the session object.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

View solution in original post

7 REPLIES 7
Anthony Holloway
Cisco Employee

My choice for this solution would be to leverage the Session object of the contact and store the variable/value in there.

I have commented once or twice on using Sessions within scripts.  See if these can help you out.  And if not, just post back here with any questions you have.

Happy scripting!

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Hi Anthony,

First off thanks for replying, I find your POST quite helpful. I reviewed the previous POST you referenced and attempted to implement the logic; however, I don't believe I am doing this corretly (see attached script). Here's a brief summary:

Call Arrives
- Check if existing Session exists
- If no Session exist, Get Contact Info Step associating "Session' attribute to 'current_Session' (Session type) variable
- Request Customer input Order Number (stored as strOrderNumber variable)
- If order number is 'successful', map 'current_Session' variable to 'strOrderNumber' using "Session Mapping Step"
- Redirect call to Orders Application trigger

It is my understanding that based on this configuration, if the call is 'redirected' to another 'Application' trigger, the Check for existing Session (previous_Session == null) should hit the 'false' branch of the 'If' step. Correct"?

I can't seem to get this to work. While debugging I do see that in the attached script 'the current_Session' variable is set as described in the call flow summary above; however, I cannot retrive the value for the strOrderNumber variable once the call is redirected. As always any help you can provide will be greatly appreciated.

We'll get you through this, don't worry.  But I like to let people see the solution on their own, versus throwing it in their face.  If this doesn't work for you, because of your learning style, or time constraints, let me know and I'll get right to throwing the solution across the room.

Look at this post I made.  I focused on the small task of creatings a session object, storing something in it, and then retrieving it back out.

I would start off by dragging the Get Session Info step into a script, right click Properties on it, then click Help.  Now read through the documentation on this step and how sessions are used.

Once you've done that, then I think you'll see that you were trying to store the value as the session mapping, as opposed to storing it within the session object.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

View solution in original post

Hi Anthony,

I reviewed the POST you recommended, and I configured a simple script replicating the logic you used on your sample script; however, I cannot get the Session to return a value (I keep receiving a 'null' value). Can you take a look a the sample script I configured to see where I am going wrong?

Hi Anthony,

I believe I spoke too soon, I was able to get it to work once I populated the Set Session Info Step 'Context' tab attributes. Now I'll try to see if i can get the data to appear in the other script after the call is redirected.

Sweet.  Glad to hear you worked it out.  Let me know how it goes.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Hi Anthony,

My UCCX Script scenario is explained below,

1) Supervisor of Call center call a trigger number(script 1) to set call center(CC) is Open or Close with variable value 1 or 0 respectively via DTMF input.

2) Customer calls another busines trigger number (script 2). This script 2 should initially check the variable value 1 (CC open) or 0 (CC close) from the script 1 and process script 2 accordingly.

 

How to pass this script 1 variable value set by CC Supervisor to script 2 globally?

(Tried Get Session variable, but value is valid till the call to script 1 is live. After the call hung up in script 1, Session value becomes NULL). What i am expecting is, is there any global variable that can be used to set CC open or Close, so that any script in uccx can read and process that variable value at any time irrespective of call to the script 1 is live or end?

Create
Recognize Your Peers
Content for Community-Ad