Script, when call abort the queue then write to DB ?

Answered Question
Sep 8th, 2009

Hi,

Kindly I'm trying to write a script to collect this information for every coming call:

the calling numbers, the called numbers, the creation time,if call is handled and if call is still active then.

then to write this information to the database using dbwrite step

I have succeeded in that, but the final thing which i still miss and need your help in is that:

when the call in queue, and the caller hang up [abort] then it is shown in my database [not handled, also not active] so i have created another field to tell that aborting [so it show true when the caller hang up]

But till now i can't write anything to the database when the caller abort the queue

I think in using get call contact info [which contain aborting, but when the call abort, it didn't follow the script to be marked as aborted] you can say that the script have nothing about it,

so is there any method to collect information about this aborted call from the queue

also another question may help in solving it: is the aborted call follow to the End step after exiting the queue or the end step is only to free the resources which i think that

Thanks for your help and sorry for being detailed :)

I have this problem too.
0 votes
Correct Answer by RSwartzmiller about 7 years 2 months ago

First you are right you need to know the SessionID. I do this by creating the following variables;

Type: Session

Name: vSession

Value: null

Type: Object

Name: tempSessionID

Value: Null

Type: String

Name: vSessionID

Value: “”

Now in the Script use a Get Contact Info and set session as vSession. Next use Get Session info and set the Identifier as tempSessionID. Then convert the number to a string by using Set vSessionID = String.valueOf (tempSessionID).

*****If anybody know a better way to find SessionID please share********

Now create two new fields in your database first one sessionID, and the second one EndDateTime.

Now with the SessionID we need to create a trigger in SQL. Go into SQL Query Analyzer and under dbo.AgentConnectionDetail create a trigger

CREATE TRIGGER triAgentConnectionDetail

ON AgentConnectionDetail

FOR INSERT

AS

UPDATE a

SET a.EndDateTime = b.EndDateTime

FROM " Your DatabaseName” a

INNER JOIN inserted b ON a.SessionID = b.sessionID

I also bring over more fields like resourceID, ringTime, talkTime, holdtime, and worktime. However this is up to you all you have to is create a new fields in your database and add this to the trigger under Set

a.resourceID = b.resourceID,

a.ringTime = b.ringTime,

a.talkTime = b.talkTime,

a.holdtime = b.holdtime,

a.worktime = b.worktime

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (4 ratings)
Loading.
harris.h Wed, 09/09/2009 - 03:55

Hi There

You will need to catch this as an exception step (contact inactive exception)

then send to your end label

Hythim Ali El Hadad Thu, 09/10/2009 - 01:37

Hi RICHARD,

thanks alot for your reply, I have allready solved it yesterday throygh this forums also

finally i have 2-points remaining for my script, if you can help me,it'll be great,

1. I can dbwrite the creation time to the database, and if the call is queued then aborting the queue, i can get the end time, do you know any method that enable me to calculate the end time of the call if it get connected to an agent ?

so the end time will be after the agent finish his call .

2. I found a [ session ID ] for every call hit the script in the historical reports in the database, and it is written to the database after the call finish. is there any method to get this session ID and use it in my script.

thanks alot for your help :)

Hythim Ali El Hadad Mon, 09/14/2009 - 15:17

Hi,

Can any one help in calculating the end time for a connected call as the agent finish the call ?

Thanks & Best Regards

Correct Answer
RSwartzmiller Tue, 09/15/2009 - 07:39

First you are right you need to know the SessionID. I do this by creating the following variables;

Type: Session

Name: vSession

Value: null

Type: Object

Name: tempSessionID

Value: Null

Type: String

Name: vSessionID

Value: “”

Now in the Script use a Get Contact Info and set session as vSession. Next use Get Session info and set the Identifier as tempSessionID. Then convert the number to a string by using Set vSessionID = String.valueOf (tempSessionID).

*****If anybody know a better way to find SessionID please share********

Now create two new fields in your database first one sessionID, and the second one EndDateTime.

Now with the SessionID we need to create a trigger in SQL. Go into SQL Query Analyzer and under dbo.AgentConnectionDetail create a trigger

CREATE TRIGGER triAgentConnectionDetail

ON AgentConnectionDetail

FOR INSERT

AS

UPDATE a

SET a.EndDateTime = b.EndDateTime

FROM " Your DatabaseName” a

INNER JOIN inserted b ON a.SessionID = b.sessionID

I also bring over more fields like resourceID, ringTime, talkTime, holdtime, and worktime. However this is up to you all you have to is create a new fields in your database and add this to the trigger under Set

a.resourceID = b.resourceID,

a.ringTime = b.ringTime,

a.talkTime = b.talkTime,

a.holdtime = b.holdtime,

a.worktime = b.worktime

steakandeggs Sun, 10/10/2010 - 12:34

How can this be done in UCCX 8? Would you have to copy, push, or synchronize the Informix database to an offbox database and not use the historical reporting tool at all? If so, how would this be done, from a high level?

RSwartzmiller Tue, 10/12/2010 - 11:48

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

I have not deal with UCXX 8 yet. From a high level you would need to synchronize the Informix database to an off box database where you are writing the sessionId.  I would also recommend reducing your session time out to 10mins or less and add a second key to the table to help stop duplicated sessionId. If you need anything else or if you get it working. Please let me know.

Abdulbaseer Mohammed Mon, 10/11/2010 - 23:19

That is really cool.  I did not understand it all the way but would love to take a look if you have a script or a file you can share.

I do have a similar request from a customer so far its sitting in the back burner.

Thanks,

Baseer.

RSwartzmiller Tue, 10/12/2010 - 11:55

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Baseer

Unfortunately at this time I cannot share that script with you, but the above post walk thought setting it up. If you run into problem, let me know. I will try to help you out has much as I can.

Actions

This Discussion