PureConnect

 View Only
Discussion Thread View
  • 1.  Interaction Connect add-in : Retrieving attribute values

    Posted 03-06-2020 10:26
    Hello. I'm putting together a custom view for iConnect and for the selected interaction it needs to display the value of some attributes but the problem I'm having is that it's displaying the attribute name rather than the value. For example I need to display the workgroup name and the state but what gets displayed is Eic_WorkGroupName and Eic_CallStateString.

    My subscription looks like:
    queue.subscribe({
    attributeNames: [
          ININ.Addins.IC.Interactions.attributeNames.interactionType,
         ININ.Addins.IC.Interactions.attributeNames.stateDisplay,
         ININ.Addins.IC.Interactions.attributeNames.workgroupName
          ]
         , queueIds: [
         { type: ININ.Addins.IC.Queues.queueTypes.system, name: ININ.Addins.IC.sessionInfo.userId },
         { type: ININ.Addins.IC.Queues.queueTypes.workgroup, name: ININ.Addins.IC.sessionInfo.userId }
          ]
    });

    queue.on("interactionAdded", function (interaction) {
        console.log(
             interaction.getAttribute(ININ.Addins.IC.Interactions.attributeNames.interactionType),
            "Interaction", interaction.interactionId, "was added to queue. State is:",
             ININ.Addins.IC.Interactions.attributeNames.stateDisplay
           );
    });

    But this is what gets displayed.
    Call Interaction 2001440061 was added to queue. State is: Eic_CallStateString

    Any insights are appreciated.

    Thank you.
    #Implementation
    #Unsure/Other

    ------------------------------
    Sean McGrath
    Avtex Solutions, LLC
    ------------------------------


  • 2.  RE: Interaction Connect add-in : Retrieving attribute values

    Posted 03-06-2020 10:58
    Edited by Aaron Lael 03-06-2020 10:59
    Your last statement looks like it should be:


    interaction.getAttribute(ININ.Addins.IC.Interactions.attributeNames.stateDisplay)


    Instead of what it currently is:


    ININ.Addins.IC.Interactions.attributeNames.stateDisplay


    You're calling a reference to the attribute name, rather than to the value of the attribute on the interaction received on your function.
    ------------------------------
    AARON LAEL
    State of Utah
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources