Sonoma Partners Microsoft CRM and Salesforce.com Blog

Need to export more records to Excel? We’ve got you covered with the OrgDBOrgSettings Editor!

With Dynamics, the default maximum record count to export to Excel is 10,000.  While this may work for a lot smaller business without a lot of data, it won’t work for most organizations.  An instance of this came up recently where a client of ours kept hitting the 10,000 record limit though they had many more records to export.

Typically in the past, if the customer was CRM OnPremise, you would be able to access this setting (along with the other OrgDBOrgSettings) using direct SQL.  Updating these values with SQL definitely wasn’t supported, but at least you could have conversations of updating the settings if you had individuals that knew what they were doing, or you created a support ticket with Microsoft to help you out.

However, if you had CRM Online, these settings weren’t available to you through the UI or even through SQL since with Online, you don’t have direct SQL access to your database.  What can you do?

That’s where the OrgDBOrgSettings editor comes in to play.  You can download the managed solution from this link.  The process to get it installed and use it is pretty simple.  Download the managed solution from that link, import it in as a normal solution into your environment, and then open up the solution.

From the configuration page of the solution, you’ll see the different settings that you have access to, what the default value is, what the current value is, and what the maximum value is (there are some limitations – you cannot update the MaxRecordsForExportToExcel to 500,000,000).

image

To edit a value, either double click on a row, or click the Edit link in the row for that setting.  When you do so, you have the option to set a custom value, or revert back to the default.  A checkbox at the bottom of the configuration page can be set or unset which will display a prompt to confirm the change upon making an update.

image

image

If you try to set a value over the maximum, you’ll get a message stating the requested change wasn’t saved, and the value will remain as it currently is.

image

This is a great utility to make supported updates to the OrgDBOrgSettings without having to reach out to Microsoft Support.  For a full list of all the settings that can be updated and a description of what the setting drives, navigate to this link.  Also, for more explanation on how to use the tool and what it can be used for, see this post from Sean McNellis who created the solution.  While this solution has been available for some time now, we’re hoping this is a great refresher to let you know what tools are available for free to help you make changes on your own.

Topics: CRM Best Practices Microsoft Dynamics CRM Microsoft Dynamics CRM 2013 Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Where are my Voice of the Customer Survey Responses?

I previously wrote a post about the basics of the new Dynamics CRM 2016 Voice of the Customer feature (also known as surveys for the common ear).

However, in my testing I’ve seen instances where my Survey Responses weren’t being created in Dynamics CRM. Remember, this feature is using Azure Web Services so that the Survey and Response Data are synchronized between Dynamics CRM and Azure to take the heavy survey workload off of your transactional Dynamics CRM database.  Therefore a delay in responses getting created is expected, but not a delay of hours or days like I had seen.

In order to see if your VoC jobs are running correctly, go to to Settings –> System –> System Jobs.  Perform a quick search for v* to pull back jobs that begin with the letter v.   What I saw were that there didn’t appear to be a system job running for the past month.

If you do come across this scenario, below are a few things you can do to get your Survey Responses to appear in CRM.

SNAGHTML2904ea6

Retrigger Response Processing from the Solution

The simplest fix is to navigate to the Voice of the Customer Solution (Settings –> Customization –> Solutions –> VoiceOfTheCustomer).  From the Configuration Page, you should see a link to “Retrigger response processing if responses are not received within 15 minutes of being completed” – click that and you should initiate a pull from Azure to pull this data back into Dynamics CRM.

image

Look at the System Jobs

Another thing you can do is open up your most recent Voice of the Customer System Jobs to see why they stopped.  In my example below it appeared as if a record in the system that was needed for the workflow was deleted.  In this example the check statement is checking the Voice of the Customer Configuration record so it appears as if that record may have been deleted at some point which caused the workflow to fail and stop processing.  This leads me to the next resolution step.

image

Delete and Recreate the Configuration Record

The Voice of the Customer Configuration record may have been deleted / manually recreated.  However, the only supported way for the Voice of the Customer solution to successfully process and return survey results to Dynamics CRM is to have the configuration record created from the Voice of the Customer Solution. 

Therefore if you have a Configuration record currently (which may had been manually created by someone), you need to first off delete this Configuration record. 

Note:  Before you do so, make note that when you delete this record and recreate it, you’ll need to recreate your surveys as the existing surveys will no longer work.  They’ll work in a sense that users will be able to hit them and fill them out, but results will no longer ever be returned to them.  This probably isn’t a big deal because the reason you’re going through this troubleshooting is because the records weren’t being returned in the first place.

Navigate to the solution in Settings –> Solutions –> Voice of the Customer.  On the Configuration tab of the solution, go through the same process you did when you initially setup Voice of the Customer which is check off the agreement to the terms and conditions, and then click on Enable Voice of the Customer. 

