Connect to Dynamics 365 Web API using OAuth 2.0 – Authorization Code Grant Type

In the previous post we covered Password and Client Credentials grant type, here we’d be looking at the Authorization Code Grant Type.

The Authorization Code Grant Type is for the Confidential Clients i.e. basically for the server side web applications that are written in server side language and source code is not available to the public. So these application can use client secret when requesting token with authorization server. We can also have Single-Page Apps, who have their entire source available to the browser, and that cannot maintain the confidentiality of the Client Secret, use the same flow for getting the authorization code and in the step when requesting for access token pass only the client id and authorization code without using client secret.

In Authorization Code Grant Flow

  • The client application redirect the user agent to the Azure AD Authorization Endpoint.

Mainly it passes below values to the

response_type code
client_id Application Id
redirect_uri Redirect URI specified.

To

  • The user authenticates and consents the client application

  • The Azure AD authorization endpoint redirects the user agent back to client application with an authorization code at the redirect URL (i.e. code query parameter)

  • The client application uses this authorization code to request the access token from the authentication token endpoint by passing resource, client_id, grant_type = “authorization_code”, code and redirect_uri as shown below.

  • The Azure AD issues the access token, which the client application can use to call the Web API.

For our sample code to work: –

First Register the Application with Azure Active Directory to get the ClientId.

Get the authorization and token end point. Navigate to Overview and click on Endpoint to get these endpoints.

Also specify a Redirect URI for the application.

Navigate to Authentication and select the suggested Redirect URI.


Below is the sample C# Code: –


static void Main(string[] args)
{
// Dynamics CRM Online Instance URL
string resource = "https://bankfabdemo.crm.dynamics.com";

// application id
var clientId = "eb17e844-adfc-4757-ba6d-5384108e184a";

// redirect URL
var redirectURI = "https://login.microsoftonline.com/common/oauth2/nativeclient";

// Authenticate the registered application with Azure Active Directory.
AuthenticationContext authContext =
new AuthenticationContext("https://login.microsoftonline.com/bd88124a-ddca-4a9e-bd25-f11bdefb3f18/");

AuthenticationResult authResult = authContext.AcquireToken(resource, clientId, new Uri(redirectURI));
var accessToken = authResult.AccessToken;

// use HttpClient to call the Web API
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("OData-MaxVersion", "4.0");
httpClient.DefaultRequestHeaders.Add("OData-Version", "4.0");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authResult.AccessToken);

httpClient.BaseAddress = new Uri("https://bankfabdemo.crm.dynamics.com/api/data/v9.0/");

var response = httpClient.GetAsync("WhoAmI").Result;
if (response.IsSuccessStatusCode)
{
var userDetails = response.Content.ReadAsStringAsync().Result;
}

}

Within Postman :

Click on Request Token, login and give consent à

The token à

Hope it helps..

Advertisements

Connect to Dynamics 365 Web API using OAuth 2.0 – Client Credentials

In the last post we learned about connecting to Dynamics 365 Web API using Resource Owner Password Credential (ROPC), here we’d be covering the Client Credentials grant.

Client Credentials grant is designed for the client applications who are the resource owner and when basically there are no users involved, a batch (cron) job or a service using Web API, running in the background, on the server is one such example.

Here we will not be using the authorization endpoint, and the client application will be sending its own credential, instead of impersonating a user, directly to the token endpoint. The benefit compared to basic authentication or API keys is that credentials are not being sent with every request, it is only sent while requesting the access tokens along with all the other benefits of using access token – stateless, fine-grained access control, access token lifetime etc.

Let us see an example of using the Client Credentials grant in our console application. Along with the Client Id that we got when we registered our client application in the Azure Active Directory, we would need the Client Secret.

Follow the below steps to generate the Client Secret

Login to Azure Admin Portal

https://portal.azure.com

Select the application registered and click on Certificates & secrets option


Click on New client secret button to generate the client secret. Copy the generated client secret. Select the expiry as per the need.

Copy the secret generated and save it, as it won’t be available later when we are navigating here.

