Retrieving NodeID-SessionID-SeqNum within UCCX Scripting

Answered Question
May 12th, 2010
User Badges:

Hi,

     I am working on UCCX 7.0 scripting where in I need to retrieve a unique number for the call. This unique number needs to map to the NodeID-SessionID-SeqNum of the AGent Wrap-Up Data Detail Report. I need to retrive this number in my script and write it into a custom table to be used as a primiray key in that custom table. Thus, this unique ID will link the CCDR in the standard historical reports to the custom table that I create. The custom table is being created to store some responses from the callers and will contain columns like CallID ( a unique ID), Reponse1, Response2 etc.


I tried retrieing the 'Identifier' in the GetContactInfo() step in my script assuming that this ID would be similar to the SeqNum in the NodeID-SessionID-SeqNUm of the historical reports but the 2 numbers are entirely different and hence I am unable to link the reports with the data in my custom table.


Any thoughts on how to work this through?


Thanks,
DM

Correct Answer by sferland about 6 years 11 months ago

Here are the steps you need to use in order to retrieve the session identifier (SessionID).


1- Create two variables

     a) one variable of type "Session"

     b) one variable of type "long"


2- After the "Accept" step, add a "GetContactInfo" and retrieve the session with the session variable created in 1a


3- Then add a "GetSessionInfo" step and retrieve the identifier with the long variable created in 1b


4- That's it ! You got the same index as table ContactCallDetail.


Regards

Steven Ferland

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
Aaron Harrison Wed, 05/12/2010 - 08:14
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi

I would consider inserting the response data into the 'Custom Variable' fields using a Set Enterprise Data step to simplify this setup. The data written to variables 1-10 is written directly to the 'custom variable 1-10' fields in the COntact Call Detail table in SQL.


That way the data is recorded against that call, and you would just need to worry about the relationships between tables that are already defined rather than trying to work in a new table.


Also I believe you aren't supposed to modify the CCX DB if you want to maintain supportability from Cisco.


Aaron


Please rate helpful posts..

dmurthy74 Wed, 05/12/2010 - 08:29
User Badges:

I am not modifying the UCCX DB. I will be creating a new DB in an external SQL server that will have a table to record the reponses of the survey. Actually, here is the actual scenario.


1. Caller calls into the contact center. Gets routed to an agent.

2. At the end of the call, the agent will transfer the call to this script (Route point) that would basically do a typical IVR functionality of asking a few questions and recording the responses.

3. These responses will then be written into an external DB (on an external SQL server) such that the table will have a unique ID, somehting like a call ID.

4. At a later point, the customer wants to map these reponses to any standard report that has the same unique ID such that, they know the entire call from end-to end.


COming to using enterprise variables, using SetEnterpriseData would display this call within CAD or wouldn't it? Also, as described above, the call gets transferred to a different route point.

If you think I can still achieve the above scenario using the Call Variables, Can you please elaborate on the steps?


Thanks in advance,

DM

Aaron Harrison Wed, 05/12/2010 - 09:07
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi


I've played a little with post-call surveys, and I've found that the call to the second RP for the survey gets the same node/session with an incremented seq number.


I guess one way to make this link might be to write the unique ID from the record you add external DB to a call variable in UCCX.


Set Enterprise Info is pretty straight forward, just add the step, select a variable you want to use (Custom Variable 1 in the DB shows up as 'Call.PeripheralVariable1' in the editor). Typically if you're setting a single value (i.e. a PKID or something) you would leave tokens=All and then just assign your variable.


If I recall correctly (and I may not be correct, you could verify this by monitoring the table for changes) the SQL Contact Call Detail and other tables are updated after the call, so you may not be able to retrieve the data from the HR DB to write to your external DB while the survey call is still active.


Aaron

Correct Answer
sferland Wed, 05/12/2010 - 10:42
User Badges:
  • Bronze, 100 points or more

Here are the steps you need to use in order to retrieve the session identifier (SessionID).


1- Create two variables

     a) one variable of type "Session"

     b) one variable of type "long"


2- After the "Accept" step, add a "GetContactInfo" and retrieve the session with the session variable created in 1a


3- Then add a "GetSessionInfo" step and retrieve the identifier with the long variable created in 1b