image

If you navigate to System Jobs once again, and filter on those that start with v*, you should see the workflows running successfully periodically and your survey responses should start to flow in for your new survey.  Remember, your old survey and workflows you created with the old survey email snippet will need to be recreated so new survey responses can start to be processed.

image

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Microsoft Text Analysis and CRM–Tracking Client Sentiment

Microsoft has released a set of intelligence APIs known as Cognitive Services which cover a wide range of categories such as vision, speech, language, knowledge and search.  The APIs can analyze images, detect emotions, spell check and even translate text, recommend products and more.  In this post I will cover how the Text Analysis API can be used to determine the sentiment of your client based on the emails they send.

The idea is that any time a client (Contact in this case) sends an email that is tracked in CRM, then we will pass it to the Text Analysis API to see if the sentiment is positive or negative.  In order to do this, we will want to register a plugin on create of email.  We will make the plugin asynchronous since we’re using a third party API and do not want to slow down the performance of the email creation if the API is executing slowly.  We will also make the plugin generic and utilize the secure or unsecure configuration when registering the plugin to pass in the API Key as well as the schema name of the sentiment field that will be used.

Below is the constructor of the plugin to take in either a secure or unsecure configuration expecting the format of “<API_KEY>|<SENTIMENT_FIELD>”.

Next is the Execute method of the Plugin which will retrieve the email description from the email record and pass it to the AnalyzeText method.  The AnalyzeText method will return the sentiment value which we will then use the populate the sentiment field on the email record.

Then we have the AnalyzeText method which will pass the email body to the Text Analysis API which then returns the sentiment value.

And finally the classes used as input and output parameters for the Text Analysis API.

Now register the plugin on post-Create of Email with the Text Analysis API Key and the schema name of the sentiment field either in the secure or unsecure configuration

image

Now when an email is created in CRM, once the asynchronous job is complete, the email record will have a Sentiment value set from a range of 0 (negative) to 1 (positive).

image

The sentiment field on the email record can then be used as a calculated field on the contact to average the sentiment values of all the email records where the contact is the sender to track the sentiment of your clients based on the emails they send you.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Building CRM Web Resources with React

Web Resource Development

Microsoft Dynamics CRM has allowed us to develop and host custom user interfaces as Web Resources since CRM 2011.  Since then, the web has exploded with JavaScript frameworks.  In addition, browsers have started to converge on standards both in JavaScript object support and CSS.  In short, its a great time to be building custom user interfaces on top of Microsoft Dynamics CRM.

Today we’ll be working with React, an emerging favorite in the JavaScript world.  React’s key benefits are its fast rendering time and its support of JSX.  React is able to render changes to the HTML DOM quickly, because all rendering is first done to JavaScript objects, which are then compared to the previously generated HTML DOM for changes.  Then, only those changes are applied to the DOM.  While this may sound like a lot of extra work, typically changes to the DOM are the most costly when it comes to performance.  JSX is a syntax that combines JavaScript and an XML-like language and allows you to develop complex user interfaces succinctly.  JSX is not required to use React, but most people typically use it when building React applications.

The Sample Application

To demonstrate these benefits, we’ll build a simple dashboard component that displays a list of the top 10 most recently created cases.  We’ll have the web resource querying for new cases every 10 seconds and immediately updating the UI when one is found.

CaseSummary

The files that I will be creating, will have the following structure locally:

CaseSummary/ 
├── index.html 
├── styles.css 
├── app.jsx 
└── components/ 
    ├── CaseSummary.jsx     
    ├── CaseList.jsx 
    └── Case.jsx

However, when we publish them as web resources in CRM, they will be simplified to the following:

demo_/
└── CaseSummary/ 
    ├── index.html 
    ├── styles.css 
    └── app.js

Other than including the publisher prefix folder, the main change is that all of the JSX files have been combined into a single JavaScript file.  We’ll step through how to do this using some command line tools.  There are a few good reasons to “compile” our JSX prior to pushing to CRM:

  1. Performance – We can minify the JavaScript and bundle several frameworks together, making it more efficient for the browser to load the page.
  2. More Performance – JSX is not a concept that browsers understand by default.  By converting it to plain JavaScript at compile time, we can avoid paying the cost of conversion every time the page is loaded.
  3. Browse Compatibility – We can write our code using all of the features available in the latest version of JavaScript and use the compiler to fill in the gaps for any older browsers that might not support these language features yet.
  4. Maintainability – Separating our app into smaller components makes the code easier to manager.  As you build more advanced custom UI, the component list will grow past what I am showing here.  By merging multiple files together, no matter how many JSX files we add to the project we just need to push the single app.js file to the CRM server when we are ready.
  5. Module Support – Many JavaScript components and libraries are distributed today as modules.  By compiling ahead of time we can reference modules by name and still just deploy them via our single app.js file.

