Author Topic: IWS broadcast message  (Read 10281 times)

Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
IWS broadcast message
« on: January 06, 2016, 05:21:28 PM »
Hello All,

We planning to have a out of the box application to broadcast a message to group of agent. I tried going  through WDE development guide to create custom commands. But fail to get an sample example of using broadcast message command or how to use broadcast message protocol. So if somebody can help me with small sample code to broadcast message to communication DN subscribed by multiple agents. WDE APIs just provide class and objects details but no samples as it was provided in .NET SDK API. Request your help...

Thanks In Advance!!

Offline David Alvarez

  • Newbie
  • *
  • Posts: 17
  • Karma: -1
Re: IWS broadcast message
« Reply #1 on: January 06, 2016, 08:49:42 PM »
Hi, i make this option, using C# and the Plattform SDK.

CommonProperties CP = CommonProperties.Create();
CP.ThisDN = BroadCastDN;
CP.UserData = info;

RequestDistributeUserEvent Event = RequestDistributeUserEvent.Create(BroadCastDN, CP);

Where info is an KeyValueCollection.

With this code, the feature runs correctly.
Regards.

Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #2 on: January 07, 2016, 11:32:52 AM »
Hello David,


Thanks a lot for your advice!!

Based on your sample my code goes as below:-

TServerProtocol tserverProtocol = new TServerProtocol(new Endpoint("D_TServer_DLG_CM", "frdwgeap01d.dev.invitrogen.net", 3000));
            tserverProtocol.Open();
            MessageBox.Show("Connection Established");
            CommonProperties CP = CommonProperties.Create();
            CP.ThisDN = "Broadcast_DN";
            KeyValueCollection filterkey = new KeyValueCollection();
            filterkey.Add("UserData",textBox1.Text);
            CP.UserData = filterkey;


            RequestDistributeUserEvent Event = RequestDistributeUserEvent.Create("BroadCastDN", CP);
            MessageBox.Show("Message Sent");


Hope my above code is correct for bradcasting message to all agents who has subscribed DN:-Broadcast_DN. but its not working for me. anyway i am checking configuration on DN subscribe thing. Mean time request you to share if i am missing some steps.

Thanks in advance.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS broadcast message
« Reply #3 on: January 07, 2016, 11:56:03 AM »
Check sip server logs and documentation
The kvp keyname is fixed

Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #4 on: January 07, 2016, 03:53:57 PM »
Hello All,

I can see "RequestDistributeUserEvent receved from IWS_dev_User.Name" in the logs, but in IWS i can see message "Search in standard responses library is not available:-Appropriate indexes are disabled in universal contact server". instead of "Test Message". Request you to please help.

Thanks in advance!!

Rajnish

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS broadcast message
« Reply #5 on: January 07, 2016, 04:16:02 PM »
So...enable indexes in UCS? How? Read docs

Offline David Alvarez

  • Newbie
  • *
  • Posts: 17
  • Karma: -1
Re: IWS broadcast message
« Reply #6 on: January 07, 2016, 09:10:04 PM »
Hi Rajnish@49
You have send the event to TServerProtocol.

IMessage response = tserverProtocol.Request(Event);

Also, to configure parameters to send the message is in the KeyValueCollection, for a specific agent, all or agent group, you must send the attach data what you configure in the Bussiness Attribute.

You can read this post to view the correctly configuration.

https://genesyspartner.force.com/customercare/community#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA0U00000004TXL


Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #7 on: January 08, 2016, 06:43:09 AM »
Hello David,

Thanks a ton for your extended interest in helping me.

