Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  How can i update a terminated interaction in UCS using PSDK modifying the StrAttribute field/column?

    Posted 09-30-2015 14:12
    Hi,

    How can i update a terminated interaction in UCS using PSDK modifying the StrAttribute field/column?
    I'm using PSDK 8.5 to manage closed and stored interactions in UCS DB.
    We have custom attributes stored on StrAttributeN columns.
    We should update a value stored in StrAttribute3 column but with the RequestUpdateInteraction request we can't update StrAttribute fields.
    The only mandatory attribute for this request is

    com.genesyslab.platform.contacts.protocol.contactserver.InteractionAttributes

    but with this object seems not possible to set custom fields.

    Thanks

     


  • 2.  RE: How can i update a terminated interaction in UCS using PSDK modifying the StrAttribute field/column?

    Posted 10-02-2015 10:33
    You need to use the configured name of your StrAttribute3.
    For example in my environment StrAttribute3 has a name of 'survey_answer_Overall' and a Display Name of 'Survey Overall'. So I use the Name 'survey_answer_Overall' instead of StrAttribute3


                String now = DateTime.Now.ToString();
                RequestGetInteractionContent reqGet = RequestGetInteractionContent.Create();
                reqGet.InteractionId = "0375MP2M0S5D802E";
                EventGetInteractionContent content = ucsProtocol.Request(reqGet) as EventGetInteractionContent;
                Debug.WriteLine(content);
                if (content.InteractionAttributes.AllAttributes.ContainsKey("survey_answer_Overall"))
                {
                    Debug.WriteLine("survey_answer_Overall = " + content.InteractionAttributes.AllAttributes.GetAsString("survey_answer_Overall"));
                    content.InteractionAttributes.AllAttributes.Remove("survey_answer_Overall");
                    
                }

                KeyValueCollection kvc = content.InteractionAttributes.AllAttributes;
                kvc.Add("survey_answer_Overall", now);
                content.InteractionAttributes.AllAttributes = kvc;
                RequestUpdateInteraction req = RequestUpdateInteraction.Create();
                req.InteractionAttributes = content.InteractionAttributes;
                IMessage res = ucsProtocol.Request(req);
                Debug.WriteLine(res);


  • 3.  RE: How can i update a terminated interaction in UCS using PSDK modifying the StrAttribute field/column?

    Posted 08-02-2024 05:55

    Hello,

    I am executing the same code but when it executes the highlighted code, the UCS State goes to Closed. Before this line its Opened.

    Any suggestions?



    ------------------------------
    Sajid Abbas
    Agoda Thailand
    ------------------------------



  • 4.  RE: How can i update a terminated interaction in UCS using PSDK modifying the StrAttribute field/column?

    Posted 10-06-2015 08:21
    Hi Pete,
    the answer you posted is correct and works fine.
    I've tried the code you wrote adapted at our scenario and now we can update interaction and custom attributes successfully.
    Thank you very much.


Need Help finding something?

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