Exploring the Source Code

The full source code for the example can be found at https://github.com/sonomapartners/web-resources-with-react, but we will explore the key files here to add some context.

index.html

This file is fairly simple.  It includes a reference to CRM’s ClientGlobalContext, the compiled app.js and our style sheet.  The body consists solely of a div to contain the generated UI.

app.jsx

Now things start to get more interesting.  We start by importing a few modules.  babel-polyfill will fill in some browser gaps.  In our case it defines the Promise object for browsers that don’t have a native version (Internet Explorer).  The last three imports will add React and our top level CaseSummary component.  Finally we register an onload event handler to render our UI into the container div.

components/CaseSummary.jsx

CaseSummary is our top level component and is also taking care of our call to the CRM Web API.  This is also our first look at creating a component in React, so let’s take a look at each function.  React.createClass will take the object passed in and wrap it in a class definition.  Of the five functions shown here, four of them are predefined by React as component lifecycle methods: getInitialState, componentDidMount, componentWillUnmount and rendergetInitialState is called when an instance of the component is created and should return an object representing the starting point of this.state for the component.  componentDidMount and componentWillUnmount are called when the instance is bound to and unbound from the DOM elements respectively.  We use the mounting methods to set and clear a timer, which calls the loadCases helper method.  Finally, render is called each time the state changes and a potential DOM change is needed.  We also have an additional method, loadCases where we use the fetch API to make a REST call.  The call to this.setState will trigger a render whenever cases are loaded.  We definitely could have made this component smarter by only pulling case changes, but this version demonstrates the power of React by having almost no impact on performance even though it loads the 10 most recent cases every 10 seconds.

components/CaseList.jsx

By comparison CaseList.jsx is pretty straight forward.  There are two interesting parts worth pointing out.  The use of this.props.cases is possible because CaseSummary.jsx set a property on the CaseList like this: <CaseList cases={this.state.cases} />.  Also, it is important to notice the use of the key attribute on each Case.  Whenever you generate a collection of child elements, each one should get a value for the key attribute that can be used when React is comparing the Virtual DOM to the actual DOM.

components/Case.jsx

The simplest of the components, Case.jsx outputs some properties of the case with some simple HTML structure.

Compiling the Code

We’re going to start with using NodeJS to install both development tools and runtime components that we need.  It is important to note that we’re using NodeJS as a development tool, but it isn’t being used after the code is deployed to CRM.  We’ll start by creating a package.json file in the same folder that holds our index.html file.

package.json

After installing NodeJS, you can open a command prompt and run “npm install” from the folder with package.json in it.  This will download the packages specified in package.json to a local node_modules folder.  At a high level, here are what the various packages do:

  • webpack, babel-*, imports-loader, and exports-loader: our “compiler” that will process the various project files and produce the app.js file.
  • webpack-merge and webpack-validator: used to help manipulate and validate the webpack.config.js (we will discuss this file next).
  • webpack-dev-server: a lightweight HTTP server that can detect changes to the source files and compile on the fly.  Very useful during development.
  • react and react-dom: The packages for React.
  • babel-polyfill and whatwg-fetch: They are bringing older browsers up to speed.  In our case we are using them for the Fetch API (no relation to Fetch XML) and the Promise object.

The scripts defined in the package.json are runnable by typing npm run build or npm run start from the command prompt.  The prior will run and produce our app.js file and the latter will start up the previously mentioned webpack-dev-server.  Prior to running either of them though, we need to finish configuring webpack. This requires one last config file to be placed in the same folder as package.json. It is named webpack.config.js

webpack.config.js

As the file name implies, webpack.config.js is the configuration file for webpack.  Ultimately it should export a configuration object which can define multiple entries.  In our case we have a single entry that monitors app.jsx (and its dependent files) and outputs app.js.  We use the webpack.ProvidePlugin plugin to inject whatwg-fetch for browsers that lack their own fetch implementation.  We also define that webpack should use the babel-loader for any .jsx or .js files it encounters and needs to load.  The webpack-merge module allows us to conditionally modify the configuration.  In our case we are setting the NODE_ENV environment variable to “production” for a full build and turning on JavaScript minification.  Finally we use the webpack-validator to make sure that the resulting configuration is a valid.

Deploying and Continuing Development

At this point all of the files should be set up.  To deploy the code, you would run npm run build and then deploy index.html, app.js, and styles.css as web resources to CRM. 

