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

Offline dmans1

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
Add attached data keyvaluepair
« on: March 13, 2009, 11:48:49 AM »
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, 09:05:41 AM »
Found it !!!  ;D
In case someone needs the solution...

[code]
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
[/code]

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Add attached data keyvaluepair
« Reply #2 on: March 17, 2009, 11:15:52 PM »
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, 02:15:46 PM »
[quote author=cavagnaro link=topic=3968.msg17433#msg17433 date=1237331752]
And you "found" it in the other forum lol
[/quote]
... 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: 7639
  • Karma: 56330
Re: Add attached data keyvaluepair
« Reply #4 on: March 20, 2009, 02:58:34 PM »
Not at all.