Intelligent call routing and CRM integration

a_lemin
Posts: 87
Member Since:
2007-01-21

Hey all,
I just wanted to create a new thread for this subject. I did bring it up in another thread the other week but it was a bit out of scope for that thread really and I really would like to get some opionions from people on this one as I am desperately trying to sway kerry into the idea and benefits of adding 'SendURL' support to the soon to be released HUD3.

PS. Thanks to all those who responded in the other thread, I had some really useful responses.

For those that don't know what SendURL is or CRM, just read on. Sorry if this is a bit long but it is worth it I promise ;o)

Imagine this;
When a caller comes into the IVR (Option menu), and the caller presses 1 for the support team, pressing 1 sends the call to a custom section in extensions_custom.conf.
Here our PABX prompts to the caller to enter a case number/ticket number (As logged on the CRM system), Asterisk then listens for the DTMF tones and stores them (Done with a single command (‘Read’) in the dial plan).

Asside; A CRM (Customer Relation Manager) is usually a web based job management system that allows 'calls' or support cases to be logged (Often called tickets) detailing issues a customer might have for what ever reason. Staff can then add comments to the ticket and so on until the call be closed when the problem is resolved.
See SugarCRM for an example. http://www.sugarcrm.com

Now that the user has entered their ticket number we have the information that will allow us to do some very powerful and clever things.

We could stop right here, as the CRM page for the ticket is nearly always something like http://urltocrmserver/somefile.php?ticketnumber, where the first part of the URL never changes. Thus with only one line of code we already have everything we need!

For example, we could now run the asterisk function;
"SendURL(‘http://urltocrmserver/somefile.php?ticketnumber’)".

This set’s the URL SIP header, we then simply ring the support ring group/queue and the agent who answers the call will have the CRM web page popup with all the support ticket info open in front of him or her as soon as they pick up the phone...... How cool would that be!

What we have done is to take this a bit further (As HUD currently doesn't support SendURL anyway :( ).
For example how about if we could work out who the support ticket was currently assigned to, and route the call to only that person...!

Well that was actually surprisingly easy. I wrote a simple .agi script (Perl script you place in /var/lib/asterisk/agi-bin/) which you call from the dial plan passing it the ticket number you collected with the Read() command.

In the AGI script you simply load the Asterisk-perl modules (Asterisk::AGI) and database modules (Perl::DBI) thus providing you access to any database you want.
In my script I then make a database connection to the CRM database, and simply call something called a ‘stored procedure’ passing it the ticket number.

The stored procedure resides on the database. It forms part of the database schema but is in essence program code that resides on the database. It sounds complex but it honestly isn’t.
Anyway, you can write one (less that 10 lines of code even) which you simply add to the existing CRM database. My stored proc simply uses the ticket number to select the data from the database relating to the support ticket, in particular returning the name of the agent the ticket is assigned too......

Here I did have to use a tiny user map to map agent names in the CRM to extensions......

The stored proc now simply returns the agents extension number to the AGI script, which in turn passes it straight back to the dial plan.

Now we simply run the SendURL() command just as we did before, we could also set the ALERT_INFO variable too if we wanted to make the phone ring with a different sound. And finally actually ring only the extension that the ticket is assigned too.

Obviously during all of this we can add some simple validation code to make sure valid key presses are detected, etc etc.
In our case we don’t actually use SugarCRM, we use a proprietary CRM system that was written for us, but by using the above simple method you could hook into any CRM you like.

So why go to all this hassle you may ask?
Using the above process cut down on call time by a HUGE amount, (As much as 25% in some cases) as the caller was no longer having to ask "Is bob there?" (If you are lucky enough that the caller even knew the ticket was with bob!), then the agent havng to transfer the call to bob (Wasting the time of two agents!), then when bob finally gets the call he has to ask what the ticket number is (Probably again!), open his browser and type it in and searcj for it.
This all adds up to a surprising large amount of wasted agent time

Instead the call goes straight to the right person, and the only missing piece of the puzzle is having the web page open up in front of him/her without having to do anything allowing the agent to respond to the issue instantly.

Pheww, I knew that was a bit long. thanks for reading this far.

I would really appreciate anyone reading this thread who can think of other great uses for the SendURL() function to post your ideas here to help persuade Kerry to add support for it in HUD3 as I so want to place the final missing piece of the puzzle.

How about if i made all my code available for the above functionality? Would people be interested?

It's not that complex or well written for that matter, but it works, and I guess what I have put together may be enough to help others in similar positions get started.

Or even better, is trixbox ever planning on rolling out SugarCRM? Could this be a good bit of integration others might like?

Anything that will encourage HUD3 to support SendURL :o)
Thanks for your time.



jahyde
Posts: 1669
Member Since:
2006-06-02
not a bad idea, but i think

not a bad idea, but i think if it were to ever be accomplished it will probably need to be done by the community, someone like Dickson could probably wip that out in an hour ;)

--

--my PBX is runs on 2 V8's



a_lemin
Posts: 87
Member Since:
2007-01-21
Agreed :) I have no doubt

Agreed :)
I have no doubt there are others out there who could put together a simple and elegant solution for SugarCRM (Which i think is the most popular open CRM).

The thing that amazed me was just how much time was being wasted and just how much more efficient it made everyone. Not to mention how much the agents liked not having to answer calls for other people :)



rpotthoff
Posts: 97
Member Since:
2006-12-19
This would also be great for

This would also be great for a sales team, and marketing team, I work for a major manufacure and would love to have this as I know neither Nortel, Avaya or Cisco have this in there systems right now and it would be great to see tb the first to do it.