If it becomes tedious to keep deploying app.js to CRM as you make small changes, you can set up an AutoResponder rule in Fiddler to point at the webpack-dev-server.  Once this rule is in place, when the browser requests files like index.html and app.js from the right subfolder of the CRM server, Fiddler will intercept the request and provide the response from wepack-dev-server instead.  This way you can just save your local JSX files and hit refresh in the browser as you are developing.  Of course you need to be sure that you have started wepack-dev-server by running npm run start from the command line.  I have included an example for the rule I set up for this demo below:

fiddlerAutoResponder

With that you should be set to start building your own CRM Web Resources using React!

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2011 Microsoft Dynamics CRM 2013 Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Analyzing Audit Logs using KingswaySoft

If you have ever looked into analyzing audit log records in Dynamics CRM, you know how hard it can be.  Using the API there isn’t a good way to retrieve all the audit log records for a specific entity.  You can only either retrieve all the changes for a certain attribute or retrieve all the changes for a specific record.  If you’re on-premise and have access to the database, you can get to the audit detail records but you will find that the data is very hard to parse through.

Thanks to the wonderful folks at KingswaySoft, with version 7.0, this is no longer the case.  With KingswaySoft v7.0, audit details can easily be retrieved for a specific entity and then can be dumped into a file or a database for further reporting or analysis.

In order to accomplish this, first you will need to make sure you have the SSIS Toolkit installed and then download KingswaySoft v7.0 here.  Then open up Visual Studio and create a new Integration Services project.

clip_image002

Next add a Data Flow Task and drill into it.

clip_image004

Then we will set up a Dynamics CRM Connection using the Connection Manager.  In the Connection Manager view, right-click and select “New Connection”.

clip_image006

Now select the DynamicsCRM connection and click Add

clip_image008

This will pop open the Dynamics CRM Connection Manager which will allow you to connect to your Dynamics CRM organization.

clip_image010

Now use the SSIS Toolbox view to drag the Dynamics CRM Source component onto the canvas.

clip_image012

Double-click the Dynamics CRM Source component to pop open the editor.  Select the Connection Manager that you created earlier and set AuditLogs as the Source Type.  In the FetchXML text editor, write a fetch xml query to pull back the records of an entity where you want to retrieve audit details from.  In my example I’m retrieving 25 account records with my Fetch XML query.

image

Select Columns on the left and pick the columns you would like to be a part of your report.  In my example I’m going to use action (Create, Update, Delete, etc), the objectid and objecttypecode (the record that was changed), and the userid and useridname (the user that triggered the change).

clip_image016

The Dynamics CRM Source component will have two outputs, one for the header audit record and one for the list of audit detail records.  In my example I want to join these two outputs into one dataset so I can display both sets of data in the same report.  In order to do this we will need to drag two Sort components onto the canvas and then connect each output into the separate Sort components.  The result should look something like this:

clip_image018

Now double-click the first Sort to open the editor.  Select the auditid as the sort attribute as it is the unique key to join the two datasets together and check the “Pass Through” box for all the other columns that you want to use in your report.

clip_image020

Now double-click the other Sort component and perform the same steps.

clip_image022

Next drag the Merge Join component onto the canvas, connect the two outputs from the two Sort components into the new Merge Join component and then double-click the Merge Join component to open the editor.  Select Inner join as the Join type and then select any columns you want in your report and map them in the bottom pane.

clip_image024

Now we need to drag a Derived Column component onto the canvas and connect the output from the Merge Join into the Derived Column component.  This component needs to be used as we’re going to output the data into a CSV file so the oldvalue and newvalue columns need to be converted from a DT_NTEXT to a DT_TEXT.  Open the editor for the component and set the expression to convert ‘oldvalue’ to DT_TEXT using the 1252 codepage and repeat the same for ‘newvalue’.

image

Lastly, use a Flat File Destination to output the audit records into a CSV file that can be opened in Excel.  The screenshot below is the columns I used for my output file. 

image

Now your Data Flow should look like the following:

image

Then you can run the SSIS package and you should get an output file that displays all the audit records for the first 25 retrieved accounts.  The output will show the name of the user that made the change, the field that was changed, the old value, the new value as well as if it was a Create or Update.

image

So there you have it!  Thanks to the wonderful KingswaySoft toolkit, it is now possible to extract audit logs into a readable output that can be analyzed as needed.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

A Step by Step Guide to Create Your First Survey with Dynamics CRM 2016 Voice of the Customer

Dynamics CRM 2016 was recently released and with it a whole slew of new features and functionality.  A bunch of features were planned for the initial 2016 release, but for one reason or another were delayed.  This website is a very simple way of understanding what’s been released for primetime, versus what’s in preview, what’s in development, and what’s been indefinitely postponed.

