Author Topic: Add attached data keyvaluepair  (Read 3867 times)

Offline dmans1

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Add attached data keyvaluepair
« on: March 13, 2009, 08:48:49 PM »
Does anoyne know if there's a way to programmatically  add a new keyvalue pair on the attached data of the call?
My use case scenario is this:

Agent receives a new progressive/predictive outbound call.
Agent transfers the line into a new VDN(served by an inbound agent group).

Upon transfer, the existing attached data will be carried to the new agent. The good thing is thatusefull information is transferred to the new agent, the bad thing is that the call interactiontype remains outbound and it is treated as this by our inhouse crm, creating a lot of confusion to the agents.

My question is... can i attach my own keyvaluepairs on the call before making the transfer (e.g an isTransfer = 1 keyvalue pair and another 1 with some transfer comments).

I have tried using the updatecallcompletionstats and i get an eventattacheddatachanged, but nonexistent keyvaluepairs don't get created.

Offline dmans1

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Re: Add attached data keyvaluepair
« Reply #1 on: March 17, 2009, 06:05:41 PM »
Found it !!!  ;D
In case someone needs the solution...

Code: [Select]
Public Sub Tattachdata(Key As String, Value As String)
    Dim MyUserData As TEventInfo
    Dim myPair As CTKVPair
    Dim myData As CTKVList
    Dim myStatus As Tstatus
   
    Set MyUserData = New TEventInfo
    Set myData = New CTKVList
    myData.Clear
   
    Set myPair = New CTKVPair
    myPair.Key = Key
    myPair.Type = CKVTypeString
    myPair.StringValue = Value
    myData.AddTail myPair
   
    myStatus = GenesysControls.my_Extension.TGetActiveCallObj.Tattachdata(myData, False)
   
    Set MyUserData = Nothing
    Set myData = Nothing
    Set myPair = Nothing
   
End Sub

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7233
  • Karma: 56330
Re: Add attached data keyvaluepair
« Reply #2 on: March 18, 2009, 08:15:52 AM »
If you search this forum you will see lots of examples like that...
And you "found" it in the other forum lol

Offline dmans1

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Re: Add attached data keyvaluepair
« Reply #3 on: March 20, 2009, 11:15:46 PM »
And you "found" it in the other forum lol
... and shared my new knowledge here.
On the other hand it might have being better not to share and start being a smart ass. Right?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7233
  • Karma: 56330
Re: Add attached data keyvaluepair
« Reply #4 on: March 20, 2009, 11:58:34 PM »
Not at all.