Author Topic: Managing Outbound Campaigns from Third Party App  (Read 13203 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Managing Outbound Campaigns from Third Party App
« on: May 03, 2007, 08:16:11 PM »
Hi,

Does anybody knows how can i develop an app to load/stop/start/unload campaigns on an external application just like OCM does?

Thanks for any help you can provide

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Managing Outbound Campaigns from Third Party App
« Reply #1 on: May 03, 2007, 09:22:27 PM »
Hi Cavagnaro,

It's possible to control outbound campaigns using UserEvents and Communication DN. Please look to "Outbound Contact 7.2 Reference Manual", chapter 2 - "Communication DN API".

I was involved in the development of web application allowing control of outbound campaigns few years ago. If you have more questions I'll try to remember ;) how we did it.

Cheers,
René

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #2 on: May 03, 2007, 09:52:55 PM »
I already have read it but to be honest i don't understand it very well.
It talks on create an application on CME, and send events, but i'm lost on that part.
by any chance do you have some small example?

Thanks a lot René

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Managing Outbound Campaigns from Third Party App
« Reply #3 on: May 04, 2007, 07:52:18 AM »
Hey,

wait until next Monday and I will send you a sample using attach-data.
I think there was a sample on a board somewhere too.

Cheers,
Vic


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #4 on: May 04, 2007, 03:40:43 PM »
Cool! Thanks a lot Victor!

pd: WHat happened to the Quest?

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #5 on: May 04, 2007, 04:21:07 PM »
Hi again,
Found the example code you made, great one. One question only, do i have to monitor a DN envolved on the campaign for this right? I usually monitor agents place to do my softwares, but as i can't depend on which agent is logged in or not, what other DN i can monitor to achieve this?

Really thanks  :D

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Managing Outbound Campaigns from Third Party App
« Reply #6 on: May 05, 2007, 05:19:55 PM »
Hi, Cavagnaro,

I am glad that you found the code helpful. Please feel free to use it in any way you wish, and if you think any of your modifications might be useful to the rest, please do not hesitate to post it here!

Regarding your question, I am a bit unclear about what you are asking.

For that code to work, you would need to have DNs for all of the agents who will be using this to have DN registered in CME. You will also need to create one Communications DN. Other than that, you really don't need much.  ;D

What do you mean when you say "monitor a DN"? ???

Best regards,
Vic

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #7 on: May 06, 2007, 04:58:13 AM »
Hi Victor,
What i mean is:
Usually when i create an CTI App i always do for an agent. I configure TExtension1.TDN = "Place" where "Place" is the Place where agent logins so i can "see" the events that arrive to it and also send events.
The application I'm trying to do is to be used by someone (on a third party application) that doesn't belong to the campaign itself. So if i configure TExtension1 to "monitor" the place of an agent that is logged in so he will receive and send the orders, or i'm wrong. I know i can "monitor" other devices as queues where i learned to read the entered and abandoned calls for example.
So as what i need is to manage the campaign on any moment and not to depend on the agent, what i can "monitor" with TExtension in order to achieve this?

Thanks

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Managing Outbound Campaigns from Third Party App
« Reply #8 on: May 06, 2007, 10:22:02 AM »
Ok, I think I got it.

Let's say there are two PCs.
PC 1 is the one used by the operator and that operator's DN is 1000
PC 2 is used by supervisor and supervisor wants to monitor operator on PC 1 (or even control it)

Then, yes, you would need to do EXtension.TDN = 1000 from PC 2 so you would be getting the events for operator on DN 1000.


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #9 on: May 06, 2007, 06:56:36 PM »
Ok following your example:

1 agent using PC1 with DN 1000
1 agent using PC2 with DN 1002
1 Supervisor with PC3

At one time ONLY 1 agent is logged in, or maybe even no agent is logged in.
As i want to handle the campaign that will use this agents as target on PC3, the only way is to monitor DN 1000 or 1001? Does it work if agents are not logged in?

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Managing Outbound Campaigns from Third Party App
« Reply #10 on: May 06, 2007, 08:54:46 PM »
Hi Cavagnaro,

If you want to control the campaign (start, stop, reload) only then your "supervisor" application has to register and monitor a DN of type "Communication DN". You will receive all the UserEvents related to the campaigns on this DN.

René

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #11 on: May 07, 2007, 05:31:19 AM »
;D Thanks a lot René! Finally got it!
Thanks a lot Vic also!  ;D

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Managing Outbound Campaigns from Third Party App
« Reply #12 on: May 07, 2007, 07:39:21 PM »
Victor,
One question, on your code (C) you use this:

myPair.NumValue=this.TServer.AppDBID

How can i do the same on VB? Is TServer an object of the activex?

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Managing Outbound Campaigns from Third Party App
« Reply #13 on: May 09, 2007, 02:18:38 AM »
Hi, Cavagnaro,

this.Tserver.AppDBID is not related to ActiveX. It is ID of your application in CME. I set it in config.xml file inside initTserverParams.

You need this AppDBID to make sure that OCS will reply to your requests. OCS I guess needs to know who it is talking to. I guess it is also necessary to track between different types of applications all using the same Communication DN.

Just in case you forgot, you need to create a third-party application in CME, and name it something. Then you will need to connect that application to OCS.

After that, you need to retrieve that application id from CME (dbid) (I dont remember it off hand, but it was either cfg_application or cfg_servers -- just look inside table until you find an entry with the name of your application. dbid key to the left of it is what you need!) And then use it for GSW_CM_AttrOriginAppID.

I know it sound like a lot, but actually, once you do it, you will never have to worry about it again - dbid in CME will not change unless you delete and re-create your application definition in there. I store dbid inside config.xml file for the application, but obviously you can hardcode it (even though I would strongly advise against it).

I think that it is possible to retrieve id of application using ActiveX without going into DB; however, I am not too sure. Give me a few hours and I will get back to you on that.

Best regards,
Vic

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: Managing Outbound Campaigns from Third Party App
« Reply #14 on: May 09, 2007, 04:29:22 AM »
Ok,

I tried to access config server using standard ActiveX, but could not get the info out... yet...
Perhaps, you could follow up on this:

            GsCfgInf.GsAgentDesktopInfo cfg = new GsCfgInf.GsAgentDesktopInfo();
            cfg.User.Name = "default"
            cfg.User.Password = "whateverpassworditis"
            cfg.Application.Name = "default";
            cfg.Application.Type = GsCfgInf.EnumGsApplicationType.AppTypeSCE;

            GsCfgInf.IGsConnectionInfo conn = (GsCfgInf.IGsConnectionInfo)cfg;
            conn.Host = cnf_cfg_dt.CTI.configHost;      // <-- hostname for config server
            conn.Port = cnf_cfg_dt.CTI.configPort;      //<-- port
            conn = null;

            cfg.Login();

                if (cfg.IsLoggedIn())
                {

                  cfg.Retrieve();
                }
                  // at this point your cfg structure is going to be populated with a lot of fun stuff. But none of them show ApplicationID YET.Here is what I got so far:

[attachimg=1]

Perhaps, someone knows how to get it? Or, perhaps, there is a simpler way?
                }