One such feature that wasn’t immediately available at the release of 2016 was Voice of the Customer.  This is the ability to create, send, and monitor surveys from Dynamics CRM.  This feature is currently only available for CRM Online, and below I’ll go into more detail on how to get it enabled, and how to create your first survey.

Note that this feature is delivered through an integration with Azure Web Services. This means data will be flowing and queued through Azure in order to take any workload of delivering and capturing customer survey data off of your CRM system for the best possible performance.  This also means that there could be a delay between survey response from making it into CRM.

Below we’re going to go into an overview of enabling Voice of the Customer, and setting up and sending your first survey.  This post won’t go into everything that’s available with Voice of the Customer as there’s a lot to it, but will cover the basics. 

Enabling

To enable Voice of the Customer, simply log into the CRM Online Administration Center, and select the org you want to install VOTC to, and click on Solutions.  Then you’ll be taken to the page with the preferred solutions that you can install, and simply click on the “Install” icon to start the installation. 

image

image

Once the installation is complete in CRM navigate to Solutions and open up the Voice of the Customer solution.  Then check off “I agree to the terms and conditions” and click on “Enable Voice of the Customer”.  You’re now set to start configuring your first survey!

image

 

Survey Creation

The Voice of the Customer functionality allows you to add theming to your surveys.  To do so you just navigate to the Images and Themes area of the VOTC module. 

image

And from there you can go ahead and create an Image record and upload a logo that you want to use in your survey will be accomplished in later steps.  After you upload the logo and save the record you’ll be able to see a preview of the image.

image

You can also go to the Themes area and create a new Theme to use for your logo.  You have the ability to change the colors of most of the survey elements such as the header, navigation bar, and progress background.  I strongly recommend you make use of a UX engineer to help you pick your colors wisely so that they don’t clash too much.  If you wanted to get more advanced, you can even upload your own CSS to apply even more custom styles to your survey.

image

Now that you have your image and theme setup, you’re ready to create your survey.  Navigate to Voice of the Customer –> Surveys, and click New to create your new survey.  You’ll see on the survey form that there are a lot of options to configure your survey.  We’re not going to cover them all in this post but you’ll notice that the we’re able to apply the Image and Theme we created previously.

image

In order to actually start building out the survey questions, you need to change from the Survey to the Designer form.  You’ll notice that here there’s also the Dashboard form where you can see statistics about survey responses.  For now we’ll click on Designer and start creating some questions.

image

On the Designer form, you have the ability to add or delete pages in your survey via the buttons that appear underneath the vertical page layout on the left.  You can’t delete the Welcome or Complete page – those are required for all surveys.

image

When in the design mode, you’ll be able to drag question types from the right over onto the main pane in the middle.  When you hover over a question on the page, you’ll be able to delete the question, make quick edits inline on the page to the question label, or click the pencil icon to take you to a more advanced editor so you can change more settings for the question other than the label.

image

image

In the text box of the question (and of any label control on the survey), you can click on the (Pipe) dropdown to insert piped data into your survey.  We’ll see how this works with workflows later when we create a workflow to automatically send out the survey upon case resolution.  In this example, we’ll insert the case number into the survey question, and we’ll use the Other1 pipe to store this data (again, that’s setup when you create the workflow and we’ll discuss that in a later step).

image

image

Here’s what our welcome page looked like with all the pipes in it.  We want to make a very personalized experience for the customer as they take the survey.  I also threw the other pipes in there so you can see how we’re able to get as much data out of CRM as possible to personalize our survey for our customer.

image

Something else you can do to add logic to your survey is to create Response Routings.  An example of when you’d use a response routing is if you want a customer to fill out an additional question, if they answered a certain way on a previous question.  For example, you may ask the customer how they’d rate the experience with your company, and if they provide a low rating, you may want to display an additional question to gather more information on why they felt that way.  To get to response routings, click on the related records dropdown of your survey.

image

When you setup your response routing rules, you need to create Conditions and Actions for each Response Routing.  See below how we’re only showing the “Can you please provide us with additional information” question if the user responded 1 to the star rating question.  Otherwise we don’t show it.

image

After completing the above, your survey is ready to be published.  If you toggle back to the Survey form, you can click on the Preview button to see what the survey would look like to your end users.  When you’re all set, you can click on Publish so that the survey is now accessible externally.

Survey Automation and Results

Now that you have your survey setup, you can use it along with native CRM workflow to have surveys automatically sent out to your customers based on actions to CRM data.  For example, lets create a workflow that sends our survey automatically to the customer of a Case when the case is marked Resolved, asking them how their experience working with your support team was, so you can make improvements if needed, or provide recognition where deserved.

First off, create a new Workflow and make sure to have it run on update of the Case Status field.  Check to make sure the status has been updated to Resolved, and then add in a step to create a new email.  Your workflow should look similar to that below.