a_lemin
Posts: 87
Member Since:
2007-01-21
Hey rpotthoff, thanks for

Hey rpotthoff, thanks for the support.
How would you utilise this type of call routing to service your sales and marketing people?



Fiskfan
Posts: 8
Member Since:
2007-05-22
Sales

If you have a company with a sales dept. with more than 1 salesrep, this is very useful.

In my CRM, I should have Customer information such as Companyname, phonenumber, ciontactperson etc...

If I call and want to talk with my customer as a salesperson and they are not availble but will call me back, then this is a good solution.

The customer calls me, Asterisk identifies the caller via its phonenumber, looks the customer up in the CRM and connects the call to me since I'm the salesrep. responsible for this customer.

And of course the other, already mentioned, bling bling with popup the page with customer-based information...

Cheers
Erik



a_lemin
Posts: 87
Member Since:
2007-01-21
Hey Fiskfan, of course! You

Hey Fiskfan, of course!
You could have the call routed to the account manager for the customer by looking at the caller ID, and of course pop-up the customers CRM page as soon as the Agent/account manager picks up the phone.

I didn't think of it that way. That would be very easy to implement actually, because you could program the system to pass the ticket number if one was entered and retrieve the extension of the agent to which the ticket belongs, in the absence of a ticket number, the system could instead pass the caller ID and return the extension number of the agent who is the account manager for the customer matching the caller ID.

Kerry do you have any comments at all? In particular is there any chance of getting SendURL support in HUD3?



stechnique
Posts: 47
Member Since:
2008-02-21
BTW I haven't responded yet

BTW I haven't responded yet because I have no functionality to add, but this is the single most important feature to me. This is something our current 1500$ / month small call center solution cannot effectively do. I am pulling the plug on it, replacing it with trixbox CE. I am installing sugarCRM anyways, and so linking callers with their CRM profile is the only manual lookup and repetitive task my agents will still have to do. This would effectively void this task for maybe 80% calls in my situation. Agents happy, callers happy, company happy!



a_lemin
Posts: 87
Member Since:
2007-01-21
Hi stechnique, I did write

Hi stechnique, I did write the code for our our propriety CRM, however the only CRM specific code is in the stored procedure, thus you could have it integrate with as many different CRM systems as you like in theory, and the only code that would need changing would be the stored proc. And the agi script come to think of it because you have to load the right Database module!

Anyway, thats of the point; I would be quite happy to review and rewrite my code (Unless anyone else in the community would like to have a go) and make it work with sugarCRM. I don't have much time at the mo as I am in the middle of moving house so it may take me a while though.

However in exchange can we have SendURL support in HUD??? Kerry??? Please???

If people would like this feature help me persuade kerry :)

Thanks everyone.



stechnique
Posts: 47
Member Since:
2008-02-21
I can probably fix your AGI

I can probably fix your AGI to work with sugarCRM myself, but I haven't installed sugar yet, that's probably still a month away in the roadmap.
I'll hit you up then unless someone else has stepped in and done it by then :)



a_lemin
Posts: 87
Member Since:
2007-01-21
Sure no worries, if you want

Sure no worries, if you want what I have before I get a chance to rewrite it to make it 'friendlier' it just PM me :)



a_lemin
Posts: 87
Member Since:
2007-01-21
Kerry, SendURL support in HUD

Hi Kerry, I know you don't want to promise anything so as to not get hopes up if things work out to not be possible, but are you inclined to maybe provide SendURL support in the new version of HUD?
Please say you are. Do you need more examples? What can I do to encourage adding this simple yet great feature?



skykingoh
Posts: 1016
Member Since:
2007-12-17
The latest version of

The latest version of Astassistant has a SendURL and a launch application function.

It is worth looking at.

Scott



apple01
Posts: 139
Member Since:
2007-05-17
DB Lookup

I think it worth mentioning that not only CRM system but almost any proprietary contact or order management database can be used for customer number lookup for the purpose of call routing. All you need is to write your own query script or stored procedure.



a_lemin
Posts: 87
Member Since:
2007-01-21
Hi skykingoh, I have seen

Hi skykingoh, I have seen Astassistant before actually. The only problem though is I really don't want operators to have to have it installed.
It is a good app if you are a call centre manager I guess, but we only really want something that is simple, small (Takes up only a small amount of screen space), is tightly integrated and supported by trixbox.

There are many ways to get the URL popup functionality, one of the ways I managed to get it to work was to use asterisk desktop manager http://adm.hamnett.org/ which does not take up any screen space like Astassistant does. However again like Astassistant it is yet another application that needs to be installed alongside HUD, and one which is not tightly coupled with trixbox development etc.

I guess what I am trying to promote is a neat and tidy implementation and HUD is the perfect candidate for this :)

hey apple01, very true :) By having the CRM specific part in the stored proc, all the other code is pretty much suitable for anything, and then you simply add the appropriate SP for your CRM :)

I don't have anywhere where I can upload code examples.
Is there anywhere in the trixbox site where we can upload code snippets like this? Kerry?

Thanks guys :)



skykingoh
Posts: 1016
Member Since:
2007-12-17
I have had some Java version

I have had some Java version issues with ADM, I think there are a few others. You can "lighten" up Astassistant and I Scott (the developer) is looking at ways for users to edit the workspace views in the application.

The point I wanted to address is that all of these tool are tightly coupled to the Asterisk AGI and Asterisk releases not any specific distribution.

Scott



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.