Author Topic: Trying to attach data in GAD  (Read 8097 times)

Dario Garcia

  • Guest
Trying to attach data in GAD
« on: August 27, 2008, 11:13:59 PM »
Hi,

We are trying to use a listbox to attach some data. We have archive attach data when we load the jsp page. However when we use the control the attach data fail.

Have someone a code example where we can use a editbox, listbox, etc to attach data during the call is with the agent?

Thanks

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Trying to attach data in GAD
« Reply #1 on: August 29, 2008, 03:34:01 AM »
  • Best Answer
  • Are you using Genesys Active X? I am always confused about GAD.

    here is the default way:

    [code]
    Private Sub CommandAttach_Click()

    'find node based on key in combo box, kvpair.value to user's input box
    Dim X As Integer
    Dim dataNode As CTKVPair
    Dim count As Integer

    For X = 0 To UserData(LineSelected).GetCount - 1
        Set dataNode = UserData(LineSelected).Get(X)
        If dataNode.Key = ComboKey.Text Then
            If dataNode.Type = CKVTypeString Then
                dataNode.StringValue = Me.txtCallData.Text
               
                If X > 0 Then
                    Call UserData(LineSelected).Insert(X, dataNode)
                    UserData(LineSelected).Remove (X)
                Else
                    Call UserData(LineSelected).Insert(X, dataNode)
                    UserData(LineSelected).Remove (X + 1)
                End If

                Exit For
          Else
              MsgBox ('Panda!')
          End If
          Exit Sub
      End If
    Next X

    Call SoftPhone.TLine1(LineSelected).TAttachData(UserData(LineSelected), False)
    UpdateAttachDataDisplay (LineSelected)

    End Sub

    [/code]
    « Last Edit: August 29, 2008, 03:40:06 AM by victor »

    Offline cavagnaro

    • Administrator
    • Hero Member
    • *****
    • Posts: 7639
    • Karma: 56330
    Re: Trying to attach data in GAD
    « Reply #2 on: August 29, 2008, 06:34:13 AM »
  • Best Answer
  • Can GAD do that?? If so we are talking that GAD is more an SDK software than a simple softphone...

    Dario Garcia

    • Guest
    Re: Trying to attach data in GAD
    « Reply #3 on: September 03, 2008, 10:51:59 PM »
  • Best Answer
  • No, GAD... the web softphone

    For Activex we have a code that works fine but with GAD we are lost

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1416
    • Karma: 18
    Re: Trying to attach data in GAD
    « Reply #4 on: September 26, 2008, 02:15:16 AM »
  • Best Answer
  • Dario,

    sorry - I have always associate GAD to Genesys Active X not the recent Web version of it.

    Never tried it before! I will ask one of our engineers to check and hopefully get back to you. Now, I am curious as well!

    Silly question but what is the benefit of GAD over using your won softphone?

    Vic

    Offline barleycorn

    • Jr. Member
    • **
    • Posts: 73
    • Karma: 2
    Re: Trying to attach data in GAD
    « Reply #5 on: September 26, 2008, 04:09:44 AM »
  • Best Answer
  • There seems to be some confusion on GAD... Genesys Desktop (or GAD as it used to be) is a web-based thin-client multimedia desktop.  It allows customization through the use of xml & jsp code; these customizations allow a developer to add functionality, such as new tabs, controls, etc.  You can't really change the general look and feel of Gdesktop, but it's reasonably effective design that allows you to customize it and also to be able to upgrade without losing all your custom functionality.

    To address the main question though; are you able to add attached-data in the normal way? You can do this by clicking on the attached-data tab on any interaction and pressing the "New...." button. If this doesn't give you what you need, let us know and we can discuss further.

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1416
    • Karma: 18
    Re: Trying to attach data in GAD
    « Reply #6 on: September 29, 2008, 07:47:11 AM »
  • Best Answer
  • Damn,

    I see I have been missing a vital product line here - better install it and play with it ASAP.

    Best regards,
    vic

    Luk

    • Guest
    Re: Trying to attach data in GAD
    « Reply #7 on: October 16, 2008, 11:37:55 AM »
  • Best Answer
  • [quote author=Dario Garcia link=topic=3272.msg13609#msg13609 date=1220482319]
    No, GAD... the web softphone

    For Activex we have a code that works fine but with GAD we are lost
    [/quote]

    To do this in GAD (version 7.5 or 7.6 for example), you use Java AIL in your custom jsp's.  This is what barleycorn is saying as well and the high level process to customise GAD is explained in the Genesys Desktop Developer Guide.
    Now, specific to your question: you need to use the AilFactory to retrieve the active interaction. From then on you can just set additional attached data. Do NOT forget to invoke "interaction.saveAttachedData();" at the end.
    A simple code sample:
    [quote]
      AilFactory factory = AilLoader.getAilFactory();
      String idInteraction = (String)request.getParameter("idInteraction");
      Interaction interaction = factory.getInteraction(idInteraction);
    ...
      interaction.setAttachedData("Email address", new_Email_address);
      interaction.setAttachedData("Company sector", new_Company_sector);
      interaction.saveAttachedData();
    [/quote]

    Now, even more interesting; for outbound, you can directly change fields in the calling list from your custom code. So, if you need to save some information from contacted customers, you can store the values in fields you set up in the calling list.

    It is all possible :) Enjoy,
    Luk.