image

Now when editing the email step of the workflow, you’ll want to copy the value in the “Email Snippet” field of the Survey, and paste this into the body of the email step in your workflow.  Your email step may look something similar to the following.

image 

image

Notice in this email above that I’m making the use of the piped tokens (that I had placed in my survey earlier) with dynamic data from the Case record the workflow is running on.  It doesn’t matter what field from the record I’m on that I use within each pipe.  You’ll see that in the actual survey the user is taken to that the pipes are resolved to the actual data on the Case that was recently resolved. 

Make sure to Activate the workflow, and then you can go and test it out.  Once a Case is resolved in CRM, the email that’s send to the customer looks similar to the following.

image

And if the user clicks on the hyperlink to launch their survey, they’ll be taken to the actual survey.  As stated above, the pipes used in the survey are resolved to the actual data from the case.  You can also see that if I answer greater than 1 on the 5 star rating of my overall experience, that I won’t see the question asking me why I rated the overall experience a 1 based on the routing rules we setup earlier.

image

image

Also note that the survey has a responsive design so that if you’re accessing it from a mobile device such as a phone, the survey resizes to fit the screen appropriately.

image   image

Upon completion of the survey, and after the data from Azure syncs back to Dynamics CRM, you’ll be able to change to the Dashboard form on your survey record to see the results trickling back in from your survey. 

image

You can also navigate to Survey Responses off of the Survey to see the individual responses.  If you open up a response you’ll be able to see the individual questions and answers that were asked and part of that specific response.

Note:  The responses (including the question and answer) are stored in a first class Question Responses entity.  This means that if you wanted to take this one step further, you could create a workflow on the Question Responses entity, and if a Question Response record is created where a response is poor (e.g., where the customer rated the overall experience a 1 star), an email can be sent to the appropriate team to follow up on why that customer answered that question the way they did.

image

image

 

Gotchas

As I was working through and testing out my first survey, I ran into a few gotchas that I figured would be great to note down as I suspect others may run into these similar issues.

First off, when using Response Routings, if you want to only show a question when another question has a certain value (for example in my case where I wanted to show a text box if someone rated the service a 1), you probably don’t want the text box to appear when the customer hasn’t answered the rating question.  In other words, you don’t want the text box to appear when they initially load the page of questions.  You ONLY want it to appear when they rate your service a 1.  In order for this to happen, you have to make sure that on that specific question that you set the Visibility field to “Do not display” which is the default visibility of the question.

Next, I ran into an issue with the pipes in my survey not actually being populated with dynamic data from CRM.  It had turned out that when I was testing this out with my workflow, I had copied the Email Snippet of the survey to my workflow email body more than once.  This causes the Email Snippet and Piped data to break and after I removed the duplicate Email Snippet from my workflow email, the pipes began to work as expected.

Also note that if you want the updates you made to your survey to be live, you’ll need to publish your survey after making changes.  Simply saving it using the native CRM buttons will not publish it to Azure, but instead just save the updates in CRM.

Finally, if your survey responses aren’t being returned to CRM, navigate to the Voice of the Customer solution and make sure to click on the link to Trigger Response Processing.  Note that this could take up to 15 minutes to complete and for responses to appear in CRM.

image

For more information on Voice of the Customer, head over to Microsoft’s website.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Project Service - The more you know

Today's post is written by Jeff Meister, Principal Consultant at Sonoma Partners.

The release of Microsoft CRM Online Spring Wave brings some great news for those of us focused on delivering quality customer service to our clients. 

In addition to the integration with two recent Microsoft acquisitions, ADX Studios (customer portal) and FieldOne (field service), Microsoft is also releasing  a new Project Service solution. Project Service is a PSA (Project Service Automation) solution that provides an end to end solution for delivering professional engagements and will be ideal for service-based firms.

Picture141-1024x605

Today, I wanted to walk you through a high-level overview of the functionality based on what we've learned to date about the solution.

Opportunity Management

CRM has traditionally handled opportunities with product line items. Project Service updates this functionality to handle what sales of service projects would need. Some key highlights would be contracts and labor rates, collaboration, practice lines, price lists and quotes; all while following your pre-defined sales methodology and best practices.

Project Planning

This is where things start to get interesting. This aspect of the solution brings key components from MS Project, and embeds them directly into CRM. Users are able to store templated project plans which are then modified and used for estimating, definition and timeline/budget tracking throughout the project lifecycle. Having these tools accessible within CRM allows for more accurate quoting, ensuring profitability and resource estimates are aligned early in the sales process. It also provides enterprise visibility to project status.

2

Resource Management

