" /> How to cancel Retrieve Record in OCS - Genesys CTI User Forum

Author Topic: How to cancel Retrieve Record in OCS  (Read 3156 times)

Outbound Reporting

  • Guest
How to cancel Retrieve Record in OCS
« on: February 26, 2007, 07:48:31 AM »
Advertisement
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]

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: How to cancel Retrieve Record in OCS
« Reply #1 on: February 26, 2007, 08:56:35 AM »
  • Best Answer
  • 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.

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1419
    • Karma: 18
    Re: How to cancel Retrieve Record in OCS
    « Reply #2 on: February 26, 2007, 11:52:47 AM »
  • Best Answer
  • 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