Also, we can get the Authentication Token Endpoint, for that navigate to Overview à Endpoints

And copy the OAuth 2.0 token endpoint.

Next step is to create the Application User within Dynamics 365 CE corresponding to the client application.

Login to Dynamics 365 CE, Settings à Security à Users àset View as Application Users and click on New button

Set Application Id as the Client Id of the Application registered and specify other mandatory values and save the record.

Assign appropriate security role to the new application user added.

Sample C# Code à


static void Main(string[] args)
{
// Dynamics CRM Online Instance URL
string resource = "https://bankfabdemo.crm.dynamics.com";

// client id and client secret of the application
ClientCredential clientCrendential = new ClientCredential("eb17e844-adfc-4757-ba6d-5384108e184a",
"p.eS+MI9cXkO_gQ02_lMlUXVSVCujyU0");

// Authenticate the registered application with Azure Active Directory.
AuthenticationContext authContext =
new AuthenticationContext("https://login.microsoftonline.com/bd88124a-ddca-4a9e-bd25-f11bdefb3f18/oauth2/v2.0/token");

AuthenticationResult authResult = authContext.AcquireToken(resource, clientCrendential);
var accessToken = authResult.AccessToken;

// use HttpClient to call the Web API
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("OData-MaxVersion", "4.0");
httpClient.DefaultRequestHeaders.Add("OData-Version", "4.0");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authResult.AccessToken);

httpClient.BaseAddress = new Uri("https://bankfabdemo.crm.dynamics.com/api/data/v9.0/");

var response = httpClient.GetAsync("WhoAmI").Result;
if (response.IsSuccessStatusCode)
{
var userDetails = response.Content.ReadAsStringAsync().Result;
}

}

Within Fiddler à

Within Postman à

Hope it helps..


Connect to Dynamics 365 Web API using OAuth 2.0 – Resource Owner Password Credential (ROPC)

The ROPC grant type should only be used in scenario when the Client application is absolutely trusted with user credentials and when redirect based flow are not possible. It was introduced for the Legacy Application for quick migration and is now more or less considered obsolete by OAuth Working group, and ideally should not be used.

In this flow, User enters his credentials (username and password) in the client application, when is then sent to Token Endpoint of the Authorization Server for Access Token request. The client application then gets the access token and call/request the protected resources (Web API) and get response. Here we remove the user from the authorization process and are not using the Authorization endpoint at all. The apps using this flow will lose the benefits of multi-factor authentication MFA and Single Sign-On.

Request à

client_id Client id of the app registered in Azure Active Directory.

We can also use the default client id –

2ad88395-b77d-4561-9441-d0e40824f9bc” –

which is setup against Dynamics 365 Online instances.

https://www.crmviking.com/2017/08/piggybacking-on-msdyn365.html

username User’s username
password User’s password
grant_type password
resource Dynamics 365 URL

Sample C# Code à

Create the console application and add the following Nuget Package

https://docs.microsoft.com/en-in/azure/active-directory/develop/active-directory-authentication-libraries


static void Main(string[] args)
{
// Dynamics CRM Online Instance URL
string resource = "https://bankfabdemo.crm.dynamics.com";

// ID of the Application Registered
// "2ad88395-b77d-4561-9441-d0e40824f9bc" - Default Client Id which is setup against Dynamics 365 Online instances.
string clientId = "2ad88395-b77d-4561-9441-d0e40824f9bc";

// username and password of the user
UserCredential userCrendential = new UserCredential("nishantrana@bankfabdemo.onmicrosoft.com", "*******");

// Authenticate the registered application with Azure Active Directory.
// Token URL - https://login.microsoftonline.com/common/oauth2/token

AuthenticationContext authContext =
new AuthenticationContext("https://login.windows.net/common");

AuthenticationResult authResult = authContext.AcquireToken(resource, clientId, userCrendential);
var accessToken = authResult.AccessToken;

// use HttpClient to call the Web API
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("OData-MaxVersion", "4.0");
httpClient.DefaultRequestHeaders.Add("OData-Version", "4.0");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authResult.AccessToken);