The solution takes the pre-sales planning work and applies that to your staffing model for demand fulfillment. This can be done across various staffing models. Whether or not your project manager or team members access the demand pool directly, or if you have centralized resource managers, resource scheduling can be done via the new solution, taking into account availability, capacity and skill sets while maintaining competencies and proficiencies.

(On a side note, we are really excited to see where this part of the solution can go when paired with machine learning!)

Time and Expense

This one is easy…mobile and desktop support for time and expense entry, with routing and a built-in process for approval. Having these data points tied directly to the project in CRM also provides the ability for immediate impact to project financials. Plus, you can access these functions through mobile applications.

Billing

Having all the project related data (contract, time reporting, expenses, billing details) under one roof allows us to easily source our invoices directly from the solution. We don’t believe this will be a full blown replacement for an ERP backend, especially at the enterprise level. That being said, this is a great direction to see the product headed, and we expect integration with other ERP systems to be available.

Analytics

The Project Service solution will have built in BI capabilities around actual records for financial events, profitability, and utilization. It is also expected to have content packs available for PowerBI, allowing for rich dashboards and ad hoc analytics. 

1

Sonoma Partners was fortunate enough to be an early participant with this process. The solution uses native functionality in conjunction with custom screens to deliver an intuitive and very compelling application targeted for firms that manage projects, time, and resources. The solution is easy to install and configure on your base CRM Online deployment. 

As mentioned above, Project Service is available as part of the Spring Wave for CRM Online.  And, we have our fingers crossed that we will see solution available for the on premises version at some point as well. Pricing details are yet to be published, but check back for more details as those become available.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM Online

Lookups - Null vs Empty Array

The other day I discovered an interesting ‘gotcha’ when working with a lookup in JavaScript.  A business requirement called for some JavaScript to be registered when a lookup value changed and then execute certain logic based on if the lookup had a value or not. 

This is pretty straightforward logic and could be handled easily with the following code:

var customerValue = Xrm.Page.getAttribute('parentcustomerid').getValue();
if (!customerValue) {
   // do some logic
}
else
{
   // do some other logic
}

Come to find out, this works for the most part but there is one scenario where it falls short which is where the ‘gotcha’ comes in. 

  1. Record form loads and the lookup doesn’t have a value
  2. The lookup has a value and the user selects the lookup and hits the “Delete” key
  3. The lookup has a value and the user clicks the magnifying glass, then “Look Up More Records” and then clicks “Remove Value” on the subsequent dialog
In the first two scenarios with the above JavaScript code, the customerValue variable will be null and will work as expected.  In the third scenario, the customerValue variable will be an empty array and not work as expected as it isn’t null.


Therefore we need to update the block of code with the following:

var customerValue = Xrm.Page.getAttribute('parentcustomerid').getValue();
if (!customerValue || customerValue.length == 0) {
   // do some logic
}
else
{
   // do some other logic
}

Now the code is flexible and will handle all 3 scenarios where the lookup value doesn’t exist.

Note:  This was tested in CRM 2015 Update 1 and CRM 2016

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

Understanding Office 365 User Account Management for Dynamics CRM Online

Today's post is written by Aaron Robinson, an Engagement Manager at Sonoma Partners.

Microsoft Dynamics CRM has long offered customers the option of choice when it comes to deployment as a differentiation of their product relative to other customer relationship management solution offerings.

But there are some differences in administration and capabilities depending on the deployment option chosen.  Let’s take a look at user administrator as it relates specifically to Dynamics CRM 2016 in Office 365.

Account Types

One benefit of the online or “cloud” offering of Dynamics CRM is how users are created and managed.  But before we get into how administration works, we need to understand the ways user accounts are created for Office 365.

Cloud Accounts

If you created an Office 365 tenant and use the Administration portal to create users, you are more than likely creating “cloud accounts”.  What does this mean?  Office 365 authentication is supported by a version of Microsoft’s authentication engine Active Directory.  More specifically, it is Azure Active Directory, meaning it is also a cloud service, just hosted on the Azure platform.  So how do I know if they are cloud accounts?  Easy!

First login to portal.office.com (I’m going to assume that you are a global (tenant) admin and have permission to the admin tab, otherwise you will not be able to do this).  Once logged in, browse to Users>Active Users and look for the Status Column shown below:

1

The important piece to understand about this method is that the accounts are stored in an instance of Azure Active Directory. You can view this directory by navigating to Admin>Azure AD in the same Admin Portal as shown below.

2

If you do, it will redirect you to the Windows Azure management website, and ask for you to create an account to manage this Azure tenant. Note this is not a requirement.  You can continue to manage users in the Admin portal without ever visiting the Azure AD page. Since this azure portal is a whole other beast, its better left for another time.

Local Accounts

