Just another site

Tag Archives: Microsoft Dynamics CRM

Trying to build a help desk service using Dyanmics CRM 2013

The past week I’ve been consumed by my work around Microsoft Dynamics CRM 2013. Everybody was still on vacation and I stepped up to do develop the POC. My hope is to learn something and get my developer’s mojo back.

I did get a lot better at writing code, especially Linq, since that’s how I access the entities from CRM SDK.

The routing scenario in the POC is like this:

  • A customer calls the help desk. He/she dials the support hotline and punches in the selection to answer the questions asked by the IVR system path. The selections eventually lead the call to a queue.
  • The system creates a phonecall record in the CRM and a case record. The phonecall’s regading object is set to the case. Based on the info collected through IVR, the system knows this much about the case:
    • support language
    • type of service request (questions, complaints, or other types)
    • country of support
    • product family
    • other attributes…
  • These selections create a “property bag” around the case. We can use it to match the preset “property bag” for the queues in CRM. If there is a match, the case gets assigned to the queue.
  • An agent belongs to a team. The team has its own property bag. When the team’s property bag matches that of a queue, the agents in the team gets to see the queue and all the open items in the queue are up for grab by the agents.

I am not sure how a case gets routed in the out-of-box implementation of Dynamics CRM but so far I know:

  • A queue contains queuedItems.
  • a queuedItems has a n:1 relationship to any entity that’s queue-enabled: Appointment, Campaignactivity, CampaignResponse, Email, Fax, Incident, Letter, PhoneCall, RecurringAppointmentMaster, ServiceAppointment and Task.
  • The assigning of Incident (case) to Queue needs to be based on some kind of logic but I am not finding OOB support from the CRM front-end. I’ve built my own phonecall simulator to do the property bag matching logic like above but would like to learn if there’s way to do this without coding.

Other than the above, I’ve also explored using the Subject entity in CRM to representing the hierarchical reason for user’s call. So, I have the top-level subject called “Reason for Contact” that has children of major reasons for calling. Each of the child reason can have more detailed classification in its own branch. It looks good in the CRM UI. However, if I am using the same Subject entity for something else, like representing my product taxonomy, I want to have a way to configure the branch for the Incident form so that “Reason for Contact” will only show the branch under “Reason for Contact” record and not the product tree. I wish I know how to do this.


Back to Learning Microsoft Technologies

The last week was hectic.  At work, the team needs to create a POC project that uses Microsoft Dynamics CRM 2013 for case management.  Since Christmas is coming, almost everyone took off for the holidays.  Right before that, I volunteered to configure or create the CRM entities, based on the logical data model I’ve been worked on for the last 5 months.

So, I’ve downloaded the Dynamics CRM SDKs, learned how to query the entities and perform CRUD operations using the early-bound (with code generated by CRMSvcUtil.exe) object model.  I’ve also tried using the late-bound API to do the same.  In the configuration side, I’ve learned how to modify the existing entities by adding fields, relationships, and forms.  In addition, I’ve learned how to create a new custom entities.

When it comes to the data, I’ve use the settings feature to first download a Data Import Template (an XML file).  The fields in the template is based on the form I’ve created for the entity.  I then open the XML file in Excel and populate the template with real data rows.   I saved the file and use the Import Data wizard from the Settings feature to import the data rows into the CRM entity.  It then walk my through the steps where I can define the mappings between the Excel file columns and the target entity’s fields.  What’s interesting about it is that, for the “lookup” column, you can put in any field that can uniquely identify a record in the lookup entity.

My next step, after complete the configuration of entities in CRM, is to write a test harness or client app that perform simple case management activities.  The PM may not want me to do it, but, I think I should just do it myself and learn something.  I am thinking of creating a Lightswitch app to connect the OData services exposed by Dynamics CRM.  This article has good info:  There are lots of samples here.

I’ve noticed that Lightswitch let you create application based on the data endpoint.  The choices (for VS 2013) can be either database, SharePoint, OData Service, or WCF RIA Service.  The last one piqued my interest so I am going to try it.  I don’t remember whether I’ve heard about the WCF RIA Service before or not.  This post has a good walkthrough that I am going to try soon:

I have not done any extensive application development since 2007 because my focus shifted to BI.  There were so much to learn and I can say I am 80% on top of the Microsoft BI stack now.  With my renewed interest in coding, there are so much to catch up.