httpClient.BaseAddress = new Uri("https://bankfabdemo.crm.dynamics.com/api/data/v9.0/");

var response = httpClient.GetAsync("WhoAmI").Result;
if (response.IsSuccessStatusCode)
{
var userDetails = response.Content.ReadAsStringAsync().Result;
}

}

The result: –

Inside Fiddler à

Hope it helps..

Subgrid, QuickView, Linear Gauge, Arc Knob, Linear Slider controls added in new model-driven form designer (WYSIWYG) in PowerApps

Recently we were trying out the model-driven form designer and noticed the option of adding new input control to the form in it.


Few days back only I wrote about the addition of Subgrid control, however the limitation was that we couldn’t add new subgrid control. But with the new updates, we can now add new subgrid control along with Quick View and other controls also as shown below.

The other option to configure these controls is from the Controls tab of the field properties dialog box.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/use-custom-controls-data-visualizations

Hope it helps..

Sub-Grid added to the new model-driven form designer (WYSISYG) in PowerApps

Hi,

Microsoft is steadily adding all the essential features to the new model-driven form designer (preview) making it more and more usable and intuitive.

Latest addition is the support for sub-grid as shown below

The properties window for the sub-grid

`

We can select the view from either the related entities or view from any of the un-related entity (uncheck Related Records check box).

Similarly, we can enable view selectors and can show all the views or selected view as shown below.

We still can’t add new sub-grid to the form in the new form designer, for that we still need to go back to our classic form designer.

Check out below articles for more details –

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/form-designer-overview

The new model-driven form designer WYSISYG Editor

Few improvements in the new model-driven form designer.

Hope it helps..

XrmToolBox – Using User Profile Migration tool for quickly updating User’s security roles on changing the Business Unit

Few weeks back, we Rahul Tiwary and Prashant Maurya developed a tool named User Profile Migration for moving Users along with their respective BU’s, Security Roles and Teams that they are part of from one instance to another.

Our earlier tool User Security Manager provided feature to update the BU, Security Roles, Team, Field Security Profile of the users(s). However when you change the BU of the user, just like our OOB behaviour of Dynamics CRM, all the security roles get removed.

What if we want to quickly update the BU of the user keeping the same the Security Roles assigned. (We need to make sure the new BU has all the same Security Roles, which ideally would be the case if we have created them at the root Business Unit level )

To do that – we can use User Profile Migration tool.

We can download the user profile (xml format) and only update the Business Unit name there and upload the file back in the tool.

Check the step by step guide here

https://rahultiwarydynamiccrmblogs.wordpress.com/2019/05/14/dynamic-crm-user-profile-migration/

Hope it helps..

Apply SLA choosing the SLA in the SLA lookup field for the SLA Enabled Entities in Dynamics 365 CE

One of the enhancements that came in SLA (CRM 2016 Update 1), which I feel has got unnoticed by few, is choosing the SLA manually using the SLA lookup field.

As we all know SLA comes already enabled for Case Entity and can be enabled for the below entities

Account, Contact, Order, Invoice, Quote, Opportunity, Lead, Activity Entities.

Basically, the above entities have SLA lookup field already created for them.

We can also Enable SLA for custom entities and activities, which will create the SLA lookup field in it.

Add the field on the form and select the appropriate SLA, and that selected SLA will be applied to that record.

It saves us from defining multiple SLA Items for an SLA to be applied as DEFAULT or to use the entitlements to achieve the same.

Hope it helps..

ClickDimensions Features (Pros and Cons) and QuickStart guide

Word Version : https://1drv.ms/w/s!As1evjwQ4RIjjZRve-ZmrICdtmZoaA?e=KVDUDB

Pros of using ClickDimensions with Microsoft Dynamics CRM \ 365

Easy to set up and configure. ClickDimensions will provide a solution file which needs to be imported to the Dynamics CRM Web Application. It doesn’t require any setup files or any other infrastructure to be configured as it will be using the existing CRM Infrastructure.

Below we can see the ClickDimensions installed as Solution on top of existing Dynamics CRM instance. The solution import is followed by some basic configuration and we are up and running in no time.

It is the only tool available in the market that is natively embedded and exclusively built for Microsoft Dynamics CRM. So, the Microsoft Dynamics CRM Users will not have to switch between separate applications for the marketing needs and can use their existing Dynamics CRM skills for their marketing needs. It basically adds the required Group, Area and Subarea within CRM Web Application’s SiteMap as shown below.


As it is natively embedded with CRM, it has direct access to all the information and the data to be targeted for marketing like lead, contact, accounts and marketing lists that reside within CRM. In case of any other marketing tool, we’d have a Dynamics CRM Connector that needs to configured to sync the same data periodically and maintained at two different places one inside Dynamics CRM and other the marketing tool.

Relatively cheaper and cost-effective than other marketing tools available in the market Marketo, HubSpot, Pardot, etc.

Below are some of the prominent features provided by ClickDimensions for marketing needs

Email Marketing

The Email Marketing provides features specific to sending emails (Newsletters, Special offers, Instructions, etc.) to customers along with insights and statistics on how the customers are interacting with the emails.

Marketing List

To send bulk email, we would need to create a marketing list (static or dynamic). Marketing list can be used to target Lead, Contact or Account records inside Dynamics CRM.

Below is a sample Static Marketing List in Dynamics CRM

Clicking on the Manager Members button in the ribbon menu allows adding members to the marketing list.

Advanced Find option within Manage Members dialog box let us define the criteria for the members to be targeted as part of the marketing list for e.g. contact having age greater than 30.

In the case of Dynamic Marketing List, instead of actual members (records), query or criteria is saved in the marketing list and the marketing list members get updated automatically based on the query specified.

Email Templates

To create an email template in Dynamics CRM, navigate to ClickDimensions à Email Templates. Email Templates are used to design the Emails to be sent to the customer or clients. Email Templates can be reused or cloned to update some of the content to be sent to the recipients.

ClickDimensions provide different type of editors for designing Email Template as shown below à

  • The Drag and Drop editor allows creating email templates easily through dragging different types of content into different sections of the editor and editing the style and content of each cell and the entire email.

  • The Block Editor allows to easily create the templates by customising a built-in layout with a What You See is What You Get Editor.

  • The Free Style Editor is a little more advanced and allows the use of HTML with a What You See is What You Get Editor. If we already have email layouts designed, we will want to choose Free Style and upload our layout.

  • Custom HTML has very few buttons and is strictly HTML; there is no Design type of view. Use Custom HTML if you have created the template outside of ClickDimensions and don’t want to make any changes or additions, or if you know HTML well enough.

Email Template entity also provides a field called Text Version which allows you to specify the Text Version of the email so that anyone who cannot or wishes not to receive HTML in emails can still read the email.

Email Sends

Email Sends are the records using which the Email Templates created are attached to the marketing list and emails are sent out to the members of the marketing list associated.

To create an Email Send record, navigate to ClickDimensions à Emails

Click on New button to create the Email Send as shown below.

Let us go through each of the section and corresponding fields of the Email Send record.

The Status field will have the following values Draft, Pending, Sent, Error Recovery and Recovery Stopped, which shows the current status of the Email Send record. It will be Draft status, to begin with, and will be changed to Pending when being sent and Sent when sent from the system. User can click on Refresh Status to check the status instead of reloading the form.

Either an existing Email Template (optional field) can be associated or a new email template can be created for the Email Send. The existing Email Template associated can be further modified in the editor window in the Email Send. This will not update the original email template.

  • Subject is the mandatory field and specifies the subject for the email e.g. “Tomato Gardens”
  • Preheader will be the third line of text appearing in the message in the inbox for e.g. “See what’s new with us!”

  • Campaign field can be used to associate any campaign with the Email Send. The email sent records created for each of the members of the marketing list will then be associated with this campaign selected.

From Section of Email Send

  • When an Email Send is sent out while From Record Owner is set to Yes, the From Name and From Email values for each individual recipient will dynamically be set to the name and email address listed on the CRM User record of the Lead or Contact’s record owner.
  • If From Record Owner is set to No, every recipient will see the values in From Name and From Email. When From Record Owner is set to Yes, none of the recipients will see the values listed in the From Name and From Email fields on the Email Send unless the name and/or email address are missing from the Owner’s record. In this case, the values listed in From Name and From Email are used as back-up values.
  • From User field can be used to select any of the CRM users in the system. This will also auto-populate From Name and From Email field’s value from the selected user record.
  • Reply to email address field can be used to specify any email address if we do not want replies to be sent to From Email field.

Delivery section of Email Send

To schedule the delivery of the emails, the Send Immediately field can be set as No and Send On field can be used to specify the date and time as shown below.

Test Emails (Semicolon Separated) field can be used to specify the test email address (by clicking the Test button in the ribbon menu of Email Send form) before sending the emails.

Recipients Section of Email Send

Recipients section allows us to specify either Marketing Lists or individual contacts, leads or accounts record to which email needs to be sent as shown below.

Suppressed Marketing Lists section of Email Send

Suppressed Marketing Lists allows us to select one or more marketing list to exclude from Email Send.

Optional Advanced Settings Section of Email Send


  • Email Address Field specifies which field of contact, lead and account to be used for sending an email. By default, it uses emailaddress1 field.
  • Email CNAME – To brand the links differently than the default Email CNAME.
  • Add Google Analytics Campaign Tracking – If a campaign is associated with the Email Send then Google Analytics can be associated to it using this option.
  • Track Email Events – Indicates whether Opens and Clicks are recorded for Email Send.

Once all the required values are specified for the Email Send record, save it and click on SEND button to send the Emails.

Email statistics for Email Send

Once the email is successfully sent out, click on EMAIL STATISTICS button on the Email Send to get the email statistics.

Different tabs and details provided in Email Statistics à

Overview:

Email Clients:

Conversions:

Click Reports:

Recipients:

Heat Map:

Marketing Channel – SMS

ClickDimensions supports sending text messages both in bulk and to individuals (Leads, Contact, and Account) using SMS Provider. Currently, it supports below three different SMS Providers.

  • Twilio
  • MessageNet
  • BulkSMS

The account or subscription for the above SMS providers needs to be bought separately and need to be configured in ClickDimensions.

Navigate to ClickDimensionsà
Bulk Text Messages

Click on New to create a new Bulk Text Message record

Bulk Text Message Section Overview

  • Subject: This will be the subject of the Text Message
  • Campaign: To associate the record with a campaign.
  • Send Immediately: Specify whether to send the message immediately. Set it to No and specify a date in Send on the field to schedule it.
  • Send On: The date on which the messages should be sent when scheduled.
  • Status Reason: The status of the record.
  • Recipients: Add the marketing list to which text message is to be sent.

Message Content area is where we can compose the text message.

The dynamic drop down allows us to pull the information from the respective lead/contact/account records added in the marketing list.

Once the message is composed, click on Send to send the Bulk Text Message.

To send individual SMS, open any existing lead, contact or account record and click on other activities and create the Text Message record with appropriate details and click on Send.

SMS Statistics

Open up the sent Bulk Text Message, it will have a section name Statistics that shows the total messages that have been attempted to send.

Click on Closed Activities menu for the sent Bulk Text Message record to see that individual SMS statistics

SMS Replies

SMS Provider i.e. either Twilio and BulkSMS can be configured to allow SMS recipients to respond to the SMS Messages. These responses get associated with the respective lead or contact records in CRM.

To see replies, go to Activities and select Received View for Text Message entity.

SMS Unsubscribes

The SMS recipients can reply with one of the following responses to be unsubscribed from SMS.

  • unsubscribe
  • stop
  • remove
  • 688
  • *688

This updates the field Allow Text Messages in Lead/Contact/Account record to “No”

Marketing Channel – Events

Events capabilities of ClickDimensions allows us to create Event Records and Event Participant Records which will be associated with existing lead or contacts records if matching email address exists if no matching email address is found lead or contact records are created in CRM based on the configuration done.

Below are the connectors supported by ClickDimensions for Events

  • GoToWebinar
  • WebEx
  • Eventbrite
  • Cvent

Once the connector is configured for any of the above Events Provider from ClickDimensions à Settings à Connectors section,

Navigate to ClickDimensions à Events to view all the events generated.

Sample Event Record

Navigate to ClickDimensions à
Event Participants to view all the Event Participants records.

Sample Event Participants

Note: Event and Event Participant records can also be created manually if connectors are not used.

Marketing Channel – Social

Social Marketing feature allows CRM Users to create, schedule and publish social posts and to track the interactions people are having with theses posts from within Dynamics CRM.

The different connectors supported are

  • Facebook – Facebook Page and Facebook Group are supported.
  • LinkedIn – LinkedIn Profile and LinkedIn Company are supported.
  • Twitter – Twitter Profile.
  • Instagram

To create social posts, navigate to ClickDimensions à Social Posts

Click on New to create a new Social Post record.

Sample Social Post

Click on Create Post to create, schedule and publish the Social Post à

Sample Post:

Once a social post has been published, the Social Post record will show the details of the Social Post along with the Social Clicks information as shown below.

The Page View record will show the details of the clicks on links from the published social post.

Navigate to ClickDimensions à Page Views

Sample Page View

Web Content – Forms

ClickDimensions allows CRM users to create Forms that will allow visitors to submit information like name, email address, phone number, country, etc. which is then stored in CRM. These forms can be embedded in the landing page or on the website and this information can be associated with the lead or contact record in CRM.

There are 2 ways of creating Forms in ClickDimensions

Form Builder and Form Capture

Using Form Builder, we can create the form from scratch whereas Form Capture uses an existing HTML for the existing web site of the company.

The first step is to create Form Fields.

Navigate to ClickDimensions à Form Fields and click on New

Different type of fields that can be created

The new form field needs to be mapped with existing fields in Lead and Contact as shown below.

Navigate to ClickDimensions à Web Content and create a new Web Content of type Form for adding the Form Fields and designing the form using Form Builder.

Click on Design to open the form designer and drag and drop the forms fields in the Form Designer canvas to design the form

Click on Actions to define the action to be performed after submission of the form.

Click on Embed which will list down various options of embedding the form.

We can also use Form
Capture to use existing HTML in the website for creating our form. Before we can use the existing web page for Form Capture we need to make sure the page is accessible over the internet, the ClickDimensions tracking script must be installed and working on the page.

The Form Fields records should be already created and associated to Form Capture fields and are being referred with their Form Field Id value in the name property inside HTML as shown below.

Navigate to ClickDimensions à Form Capture and click on New to create a new Form Capture

The Form Action URL will be used in the action URL in the HTML Page.

Go to related records for the Form Capture record created and create a new Form Capture field

Specify the Form Field to be used in Form Capture and save the record. Repeat the same steps for additional fields.

Web Content – Surveys

ClickDimensions provide the Survey feature for getting user’s feedback. This can be embedded in landing pages or web site and the answers provided can be associated with lead and contact records in Dynamics CRM.

To get started we need to first create the Survey Questions. Navigate to ClickDimensions à Survey Questions and click on New

Below is the different type of Survey Questions that can be created.

Once we have created all the Survey Questions, we need to create Web Content of type Survey. Navigate to ClickDimensions à Web Content and click on New.

Click on Design button on ribbon menu to Design the survey.

Below are the different Survey Components that can be added in Survey

After we are done with designing the Survey, we can select Actions to define the action to be taken once the Survey is submitted by the user as shown below.

Once we are ready to Publish the Survey, we can click on Embed and select the appropriate option.

Navigate to Posted Survey record to check the Survey Statistics

Web Content – Landing Pages

Landing Pages are stand-alone pages for any advertisement, newsletter, distribute coupon codes, etc. The landing pages can embed Survey and Forms in them.

To get started, Navigate to ClickDimensions à Web Content and create on New to create the new Web Content record of Type as Landing Page.

Landing Page supports 2 different type of editors – Free Style and Block Editor.

Click on Design to open the designer.

The Free Style editor

The Block editor

Once we are done with designing and are ready to Publish the Landing Page, we can click on Embed on Designer and select the appropriate options

To link the landing page with the Campaign, copy the Campaign Code from the campaign record and place the code inside the Landing Page or through the Campaign field in the Web Content record.

Page View related record of Campaign will have the details of all the visits to the Landing Page.

Campaign Automation

Campaign Automation feature allows the user to set up the dynamic path that a campaign will follow using Triggers and Actions.

Navigate to ClickDimensions à
Campaign Automation and click on New to create the new Campaign Automation record.

Save the record and click on Open Builder to create a new Campaign Automation Builder which provides the canvas for defining and building the Campaign Automation.

Campaign Builder: On the right side we have Triggers, Actions, Timers and Series which can be dragged onto the canvas.

Below link and the pdf list down some of the examples of Campaign Automation

http://blog.clickdimensions.com/top-5-campaign-automation-scenarios-clickdimensions-customers/

Lead Scoring

ClickDimensions provides Lead Scoring capability for the Lead, Contact and Anonymous Visitors (custom Click Dimension entity). Here scoring specifies the interest level of the individual which is calculated based on email clicks, web form submissions, page view, link clicks, etc.

Navigate to ClickDimensions à
Anonymous Visitors

The score field shows the Total Score for the Anonymous Visitor

For Contact and Lead, the value is available is the Total Score field on the form.

The Score values can be modified from ClickDimension à ClickDimension Settings à Score Settings

Cons of using ClickDimension with Microsoft Dynamics CRM

The SMS marketing feature is limited and doesn’t provide a details statistic and reports similar to Email marketing. Currently supports Twillio, MessageNet and BulkSMS connector which comes with additional cost. If we are planning to use some other Vendor instead of the above 3, then custom SMS integration needs to be built in Dynamics CRM using the Software Development Kit provided by Microsoft.

There are certain limitations with regards to what fields can be dynamically accessed inside ClickDimensions for Email and SMS marketing.

  • For Emails – It can pull data from LeadContactAccountOwner (User), EmailSend entity and those entities that have an n-1 relationship to them. And that also only up to one level.
  • For SMS – It can pull data from LeadContactAccountOwner (User) entity and those entities that have an n-1 relationship to them. And that also only up to one level

The workaround to get data from any other entities is to create the custom fields in the Owner, Lead, Contact, Account, and EmailSend entity and populate them which requires customization.

https://support.clickdimensions.com/hc/en-us/articles/115001162773-FreeMarker-Restrictions

Tightly integrated with Microsoft Dynamics CRM, so if we want to run a campaign for Customers that exist in other systems/applications, we need to push/sync that information inside CRM first.

Doesn’t support Inbound Marketing (blogging, webinar, podcast, etc.).

Doesn’t have Predictive Analytics or AI features

Additonal Resources

Hope it helps..

Single Organization vs Multiple Organization (Single Instance vs Multiple Instance) key points to consider in Dynamics 365 CE (On-Premise)

The decision for going with single or multiple organisation should be made as early as possible because if the implementation grows, it will increase the complexity. For e.g., if we have Marketing already implemented for the marketing lob and now, we are planning to add Sales and Service, which would be difficult as it could require updating the existing implementation (plugins, workflows, BPF, Security Model, Business Unit structure, etc.) to cater for addition of new LOBs. If the implementation of the system is designed from the very beginning keeping different LOBs in mind, the complexities can be managed. Also, there is a possibility that a single instance which is serving different LOBs, needs to be separated to multiple instances later, this again will require additional efforts.

Below are some of the factors and pros and cons that we would need to consider before deciding on Single Organization vs Multiple Organization (Single Instance vs Multiple Instance).

Companies with Business units \ LOBs having a different set of customers and different
functional area with no need for

  • cross-business collaboration
  • sharing of data
  • unified or roll-up reporting
  • the same set of standardization

will benefit from Multiple Organization or Multiple Instance approaches.

The benefits of Multiple Organization or Multi-Instance are

Reduced complexity when it comes to the designing and implementation of the data model and security model.

Having less volume of data stored in the system could contribute to improved performance of the application.

Having a lesser number of customization (plugins/workflows/business rules etc.) without segregation logic for different LOBs could also contribute to improved performance.

Provides autonomy, so easy to implement new features/functionalities/3rd party applications without having to consider the impact of it for other business units.

Easy and efficient release management e.g. fast deployment, lesser downtime and do not have to be agreed upon for all the LOBs, less need of regression testing, etc. with fewer teams/functionality being impacted.

Fewer chances of exceeding organization limits for e.g. we have following limits in Dynamics 365 CE /CRM – 100 rollup attributes and each entity having 10 rollup attributes, 10 activated business process flow per entity, maximum number of entities that can have active SLAs is 7, maximum number of SLA KPIs allowed per entity is 5 etc.

System-level settings through Administration à System Settings could be easily governed, managed and defined for the single organization without affecting other LOBs for e.g. some of the settings like – Decimal Precision Point, Relevance Search or Categorized Search, Using legacy form rendering, Session Timeout, Audit settings, etc.

For Customerflexibility to have different implementation team (partners/vendors) working on separate organizations (administration, implementation, support, etc.)

Also, if there are any regulatory or compliance that has to be in place for one LOB it would adversely affect other LOBs in case of the single instance as essentially, they’d be sharing the same resources.

On the other hand, companies having Business Units with the need for coordination and sharing information/data having process standards, rollup reporting needs will benefit from a single organization or single instance approach.

Rollup and Unified reporting and cross-business unit collaboration can be achieved easily in case of a single organization as all their information would be residing in the same instance’s database without any need of User Interface Integration/ SQL Server Replication / Web Service Integration / Publish/subscribe pattern by plugin-ns.

Check out the whitepaper here

https://www.microsoft.com/en-us/download/confirmation.aspx?id=36056

Most of the 3rd party applications in App Source like ClickDimensions supports only single instance, so different LOBs part of that same instance can share it, which will not be the case of multi-instance, as it would require separate licenses to be procured.

Required common functionalities would still need to build/deployed into multiple organization i.e. less reuse of configuration and code, which can be easily shared and standardized in case of singe organization.

No need for data replication or information (customer, contact, etc.) to be duplicated in all the instances in case of multi-instance.

For multi-instances in case of Online, there would be an additional cost associated with adding instance (sandbox and production).

Also, additional cost in case of multi-instance, for procuring any 3rd party application for each of the instance that needs it, increased integration/ replication cost.

For multi-organization in case of CRM On-Premise, there could be added infrastructure cost to support that many organizations.

Multi instance/organization can also plan to use the Hub and Spoke strategy. This would be recommended approach in case of independent but similar LOBs (e.g. located at different region/geography) i.e. replication.

https://blog.westmonroepartners.com/implementing-dynamics-crm-on-an-enterprise-wide-scale-using-a-hub-and-spoke-strategy/

Few important factors to be considered are as below

Ownership Cost – Who within the organization/enterprise is paying and owning the CRM System.

Does the organization have a Global Center of Excellence (CoE)?

There is no denying that having a single instance service multiple LOB(s) will have added complexity which will only grow with time as the implementation progresses (enhancements/ phases), does the organization has the plan or a roadmap clearly defined to handle it with all the stakeholders involved aligned with Enterprise strategy and architecture.

Please feel free to add your thoughts, suggestions and insights in comments.

Hope it helps ..

Getting entity record counts

RetrieveTotalRecordCountRequest to get the total record counts instead of navigating through pages 🙂

Dreaming in CRM, PowerApps & Flow

There are couple of ways to gets entity record counts: you could use XrmToolBox’s Record Counter Tool, or write the FetchXml to count the records as you navigate from one page to the next. But, if you just want to use the SDK here is a simple method: a new message called RetrieveTotalRecordCountRequest. Here is how to use it in C#:

Retrieve Record Count

Here is the same call in JavaScript:

Retrieve Record Count JS

Hope this is useful.

Reference:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.retrievetotalrecordcountrequest?view=dynamics-general-ce-9

View original post