i have modified my code as suggested by you. Please find below the code.

            TServerProtocol tserverProtocol = new TServerProtocol(new Endpoint("D_TServer_DLG_CM", "frdwgeap01d.dev.invitrogen.net", 3000));
            tserverProtocol.Open();
            MessageBox.Show("Connection Established");
            CommonProperties CP = CommonProperties.Create();
            CP.ThisDN = "Broadcast_DN";
            KeyValueCollection filterkey = new KeyValueCollection();
            filterkey.Add("IWS_Subject", "Test");
            filterkey.Add("IWS_Priority", "Low");
            filterkey.Add("IWS_Message", textBox1.Text);
            filterkey.Add("IWS_Date", "Dec-7");
            filterkey.Add("IWS_Topic", "Agent Shrikant");
            filterkey.Add("IWS_Sender", "Mr X");
            filterkey.Add("IWS_MessageType", "Notification");

            CP.UserData = filterkey;


            RequestDistributeUserEvent Event = RequestDistributeUserEvent.Create("Broadcast_DN", CP);
            IMessage response = tserverProtocol.Request(Event);
            if (response == null)
            {
                MessageBox.Show("Message not sent");
            }
            else
            {
               
                MessageBox.Show("Message Sent");
            }


I can see the message "Message Sent", means there response is not null. but still i do not get any message on IWS. I tried going through the logs. I can see the event:-RequestDistributeUserEvent with the messages i have configured. and same is communicated to the other applications also. but its not reaching IWS agent. please find below the log snippet:-

01:02:04.262 Trc 04541 RequestDistributeUserEvent received from [520] (000000ab anonymousTServerClient 10.96.96.212:55763)
message RequestDistributeUserEvent
AttributeReferenceID 1
AttributeUserData [160] 00 07 00 00..
'IWS_Subject' 'Test'
'IWS_Priority' 'Low'
'IWS_Message' 'Hello'
'IWS_Date' 'Dec-7'
'IWS_Topic' 'Agent Shrikant'
'IWS_Sender' 'Mr X'
'IWS_MessageType' 'Notification'
AttributeThisDN 'Broadcast_DN'
AttributeCommunicationDN 'Broadcast_DN'
01:02:04.262 Int 04543 Interaction message "RequestDistributeUserEvent" received from 520 ("anonymousTServerClient")
@01:02:04.2620 [ISCC] Client location anonymousTServerClient:000000ab@ added
@01:02:04.2620 [0] 8.1.000.21 send_to_client: message EventACK
AttributeEventSequenceNumber 0000000000001547
AttributeTimeinuSecs 262000
AttributeTimeinSecs 1452232924 (01:02:04)
AttributeReferenceID 1
AttributeThisDN 'Broadcast_DN'
AttributeUserEvent RequestDistributeUserEvent
01:02:04.262 Trc 04542 EventACK sent to [520] (000000ab anonymousTServerClient 10.96.96.212:55763)
@01:02:04.2620 [0] 8.1.000.21 distribute_user_event: message EventUserEvent
AttributeEventSequenceNumber 0000000000001548
AttributeTimeinuSecs 262000
AttributeTimeinSecs 1452232924 (01:02:04)
[glow=red,2,300][glow=red,2,300] AttributeUserEvent EventUserEvent
AttributeThisDN 'Broadcast_DN'
AttributeUserData [160] 00 07 00 00..
'IWS_Subject' 'Test'
'IWS_Priority' 'Low'
'IWS_Message' 'Hello'
'IWS_Date' 'Dec-7'
'IWS_Topic' 'Agent Shrikant'
'IWS_Sender' 'Mr X'
'IWS_MessageType' 'Notification'[/glow][/glow]
AttributeReferenceID 1
01:02:04.262 Trc 04542 EventUserEvent sent to [508] (000000a7 IWS_Dev_shrikant.shevade 10.96.96.212:55725)
01:02:04.262 Trc 04542 EventUserEvent sent to [516] (00000035 StatServer_800 10.9.104.21:3833)
01:02:04.262 Trc 04542 EventUserEvent sent to [500] (00000009 WFM_SS 10.9.116.60:63723)
01:02:04.262 Trc 04542 EventUserEvent sent to [492] (00000007 D_RoutingStatServer 10.9.111.80:53231)
01:02:04.262 Trc 04542 EventUserEvent sent to [488] (00000006 CCON 10.9.116.52:63059)
01:02:04.262 Trc 04542 EventUserEvent sent to [484] (00000005 D_RoutingStatServer_Backup 10.9.111.81:56020)
01:02:04.262 Trc 04542 EventUserEvent sent to [480] (00000004 D_Reporting_StatServer 10.9.116.52:63057)

