Thursday, August 28, 2008

Invoking MS CRM from other applications

The Active Directory security model of MS CRM is amazingly flexible and allows  powerful control inside of CRM, but when integrating with systems outside of CRM, AD security really shines.

One of the great things about AD security is that your users do not have to log into CRM after they are logged into a domain on their computers. This means that third party programs can just call into CRM with web services to get information as they need it. Reporting services written against the filtered views only show CRM users what they are allowed to see and CRM forms can be pulled up whenever it is convenient.

CRM from Links
Since CRM is a web application ANY entity form can be opened directly from Internet Explorer. Below is an example link to a specific contact.

http://crmserver1:5555/MicrosoftCRM/sfa/conts/edit.aspx?id={DE1F590A-37D0-DC11-AA32-0003FF33509E}#

Application: Directly accessing a CRM entity can be really handy for email messages generated from CRM, as you can send an email to the appropriate person with a link to an an entity requiring attention and even send instructions telling them what to do with it once they click on the link. In this way users require less training and have faster access to the information they need.

Implementation Details: Just create one mail group in exchange for each of the applicable types of mail they you need ( ie. CRMerrors, CRMmaint, CRMreports, etc... ). This way IT can administrate who gets the email without touching the CRM servers. Mail relaying from the CRM server to the Exchange Server will need to be set up first. Scheduled status emails with links for additional information could be routed to CRMreports, all your exceptions could be sent to CRMerrors, and anything that a business rule picks up on during the running of a plugin can email CRMmaint with a link to the entity in question with an explanation of what needs to be addressed. This can be useful with marginal data that is imported from another system and needs some massaging, or anything else that is flagged by internal business rules requiring decisions.

Hint: If you need a link for an specific entity, but that part of explorer is hidden, type <CTRL>N and a new fully functional browser will show up that you can cut a URL from or use other tools like the Web Accessibility Toolbar to examine the markup.

CRM from the command line
From the command line you can also open that page which could be useful for batch files.

C:\ @start "" /b "iexplore.exe"http://crmserver1:5555/MicrosoftCRM/sfa/conts/edit.aspx?id={DE1F590A-37D0-DC11-AA32-0003FF33509E}#

CRM from another application
Another application can automatically pop an entity up on the screen whenever some trigger occurs.

// Get contactID from information passed to auto dialer client
string contactId = "{DE1F590A-37D0-DC11-AA32-0003FF33509E}";

var proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="iexplore";
proc.StartInfo.Arguments = String.Format("http://crmserver1:5555/MicrosoftCRM/sfa/conts/edit.aspx?id={0}#", contactId);
proc.Start();
Application: Most auto dialers have a client that is customizable to do "screen pops" or to open a specific application when a call is connected to their phone. Ideally CRM has the marketing list stored and is generating the auto dialer lists that include some unique information like a Lead or Contact Guid, or at a bare minimum some unique information that can be queried against in CRM. Now your call center person can immediate do things related to that contact without having to look that contact up or even log into CRM, or by using CRM web services a related entity like an opportunity or a campaign could be popped instead.

Implementation details: If CRM is generating your auto dialer lists then make sure to include the appropriate guid of the entity that you want to pop with the data sent to the client. If your auto dialer is fed from another source, you might want to re-examine that. CRM imports leads from many sources very easily and creating auto dialer data from a Campaign associated with a given marketing list works very well. Then you want to make sure that your auto dialer client also tracks the results from a call so that you can use web services to create a Campaign Response record in CRM to track how successful your Campaign was.

No comments: