just coding...

Dynamics CRM 2016 - Alternatif Anahtarlar (Alternate Keys)

Dynamics CRM 2016 icerisindeki guzel ozelliklerden biri de artik bir kaydi tanimlamak icin Guid disinda alternative bir anahtar da tanimlayabiliyor olmamiz. Bu sayede CRM’i baska sistemlerle entegre etmek daha da kolay hale gelmekte. Excel’den veri aktarimi yapmak ya da baska bir uygulamayla entegre ederken diger uygulamanin tanimlayicilarini CRM icersinde tanimlayabilmek bize buyuk esneklik kazandirmakta.

CRM arabiriminde Ayarlar(Settings)->Ozellestirmeler(Customization)->Sistemi Ozellestir(Customize System) adimlarini takip ederek herhangi bir nesne(entity)yi actigimizda anahtar tanimlama ekranina ulasabilmekteyiz.

Bu ekran vasitasiyla tanimlayicilari ekran goruntusunde gosterildigi gibi tanimlayabiliriz.

Burada onemli olan nokta ise gereksinimlerinize gore bir ya da birden fazla alani birlestirerek bir anahtar olusturabiliyorsunuz.

Bir alternative anahtar olusturdugunuzda arka tarafta CRM veritabani uzerinde sorgu performansini artirmak amaciyla bir bir sistem ise calismakta ve bir index olusturulmaktadir. Sistemdeki kayit sayiniza bagli olarak bu islem biraz zaman alabilir.

Bu arada String, Integer, Decimal alanlari bu islem icin kullanabilirsiniz. Olusturdugunuz key’i Update ve Upsert (yani Update or Insert) isleminde kullanabilirsiniz.

            using (var service = new OrganizationService(crmConnection))


                // Use alternate key (accountnumber) field to identify an account record

                Entity account = new Entity("account", "accountnumber", "MWNS-123");


                // Set new credit limit;

                account["creditlimit"] = new Money(120000);


                // Entity reference using alternate key (emailaddress1) on contact entity

                account["primarycontactid"] = new EntityReference("contact", "emailaddress1", "");


                UpdateRequest request = new UpdateRequest() { Target = account };

                UpdateResponse response = (UpdateResponse)service.Execute(request);


Bu kullanim seklinin disinda bir de Entity ve Entity Reference siniflari icerisinde KeyAttributes olarak da erisme ve kullanma hakkina sahibiz.

            using (var service = new OrganizationService(crmConnection))


                // Use alternate key (accountnumber) field to identify an account record

                Entity account = new Entity("account")


                    KeyAttributes = new KeyAttributeCollection


                        {"accountnumber", "MWNS-123" }




                // Set new credit limit;

                account["creditlimit"] = new Money(100000);


                // Entity reference using alternate key (emailaddress1) on contact entity

                account["primarycontactid"] = new EntityReference("contact")


                    KeyAttributes = new KeyAttributeCollection


                        {"emailaddress1", ""}




                UpdateRequest request = new UpdateRequest() { Target = account };

                UpdateResponse response = (UpdateResponse)service.Execute(request);


Eger CRM icerisinde talep ettigiginiz key bulunmaz ise asagidaki hatayi alabilirsiniz.

A record with the specified key values does not exist in account entity

Bu linklerden daha detayli bilgi alabilirsiniz.

Marketing Management And CRM


Relationship Marketing (RM), Customer Care and the all-important ‘people element’ of an organisation has become the focus of a new approach for most organisations.

Customer Service and Customer Care are in fact part of the broader concept of RM and are included in systems of Customer Relationship Management (CRM).

Marketers are attuned to the idea that delivery of extra ‘added value’ through service, customer care and people dimensions is the critical competitive factor.

Increasingly, customers are looking for good service delivery and quality and will respond positively to high standards of customer care from the marketer.

High levels of service and customer care should be seen as part of a broader programme of Customer Relationship Management (CRM).

·         From the marketer’s point of view, RM makes good business sense, primarily because of the costs of recruiting new customers compared to the costs of keeping existing ones and, related to this is the notion, the ‘life time value’ of customers.

·         In terms of costs, it is known it costs much more to gain a new customer than to retain an old one.


The subject of CRM is focused upon relationships so it is important to answer these two key questions:




Relationships are complex opportunities to learn and through mutual exchange build dependencies and trust.

This is the essence of their significance, however, the importance of the relationship is that it has to be felt.

Forming relationships and sustaining relationships is different, each requires relevant levels of energy and commitment.

Relationship is an emotional concept which needs nourishment in order to remain a valued relationship.

The emotional attachment being much less in the case of Transactional Relationships is a most substantial engagement in an involved relationship.

Moving from independence to interdependence requires significant investment in time, dedication and devotion and faith.



             The convenience of time and place

             Productivity and efficiency

             Psychological comfort

             Ease of connection

             The feeling of comfort

             Meeting unmet or unfulfilled needs and the need to bond

             Support, stability and continuity

             The right platform


             Attachment to an identity


             Poor, disappointing experiences which create low switching costs to competitor products

All these are people based, customers are people with feelings, many of which prefer a relationship basis to business than an uninvolved transactional approach. This is also important when the marketer is working across cultures and needs to understand how relationship are the basis to business.


The essence of all relationships is trust, how it is perceived, determined, exchanged and experienced.

Trust is built over time, through rational and emotional factors based upon source credibility, linked to an identity.

Trust is reinforced by the delivery on promises and the development of customer intimacy throughout the customer life cycle.

The life time value of a customer, achieved through repeat purchase loyalty is based upon a ‘trust bond’ that has been formed between the marketing organisation and the core customer groups.


It is well acknowledged that the strategies for successful market leadership are simple in definition but difficult to achieve and sustain. These are: -

1.       PRODUCT LEADERSHIP: Having the ‘best product’, well-differentiated from the competition

2.       OPERATIONAL EXCELLENCE: Sustaining consistent operations and controlling the overall cost

3.       SERVICE LEADERSHIP: Having the best total service

4.       CUSTOMER CARE: Having the best total solution for customers

 All of this is embedded in the total delivery to the customer which is manifest in the Brand identity. Therefore the marketer cannot ignore the vital role played by customer care.

The future of the business is with the customer, therefore systems to ‘hear the voice of the customer’ are important for companies, so that they remain relevant to customer needs.


Definitions are various, in fact understanding CRM and perceptions of it are also multi-dimensional.

At a simplistic level, CRM is simply database management of customers; at a strategic level it describes total customer experience management.

At a rational level, the definition of CRM is to optimise customer satisfaction within resource constraints with a view to maximise shareholder return.

At a conceptual level, CRM is envisaged as a comprehensive integrated customer strategy which involves customer identification, customer acquisition and customer retention to drive profitable customer loyalty through value-based customer processes and services.

CRM is therefore intended to support customer relationships through well-conceived organisational structures, business processes and customer-based policies which include IT-based solutions and supporting software. Many organisations are still starting out on this journey. Some are along the road, although reaching a final destination is a real challenge because the market landscape is always evolving.

 CRM nevertheless is a defined strategy for achieving business objectives which enable effective responses to customer needs to help organisations acquire, grow, and retain profitable customer relationships. It depends upon relevant, reliable, robust, viable information about customers for company-based relationship management and in turn an opportunity to achieve customer process improvements.

Defining and redefining the boundaries of CRM remains a challenge and its adoption will depend upon the evolution of the organisation, as mentioned it may be a journey without a final destination.

In more progressive organisations, CRM is process-driven, with a clear focus upon the total customer service encounter whereby the ‘total customer experience’ is the main route to sales and profitability. In this case where CRM has really been adopted three approaches can be identified: -

·         Collaborative CRM

·         Analytical CRM

·         Operational CRM

Collaborative CRM involves partnerships between the company and its customers and also networks where interdependencies are built based upon commonly held objectives (e.g. value chain interdependencies).

Analytical CRM uses customer data as an asset for shaping future customer-based marketing and sales initiatives. This will cover traditional areas for customer analysis such as segmentation, customer purchase metrics for customer acquisition, customer retention, up-selling, customer profiling, customer lifetime value and customer credit rating.

In addition, research into the total customer experience, into customer value creation and maintenance to achieve a 360 degree view of the customer is all within the domain of Analytical CRM.

Operational CRM is a set of activities that work within a corporate culture in the drive for customer centricity. Operational CRM (excluding the IT component) uses profiled customers and named contacts to build valued relationships over multiple purchase related transactions.

These transactions have points of contact between the company and the customer called ‘touch points’ which need to be carefully managed. Collectively these become the foundation for the ‘Total Customer Experience’.

In very simple terms, Operational CRM is about

                    Finding new customers

                    Getting to know them

                    Staying connected

                    Knowing how you are valued for future business transactions with them

                    Ensuring customer expectations are met

                    Checking that promises have been kept and have been worthwhile in the eyes, heart and mind of the customer

The benefits are customer retention and customer loyalty through repeat business and knowing the lifetime value of the customer to the business


Customer Centricity is based on the original concept of marketing

“Profit through Customer Satisfaction”

The rationale for adopting this company wide corporate culture is simply that new solutions are needed to bridge the shareholder value gap. Shareholders expect more return, the answer is in the market place! This can best be achieved by growing customer value in terms of the customer base and the value of purchases made. Top management has been awakened to the fact that customer centricity actually works. Many organisations are placing the ambitions for customer centricity as a high priority.

To define Customer Centricity in more detail: -


Total Organisational Commitment To The Adoption Of The Marketing Concept As A Working Belief System For Business, Whereby Existing & Future Customer Needs, Wants, Values and Expectations Are At The Epicentre Of All Management Decisions Supported By A Relevant Operating Culture For The Achievement Of Progressive Shareholder Value, Through Confirmed Customer Satisfaction. Massingham 2008

This is a huge undertaking for companies who have been product centred or sales oriented, it requires a mind-set adjustment across the business or organisation as a whole. It requires so much more effort than most managements are aware. There may be a significant gap between the AMBITION for customer centricity and the ABILITY to achieve it.


There are a series of steps to be taken: -

                    Know the Customer Base and have this captured in a data base system for analysis and retrieval

                    Segment Customers Into Meaningful Groups

                    Profiling the Customers within each segment according to meaningful characteristics which may influence purchase behaviour

                    Know The Financial Performance Of Each Segment in terms of income and profit

                    Build A Marketing Strategy For Growing Customers

                    Build Systems For Customer Loyalty, Customer Connections and Relationships

                    Build The Brand through sustained investment in Brand Identity because this is the anchor the customer and the employees will attach themselves to

                    Energise for Positive outlook at the Customer interface all the time.

You Must Really Know:-

                    Who Are Your Customers?

                    Where They Are Located?

                    What Motives Induced Purchase /

                    Why They Return To You?

                    Why They Return Again?

For many companies, this is where the CRM journey begins


For more traditional organisations, especially family owned small and medium sized businesses there may be a lack of customer focus. Staff are motivated to maintain existing systems and the customer is forced into patterns of behaviour to suit those systems. Often customer needs therefore are not met and customers are lost where staff try to help, the systems will experience problems and staff become de-motivated. This is really quite common.

Company management may not be willing to change because this ‘status quo’ formula for business has always worked, so therefore management have entrenched attitudes and they are not really concerned about customer feedback.

There is a prevailing mind-set that ‘price is the only thing that matters’, in which case employees believe that ‘the voice of senior management is more important than the voice of the customer’.

CRM Workflow Mimarisi

28 Kasim Carsamba günü saat 20:30 - 21:30 arasında bir webcast verecegim. Internet uzerinden yapilacak olan bu yayina herkes katilabilir. Link daha sonra paylasilacaktir.

CRM Semineri

15 KasimPazar günü saat 10:30 - 16:30 arasında Omerd Business Solutions ofisinde "CRM, XRM Kavramları ve Dynamics CRM" konulu bir seminer vereceğim.

CRM Raporlama Mekanizmasi

12 Kasim Carsamba günü saat 20:30 - 21:30 arasında bir webcast verecegim. Internet uzerinden yapilacak olan bu yayina herkes katilabilir. Link daha sonra paylasilacaktir.

CRM Semineri Duyurusu

11Temmuz Cumartesi günü saat 10:30 - 12:30 arasında Bahçeşehir Üniversitesinde "CRM, XRM Kavramları ve Dynamics CRM" konulu bir seminer vereceğim. İçerik ise şu şekilde olacak; Dünya’da uzun yıllardır konuşulan CRM “Müşteri İlişkileri Yönetimi” kavramı müşterimizin neleri sevdiğini, neye para harcadığını ve neleri yapmaktan hoşlandığını kısacası bize müşterimizin kim olduğu gösteren temeller üzerine oturmuştur. XRM sadece müşteri değil onun haricinde dış dünyada yönettiğimiz varlıkların bize kim/ne olduğunu  göstermektedir. İşte bu seminerde Microsoft Dynamics CRM’in bu iki kavramın ortasına nasıl oturduğunu ve programatik olarak nasıl geliştirilebileceği anlatılacaktır.

Microsoft Dynamics CRM, adındaki CRM ibarisi nedeniyle sadece Müşteri İlişkileri departmanlarını ilgilendiren bir yazılım olarak anlaşılmaktadır. Aslında Dynamics CRM bir platfomdur ve üzerinde sizin şekillendirdiğimiz bir çok altyapıya destek verebilir.

New Features with Microsoft Dynamics CRM 2016


Offline mobile capabilities

More new Cortana integrations (beyond what's there already in Dynamics CRM) with sales activities

Tighter integration with the Cortana Analytics Suite

Better mobile app management with Intune

Next release of Microsoft's CRM app for Outlook that will allow users to track emails, add contacts and create records through the browser on PCs or Macs or mobile browser on a phone

Ability to open Office apps within CRM or CRM mobile app


Personalized sales documents

New Excel templates for automating many core tasks

Integrated Delve functionality

Improved Outlook Experience

Customer Service

Unified Service Desk


Social Listening and Social Analytics

More use of Azure Machine Learning for sentiment analysis in Microsoft Social Engagement

You can also quick lookup this document for more details :

Dynamics CRM ve Application Insights Entegrasyonu

Bircok Microsft Azure servisini Dynamics CRM ile entegre edebilmekteyiz. Bunlardan en guzel orneklerden birisi Application Insights ve Dynamics CRM birlikteligi. Bu makalede bu Application Insights ile Dynamics CRM'i nasil konusturacagimizi gorecegiz. Oncelikle Application Insights'in ne olduguyla baslayalim isterseniz. 
Visual Studio Application Insight bir telemetri servisidir yani bir sistemi detayli olarak incelemek sitediginizde ona veri gonderdginiz ve bu verileri detaylari bir sekilde grafikler ve tablolar halinde izlediginiz sonucunda rapolar alarak sisteminizin durumu hakkinda bilgiler edindiginiz bir hizmettir. Kisacasi size sisteminizin saglikli calisip calismadigi hakkinda olceklenebilir bilgiler vermektedir.
Dynamics CRM ise bir web tabanli uygulama oldugundan IIS uzerinde olusan web sayfasi goruntuleme taleplerini bunlarin suresini ve bu taleplerin kimden geldigini, hangi sayfalara bakildigini detayli olarak Application Insights'a aktarabiliriz.
Hadi baslayalim.

Azure icinde Application Insights kaynagi olusturalim

Azure hesabiniz yoksa bu adresten olusturabilirsiniz. Sisteme giris yaptiktan sonra Browse'a tikladiktan sonra Application Insights'i secenegini ile olusturma penceresini aciyoruz burada tek dikkat etmeniz gereken nokta Application Type seceneginde Asp.Net'i secmeniz gerekmekte. Gerekli bilgileri doldurdukran sonra Create dugmesiyle kendi Application Insights'inizi olusturabilirsiniz.

Bu noktadan sonra ekrandaki grafiklere tiklayarak her bir grafik bolumunun icinde o bolume nasil veri atabileceginize dair ornekler yer almakta.

JavaScript ile CRM icerisinden veri gonderelim

Dynamics CRM'i acip Ayarlar(Settings)>Ozellestirme(Customization)>Customize the System(Sistemi Ozellestir) bolumunden yeni Web Resource(Web Kaynagi) ekliyoruz.

Ben asagidaki kod parcasini kullaniyorum bu kod parcasi ile CRM icerisinden kullaniciyi ve islem yapilan entity'i(nesne) parametre olarak gonderiyorum.

var UserName;
var Alias;
var serverUrl;

function Getinfo() {
    var context;
    var UserID;
    var ODataPath;
    var selectFields = "$select=DomainName,FullName";

    context = Xrm.Page.context;
    serverUrl = context.getClientUrl();
    UserID = context.getUserId();
    ODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";

    var retrieveUserReq = new XMLHttpRequest();"GET", ODataPath + "/SystemUserSet(guid'" + UserID + "')?" + selectFields, false);
    retrieveUserReq.setRequestHeader("Accept", "application/json");
    retrieveUserReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    retrieveUserReq.onreadystatechange = function () {

function retrieveUserReqCallBack(retrieveUserReq) {
    if (retrieveUserReq.readyState == 4 /* complete */) {
        if (retrieveUserReq.status == 200) {
            var retrievedUser = JSON.parse(retrieveUserReq.responseText).d;
            if (retrievedUser.FullName != null) {
                UserName = retrievedUser.FullName;
                Alias = retrievedUser.DomainName;

function captureTelemetry() {
    var appInsights = window.appInsights || function (config) {
        function s(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, r = document, f = window, e = "script", o = r.createElement(e), i, u; for (o.src = config.url || "//", r.getElementsByTagName(e)[0].parentNode.appendChild(o), t.cookie = r.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) s("track" + i.pop()); return config.disableExceptionTracking || (i = "onerror", s("_" + i), u = f[i], f[i] = function (config, r, f, e, o) { var s = u && u(config, r, f, e, o); return s !== !0 && t["_" + i](config, r, f, e, o), s }), t
        instrumentationKey: "Burayi degistirin"

    window.appInsights = appInsights;
    appInsights.trackPageView(, serverUrl, { User: Xrm.Page.context.getUserName(), DomainName: Alias });

function startPoint() {

Kodun icerisindeki "instrumentationKey: "Burayi degistirin"" bolumundeki instrumentationKey "Essentials" altinda bulabilirsiniz. 

Ben yukaridaki kodu Account(Firma) ve Contact(Contact) entity'lerinin onLoad event'lerine yerlestirdim.

Bunu yapmak icin form uzerindeki uc noktaya tikiiyoruz ve form duzenleyicisini aciyoruz. Form duzenleyicisi uzerinden Form Ozelliklerini aciyoruz ve biraz once eklemis oldugumuz js web kaynagini buradan seciyoruz ve ekliyoruz.

Yapmis oldugumuz degisiklikleri kaydedip formu yayinliyoruz,
Artik form her acildiginda  Application Insights'e veriler gidecektir. Benim demo sistemimden elde ettigim ekran goruntuleri asagidaki gibidir. AppInsights'a ilk girdigimde asagida goruldugu gibi bir ekran bizi karsilamakta. Sirasiyla bu kutucuklara tiklafdigimda detayli bilgileri almaktayim.

Request ve Response zamanlarini;

Kullanicinin sayfalari ne zaman hangi cihazdan cagirdigi ve yuklenme surelerini;

hangi formlarin ne kadar cagrildigini;

ve metadata bilgilerine;

yukarida goruldugu gibi ulasabilmekteyim. Bunun haricinde formlarda olusan hatalari ve kullanici detaylarini(geolocation gibi) da almaktayim. 

Application Insights hakkinda daha fazla bilgiye buradan ulasabilirsiniz.

CRM Plugini Yaziyoruz :)

23 Eylul Carsamba günü saat 20:30 - 21:30 arasında bir webcast verecegim. Internet uzerinden yapilacak olan bu yayina herkes katilabilir. Link daha sonra paylasilacaktir.