Another method is more common in enterprise scenarios, where Active Directory domains have already existed for years and single sign-on (SSO) is preferred for on premises and cloud services in an organization. These accounts must either be sync’d with a cloud Active Directory, or redirected to federation service for authentication. For users this means they will continue to use same email address and password they currently use, and password changes will sync automatically.

DirSync or Azure AD Connect

Directory Sync is one method for enabling single sign-on.  One aspect I like about this method is that it is a single page authentication, rather than redirection, meaning less clicks for a user. However, administration of this method can be more demanding, as you need to make sure the service is always running.  Microsoft does aide in this process as they will notify the tenant admin if the sync goes down for a predetermined period of time, letting you know that someone should look into it.

3

The requirement for directory sync is to set up a synchronization service on a server behind the corporate firewall which can connect to the local Active Directory.  This was previously done with a tool called DirSync, but has since been replaced by a newer version called Azure AD Connect.  There is plenty of information on the deployment of DirSync and Azure AD Connect, so we won’t cover that here.

Active Directory Federation Services

ADFS is another way to go for enabling SSO.  Many enterprises will already have this in place for other SSO applications they manage, and as such may be more desirable.  The downside of this method in my opinion is the user experience.  From the Office 365 sign-in page, a user will enter their email address, and Office 365 will redirect them to the ADFS sign-in page for the organization, where they will have to enter their credentials, possible for a second time (the experience can be a bit inconsistent here depending on the device, operating system and browser).

4

Once again, there is plenty of good information on the setup here.

User Management

Now that we have covered where the user accounts can exist, let’s examine how they become users of Dynamics CRM.  This is a two step process that is fairly straight forward. Let’s start with license assignment.  Back to our trusty Admin Portal for Office 365 where our users now exist, you will want to expand the Active Users.  Select a user, which will give you the user admin panel to the right side as pictured below.

5

Click Edit on the Assigned license section and add a Dynamics CRM license to this user (this assumes you have purchased the licenses in advance, otherwise you may not have them available). The nice part here is that Microsoft has automated the user creation in Dynamics for you.  Once you have assigned the license, an automated routine will run to create the user record in Dynamics.  Keep in mind that this automation is not instantaneous, and it may take a few minutes for the user to appear.  But in most cases I see it appear in under a minute.

The last step is to sign into Dynamics as a CRM Administrator, and add a security role to the new user account. Unsure how to do that?  Refer to this TechNet article.

And one more thing…

Would you like to see a list of all Dynamics CRM Licensed users in the Admin portal? On the Active Users page, there is a view filter dropdown for seeing users by different attributes, such as Active Users, SignIn Allowed or Blocked, Unlicensed Users, etc.  A really helpful view is Dynamics CRM Licensed Users, but it doesn’t exist by default.  Here’s how you would add one.  Click the dropdown for Select a View, and select New View.

1

Name your view (“Dynamics CRM Licensed Users” works for me), and then under the Assigned License dropdown, select Microsoft Dynamics CRM Online Professional, and then click save.

2

Now pop into the Active Users, select your new view, and there you go!

3

Looking for help with your Dynamics CRM deployment?  You came to the right place! We can help you better understand Office 365 user account management and so much more. 

 

 

Topics: Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online

FetchXML: Left Outer Joins with Multiple On Clauses

Having worked on CRM for ten years, I thought I understood everything that was possible with FetchXML. After all it seems pretty straight forward and each clause has almost a one to one equivalent with SQL. However, while I was recently doing some work on a project that required me to find records missing certain child records, I was surprised to find my understanding of left outer joins was incomplete.

The Requirement

In the project I was working on, we were using the native Connection entity to track relationships between contacts and users. Some of the Connections were manually created, but others needed to be automatically created based on business logic. In some cases we needed to detect all contacts that a user did not have a connection of a specified role with.  This seemed like a good case for using a left outer join and I sat down and wrote the following FetchXML:

The Concern

As I reviewed the FetchXML, I became concerned that I wouldn’t get the proper results with this query. I was assuming that CRM only used the to and from attributes on the link-entity element to build the on clause for the left join in SQL.  I knew that if the additional conditions inside the link-entity were added to the SQL where clause, that I would get no rows back.  In short, I was worried the generated SQL would look something like this:

It was enough of a concern that I decided to fire up SQL Profiler on my local dev org and see what exactly CRM generates in this case.  Much to my surprise I found the following (slightly cleaned up to help legibility):

In Summary

So in the end, CRM came through and put the link-entity’s conditions in the on clause for the left join.  This subtle change makes a huge difference in the results returned and makes left joins much more useful in CRM than one might assume based on the FetchXML structure.  This left me with an efficient query to solve the business requirement and a new found respect for FetchXML.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2013 Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM 2016 Microsoft Dynamics CRM Online