Online registration for CWR Mobile for CRM Online

  • Recently I did a development project for CWR Mobility (http://www.cwrmobility.com). In this project I used a couple of new and interesting development techniques.

    The assignment

    The assignment was to work out and develop a web application for requesting or buying software licenses online for an application that was built by CWR.

    This application, which was built in-house, integrates itself in Microsoft Dynamics CRM and offers the user the ability to configure which elements of CRM he wants to have available on his mobile device. This can be a PDA, mobile phone, BlackBerry or IPhone. Eventually there is also a web interface available that works on all mobile devices.

    Microsoft Dynamics CRM also offers an online environment (http://crm.dynamics.com). The application can also integrate itself into this environment. To be able to use this one needs a license and to offer the users a possibility to subscribe for a license, I created a web application.

    The application

    The web application can be used to subscribe for different licenses, such as a trial or buy. To buy a license one pays monthly through use of a PayPal account. Therefore the web application contains PayPal integration. The user is also able to manage the licenses he subscribed for. Extra licenses can be ordered and trial licenses can be converted into buy licenses.

    All the registration information put in by the user is stored within CRM. If a user subscribes, a contact is created. If the user subscribes for a trial license also a lead is created, including a software license. If the user buys a license, an account is created, including a software license and a payment profile. The payment profile contains the payment details of the payment with PayPal.

    Development choices

    While working out the concepts of the application I chose to use the Microsoft MVC Framework. ASP.Net MVC (Model View Controller pattern) is an alternative to ASP.Net Web Forms and offers various advantages to ASP.Net Web Forms.

    For me it was important that I had complete control over the HTML markup and that I would be able to use friendly url’s; advantages that MVC offers. Through the separation of interface and code using the MVC pattern also more parts of the code could be tested using unit testing. See http://www,asp.net/mvc for more information.

    Techniques

    By using MVC you are more the less forced to also use other techniques, such as for form validation. Therefore I used the JQuery extension ‘xVal’ (http://xval.codeplex.com) for form validation. This extension enables the ability to do client side validation by generating JQuery script from a model with data annotations. By using data annotations on the models I was able to use the model for client as well as server validation. All the validation rules exist in one place then. More information about JQuery: http://www.jquery.com.

    Since the registration process in the web application took some time, I had to find a solution for the best way of communicating this to the user and where the user would have no control over the application in the meantime. I choose for an overlay with a modal inside that shows a message. To make this possible I used the JQuery extension ‘SimpleModal’, created by Eric M. Martin. The only thing this extension does is placing an overlay on top of the web application with on top of that a dialog box and a button to close it. See http://www.ericmmartin.com/projects/simplemodal/.

    To be able to buy licenses from within the web application I made use of the PayPal API. With this API payment details can be sent to PayPal and a payment profile can be created.

    If the user chooses to buy, a token is requested at PayPal invisible to the user. This token is generated based on the payment details that were sent with the request. The user will then be redirected to the PayPal website where he can agree to the payment. If the user agrees, he will be sent back to the web application where the registration for the licenses will start. After that a PayPal payment profile is created at PayPal. The payment occurs on a monthly basis.

    In order to test payments with PayPal during the development and the testing stage I made use of the PayPal Sandbox. The sandbox simulates the real environment almost exactly. If you want to use the sandbox, you can register for it here: https://developer.paypal.com/

    The web application is online as we speak and is used with full satisfaction. You can reach it via http://online.cwrmobility.com. Customers are now able to order licenses of CWR Mobile for CRM online.