4- That's it ! You got the same index as table ContactCallDetail.


Regards

Steven Ferland

Aaron Harrison Fri, 01/18/2013 - 10:40
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Genius :-)

aalejo Thu, 09/22/2011 - 05:38
User Badges:

Hi Steve


    GetssionInfo (Identifier)  step only gets the SessionID, not the entire NodeID-SessionID-sessionSeqNum.


Regards


Alex



pstaudt Fri, 01/16/2015 - 13:20
User Badges:

Steve, I am trying to do the same things that dmurthy74 was doing 5 years ago.

1. Caller calls into the contact center. Gets routed to an agent.

2. At the end of the call, the agent will transfer the call to this script (Route point) that would basically do a typical IVR functionality of asking a few questions and recording the responses.

3. These responses will then be written into an external DB (on an external SQL server) such that the table will have a unique ID, something like a call ID.

4. At a later point, the customer wants to map these responses to any standard report that has the same unique ID such that, they know the entire call from end-to end.

 

So I understand the process.....

The steps that you outlined in the correct answer, are those steps in the script of the original call, or are they in the script for the survey?

I am new at scripting, so I am sorry but I need a little more details.

Thanks

Pete

Aaron Harrison Mon, 01/19/2015 - 01:49
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi Pete

The session ID should be the same in the original call (i.e. call to agent) and the survey call (post agent call) if the call is transferred back to CCX. It generally has the same session ID, with a bumped sequence number.

That's what can allow you to relate the survey results to a specific agent call.

Aaron

pstaudt Mon, 01/19/2015 - 06:50
User Badges:

Aaron,   Thanks.   I was able to get the session ID and sequence, how do I get other information related to the call like:

NodeID

Application Name

CSQ Name

Called ANI

Agent ID

Extension

 

Thanks

Pete

 

Aaron Harrison Tue, 01/20/2015 - 03:06
User Badges:
  • Super Bronze, 10000 points or more
  • Community Spotlight Award,

    Member's Choice, May 2015

Hi Pete

Do you want to get this data in the CCX script?

Or when reporting later, via ODBC?

Aaron

Kanat Nurzhanov Tue, 01/12/2016 - 01:49
User Badges:

Hello Aaron.

I'm facing the same issue. I want get this data to the CCX script. (Further I use DB Write to put this data into external database)


Thank you.

Gergely Szabo Tue, 01/12/2016 - 02:25
User Badges:
  • Green, 3000 points or more
  • Community Spotlight Award,

    Member's Choice, December 2015

Hi Kanat, get what data?

Also, what is the issue you are facing when trying to write into an external DB?

G.

Kanat Nurzhanov Tue, 01/12/2016 - 23:27
User Badges:

Hello!


We have two scripts in production environment. Basic CCX script, and Quality Assessment script. I'm trying to retrieve CSQ name and AgentID parametres from the session, but they become "null". I need to write CSQ Name, Agent Extension, calling number and score into an external DB. No problem with the score and calling number, but I can't get CSQ and agent ID.

Gergely Szabo Wed, 01/13/2016 - 00:07
User Badges:
  • Green, 3000 points or more
  • Community Spotlight Award,

    Member's Choice, December 2015

Can you post the screenshots of the relevant parts of the scripts? Thanks. G.

Gergely Szabo Wed, 01/13/2016 - 02:20
User Badges:
  • Green, 3000 points or more
  • Community Spotlight Award,

    Member's Choice, December 2015

And where are they written into the Session? G.

Kanat Nurzhanov Thu, 01/14/2016 - 20:58
User Badges:

I used Set Session Info and Get session Info commands improperly, now it works.


Thanks for your response.

lcubero Wed, 02/17/2016 - 10:25
User Badges:

Hi Kanat,

I am trying to do the same thing as you and face the same issue. Could you please share your script or tell me what you have done ?


Regards,

Luís.

michele.russo Tue, 11/10/2015 - 07:53
User Badges:

I am also curious how you collected the sequence number - I have been able to expose the Session ID but the sequence number is not working for me either.  My goal is to merge these two pieces of data into one callVariable.

If you have been able to accomplish this successfully please share??


Tks.

Michele

Actions

This Discussion