cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3269
Views
10
Helpful
16
Replies

UCCX 11.5 Session data issue

glennmartindell
Level 1
Level 1

Hello,

 

I've seen a number of questions related to this but thought I would try to get some clarification.   I have a script that front ends all my other scripts and does database dips to pull data from a couple of databases.   I store this data into variables within the script.   I then use a Get Session step to create a new session and use a Set Session Info step to store my data from script variables into the session and do a call redirect to my next app/script

 

My 2nd script does a Get Session step (not new) and then a Get Session Info to read my data from the session back into my script variables.   This is working fine and my data is consistent (as far as I can tell).  The problem is that for some calls, I transfer to yet a 3rd script depending on what options the caller pressed or if they have been in queue for too long.   In my 3rd script, again I use a Get Session step (not new) followed by a Get Session Info step to read data from the session into script variables.   Many times, the data I read back into the 3rd script appears to be data from a different (wrong) session and my data is not what I'm expecting.

 

In each script I write my data using CPV's so I can validate and report on everything

 

I read another post where another user was experiencing similar behavior and the recommendation was to use Get and Set Call Contact steps instead of Get and Set Session steps.

 

So I have 2 questions, what is the difference between setting and getting the session info using a call contact step vs using the session steps and secondly, how and why is my session data getting mixed up with data from other calls?   I was always under the impression every call has a unique session associated with it.

 

Thanks in advance,

Glenn

2 Accepted Solutions

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee
What does your first Get Session step (where you create new) look like? And what are the values of the variable(s) your using in that step look like at the time it executes? More than likely, you are using the same Mapping ID for all of your calls.

View solution in original post

No. Use Get Contact Info step in all three scripts. The Get Session step is only useful when you want to create a new session from scratch or find one by a Mapping ID. In your use case the automatically created Session for the triggering contact can should be used instead.

View solution in original post

16 Replies 16

Anthony Holloway
Cisco Employee
Cisco Employee
What does your first Get Session step (where you create new) look like? And what are the values of the variable(s) your using in that step look like at the time it executes? More than likely, you are using the same Mapping ID for all of your calls.

Adding to Anthony’s questions: why are you creating a new session? The Triggering Contact already has one. As long as the Call Redirect is done correctly (eg transfer destination exactly matches the DN of the next Trigger; there is no CUCM translations/manipulation) this session will be the same in subsequent scripts.
If you stick to a manual session creation, I am also curious to see what you’re using for a Mapping ID and how you convey this between scripts.

Hi Jonathan,

 

Call redirects are direct to triggers.   See my reply to Anthony for how I'm using the session

 

Thanks,

Glenn

Hi Anthony and Jonathan, thanks for the replies.   The only reason I'm creating a new session in my initial script, is because I thought that's what I needed to do.   It is important to note that to my knowledge, this is working correctly when I transfer to the 2nd script.   My data only seems to get out of whack when transferring to the 3rd script and I sometimes data from other calls/sessions.

 

In my main script, I create a new Session:

 Create New Session - Initial ScriptCreate New Session - Initial Script

 

 

Then I write variables to the session:

Set Session Variables - Initial ScriptSet Session Variables - Initial Script          In the 2nd or 3rd scripts, I get the session:

Get Session - 2nd or 3rd scriptGet Session - 2nd or 3rd scriptGet Session - 2nd or 3rd scriptGet Session - 2nd or 3rd script    Then I read my variables back into the script from the session:Get Session Variables - 2nd or 3rd scriptGet Session Variables - 2nd or 3rd script

 

Thanks,

Glenn

The Mapping ID looks odd For at least two reasons:

1) what are you setting it to that is a known-unique value per-call before executing the Get Session step? This is how the second and third scripts uniquely identify the session for THIS call vs. all the others. Remember that sessions survive for 30 minutes after the call ends.

2) The variable name starts with “s_”. Since your screenshots show you using “str_” to indicate a String variable I’m guessing this stands for Session? Mapping IDs are supposed to be globally unique String values, not internal Session identifiers themselves.

Hi Jonathan,

 

Doesn't the first Get Session get populated by the unique session ID generated by CCX into the variable s_session?   You are correct that s_session is a variable of type session.   That is the only variable type this step will allow.  What should my initial Get Session step look like?

 

Thanks,

Glenn

You would need to use a Get Contact Info Step to retrieve the Triggering Contact's session and store it to "s_session". That would eliminate the need for the Get Session step entirely, including the Mapping ID.

Ok, thanks.  Do I still use the Get Session step in my 2nd and 3rd scripts

Capture.JPG?

 

Thanks,

Glenn

No. Use Get Contact Info step in all three scripts. The Get Session step is only useful when you want to create a new session from scratch or find one by a Mapping ID. In your use case the automatically created Session for the triggering contact can should be used instead.

Apologize for the delay responding.   It took me a while to test and put updated scripts into production.   Thanks very much to Jonathan and Anthony for their assistance.   Their suggestions did the trick.

 

Glenn

Don't leave us hanging. What was the issue/solution?

The solution was to use the Get Contact Info step as the session ID.

 

Thanks,

Glenn

Sorry, I don't understand. Can you elaborate or provide screenshots of what you changed? I think this will help people searching the forums for answers. I hope you can reply.

Anthony Holloway
Cisco Employee
Cisco Employee
Have a look at this recent thread on Sessions, and see if it helps you out.

https://community.cisco.com/t5/contact-center/uccx-passing-variables-between-2-ivr-scripts/m-p/3726340