Request your suggestion.

Thanks,
Rajnish


Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #8 on: January 08, 2016, 07:08:06 PM »
Hello David,

Does this business attribute is same as the IWS_Topic? As per my understanding code goes as below:-

            TServerProtocol tserverProtocol = new TServerProtocol(new Endpoint("D_TServer_DLG_CM", "frdwgeap01d.dev.invitrogen.net", 3000));
            tserverProtocol.Open();
            MessageBox.Show("Connection Established");
            CommonProperties CP = CommonProperties.Create();
            CP.ThisDN = "Broadcast_DN";
            KeyValueCollection filterkey = new KeyValueCollection();
            filterkey.Add("IWS_Subject", "Test");
            filterkey.Add("IWS_Priority", "Low");
            filterkey.Add("IWS_Message", textBox1.Text);
            filterkey.Add("IWS_Date", "Dec-7");
            [glow=red,2,300]filterkey.Add("IWS_Topic", "BroadcastMessage");[/glow]
            filterkey.Add("IWS_Sender", "Mr X");
            filterkey.Add("IWS_MessageType", "Notification");

            CP.UserData = filterkey;
           


            RequestDistributeUserEvent Event = RequestDistributeUserEvent.Create("Broadcast_DN", CP);
            IMessage response = tserverProtocol.Request(Event);


I have also set broadcast.value-business-attribute=BroadcastMessage in iWS options and  broadcast.subscribed.topics=All,$Agent$,$AgentGroup$,$Roles$. I can see in the T-server logs that message is sent to IWS_Dev_UserName, but no luck on IWS message window. Could you please help me with trick or some steps what i am missing in this application.

Thanks,
Rajnish

Offline David Alvarez

  • Newbie
  • *
  • Posts: 17
  • Karma: -1
Re: IWS broadcast message
« Reply #9 on: January 11, 2016, 05:36:14 PM »
Hello Rajnish,
In the BA IWS_Topic, you may configure person's group to send the message (All, TestAgentGroup, TestAgent, etc).
Also, in the IWS_Date, you must send the date in special format:

filterkey.Add("IWS_Date", DateTime.Now.ToUniversalTime().ToString());

Or at least, so worked to me.

Regards.
David

Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #10 on: January 11, 2016, 08:00:28 PM »
Hello David,

Finally i got this thing working. Thanks a lot for your help and will be always grateful to you.

Rajnish

Offline David Alvarez

  • Newbie
  • *
  • Posts: 17
  • Karma: -1
Re: IWS broadcast message
« Reply #11 on: January 19, 2016, 02:02:11 PM »
It was a pleasure to help you.
If i know the response, i can help

I do not just say you READ DOCS

Offline Rajnish@49

  • Jr. Member
  • **
  • Posts: 58
  • Karma: -1
Re: IWS broadcast message
« Reply #12 on: January 20, 2016, 08:44:38 PM »
Hello David,

Can we broadcast message using interaction server? We can create one Broadcast_DN as communication DN on multimedia switch and try to broadacst.


When i am trying to connect to interaction server using below code

InteractionServerProtocol IxnProtocol = new InteractionServerProtocol(new Endpoint("InteractionServer_802", "frd03gys02", 7070));
                IxnProtocol.Open();

It throws error "Unknown Client Type"
Am i missing some trick?

Thanks,
Rajnish

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: IWS broadcast message
« Reply #13 on: January 20, 2016, 11:22:23 PM »
;D ;D ;D
Now wanna see you  :P

Offline David Alvarez

  • Newbie
  • *
  • Posts: 17
  • Karma: -1
Re: IWS broadcast message
« Reply #14 on: January 21, 2016, 04:41:45 PM »
Hi Rajnish, to be honest , I have not done this configuration

But, maybe you need a IXN_TServer and IXN_Switch, to register the Communication DN.
And the RequestDistributedUserEvent send to IXN_TServer.

You tell me if it works well.
Regards.