Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Outbound Reporting on February 26, 2007, 07:48:31 AM

Title: How to cancel Retrieve Record in OCS
Post by: Outbound Reporting on February 26, 2007, 07:48:31 AM
Dear Cavagnaro, Rene and Vic,
thank-you very very very much for all your helpful comments. With your help I am almost finished with my project, but there is a small problem that I cannot resolve.
Can you please tell me how to cancel the update of the retrieved record?

I know there is PreviewRecordRequest but how do I cancel it?

[tt][color=orange][glow=red,2,300]Outbound Report Girl[/glow][/color][/tt]
Title: Re: How to cancel Retrieve Record in OCS
Post by: René on February 26, 2007, 08:56:35 AM
Hi,

I'm not sure I do understand well what you want to achieve...

  If you want to mark a record as "Cancelled" (= do not dial, do not re-sent another agent) then use RequestRecordCancel.

  If you want to reject a record (= agent doesn't want to call the record at this time) then use RejectRecord.


R.
Title: Re: How to cancel Retrieve Record in OCS
Post by: victor on February 26, 2007, 11:52:47 AM
Here we go:

[color=green][size=8pt]Dim gRecordHandle As Integer
Dim gCallingList As String
Dim gEventInfo As New TEventInfo
Dim gList As New CTKVList
Dim gApplicationID As Integer
Dim gCampaignName As String

Private Sub btnUpdateCancel_Click()

Call AddAttachData("GSW_AGENT_REQ_TYPE", "RecordReject", , True)
Call AddAttachData("GSW_APPLICATION_ID", "", gApplicationID)
Call AddAttachData("GSW_CAMPAIGN_NAME", gCampaignName)
Call AddAttachData("GSW_CALLING_LIST", gCallingList)
Call AddAttachData("GSW_RECORD_HANDLE", "", gRecordHandle)

Call SendRequestToOCS

End Sub

' here is a function that makes it easy to pack attach data

Private Sub AddAttachData(keyname As String, key_value_string As String, Optional key_value_int As Integer = -1, Optional init_data As Integer = False)

Dim myPair As New CTKVPair

Set myPair = New CTKVPair

If init_data Then
    gEventInfo.UserData.Clear
   
    Set gEventInfo = Nothing
    Set gEventInfo = New TEventInfo
   
    Set gList = Nothing
    Set gList = New CTKVList
   
End If


            myPair.Key = keyname
           
            If (key_value_int = -1) Then
                        myPair.Type = CTKVType.CKVTypeString
                        myPair.StringValue = key_value_string
            Else
                        myPair.Type = CTKVType.CKVTypeNum
                        myPair.NumValue = key_value_int
            End If
           
            gList.AddTail myPair

End Sub

'and here is a function to send request

Private Sub SendRequestToOCS()

            gEventInfo.UserData = gList
            TExtension1.TSendUserEvent gEventInfo

End Sub[/size]
[/color]
Is it what you wanted? I did not have much time to write code, so don't blame me if it is too ugly :>

Vic