Genesys Engage on-premises

 View Only
Discussion Thread View
  • 1.  WDE Customization, working with OCS for get a specific record

    Posted 04-14-2022 09:48
    Hi,

    I am currently working on a subject, concerning WDE customization, in order to be able to recover a record from a recall campaign.

    I manage to work with the records of the ocs, however I would like to be able to request a specific recall from the OCS.

    In my case the developer has a link (WebService) linked to the OCS database, allowing to obtain the list of pending reminders for a specific campaign.

    I want from this information (record_id or chain_id) to display to the agent the callback he requested via the new interface (a simple table listing the pending callbacks) like a classic callback, but this time only get the one wanted , not the first in the OCS list

    I try this, but the code does not work, it fail because the var "records" is not set (null) by "GetChainRecordsByCampaignName" :

    I don't have any other solution, do you have any idea ?
                    CallingListModel recordSelected = e.Result as CallingListModel;
                    //Envoie de la commande pour get le prochain record
                    ICampaignService service = CustomModule.EnterpriseServiceProvider.Resolve<ICampaignService>("campaignService");
                    IOutboundService outbound = CustomModule.EnterpriseServiceProvider.Resolve<IOutboundService>("outboundService");
                    ICampaign campaignCiel2 = service.GetAllCampaigns().First(m => m.Value.Name.Contains(CAMPAIGN_NAME)).Value;
                    //outbound.GetChainRecordsByCampaignName
                    //service = service.GetPreviewRecord(campaignCiel2, null);
                    aLog.Debug("campagne name record : " + campaignCiel2.Name);
                    var records = outbound.GetChainRecordsByCampaignName(campaignCiel2.Name);
                    aLog.Debug("liste record : " + records.Length);
    
                    foreach (IChainRecord chain in records)
                    {
                        aLog.Debug("IChainRecord : " + chain.InteractionID);
                        aLog.Debug("IChainRecord : " + chain.Device.FQName);
                        aLog.Debug("IChainRecord : " + chain.Device.Name);
                        IRecord record = chain.Records.ToList().Find(m => m.RecordID == recordSelected.RecordId);
                        if(record != null)
                        {
                            aLog.Debug("IRecord " + record.AgentID);
                            aLog.Debug("IRecord " + record.PhoneNumber);
                            outbound.GetChainedRecords(chain.Device, record, new Genesyslab.Enterprise.Commons.Collections.KeyValueCollection(), "");
                        }
                    }​


    Thanks in advance,

    Best regards

    Quentin


    #GenesysEngageDev

    ------------------------------
    Quentin Airey
    NXO FRANCE SASU
    ------------------------------


  • 2.  RE: WDE Customization, working with OCS for get a specific record

    GENESYS
    Posted 08-17-2022 09:09
    Hi Quentin,

    It seems method GetChainRecordsByCampaignName returns ChainRecords , all records in one current chain.

    The current chain is pre-loaded and saved asynchronously(!) after Preview toaster is accepted… See EventUserEvent with

    1 'GSW_USER_EVENT' [str] = "ChainedRecordsDataEnd"

     

    Before this event, the method could return null or chain with empty records. The time of the event depends on number of performance factors and probably would be in the middle of Interaction view construction.

    It looks like you have run this early and the records have not been loaded yet. You can try again and wait to listen to the interaction events.

    Thanks,
    Ramya



    ------------------------------
    Ramya V
    Genesys - Employees
    ------------------------------