Tuesday, December 17, 2013

Dynamics CRM 2013 Spreadsheet Import Tricks

This is part 2 demonstrating how to upload a spreadsheet of bounced emails addresses to modify contacts.  In part 1, we created an Email Bounce entity and a Real-Time Workflow.
The first step is to download the Import template.  This step is optional and depending on the scenario. may make it easier (or more difficult).  In this case, it’s going to make creating the map easier, so let’s get started.  Navigate to your entity and click the Import Data – Download Template for Import and save the XML file. 
Most of the time your computer will not realize this is an Excel file, so to open the XML file, start Excel and use File – Open.  Now you can paste your list of email address into BOTH columns.  Save your changes to a new file (so you can reuse the template next week) and exit Excel.
Start the Import dialog and select your XML file in the first screen.  CRM will recognize that you want to upload Email Bounce records, but we need to edit the mapping, so click Edit.
We need CRM to lookup our Contacts using the email address, but it doesn’t do that be default, so we have to add it to the Lookup reference.  Click on the little icon next to the Contact field and select the Email field from the list of Contact fields.
Click Next until you get to the Finish screen.  Tip: give this Mapping a name, so you can reuse it next time.  Click on the “Imports” link to watch the process unfold. 
If you have any errors then you can export the failed rows and manually process them.
Remember that Mapping we saved, well reusing it is not as easy as you’d think…when uploading XML files, there’s a strange trick to it.  You still have to click the Edit button after uploading the XML file, but when you get to the Map Record Types dialog, click Back and you are magically transported to the Select Data Map dialog. 


After that, you just click Next, Next, Next…as quick as you can and you’re finished.

Dynamics CRM 2013 – Handle Bounced Emails


If you have a lists of email addresses that returned as bounced, how can you update your Dynamics CRM contacts?  Easy!  Create a new entity and put the power of Dynamics Workflows to use.
The first thing we’re going to need is a new Entity – let’s call it “Email Bounce”.  Let’s keep this entity super-simple and turn off all of the Communication and Collaboration options.


Before we hit Save, let’s change the Primary Field so we can use it to store a text version of the email address.  Rename it to Email and set the length to 200.

After you save your entity, open the Form and add a new Lookup field for Contact.  Save and Publish your entity.  Now on to the workflow.
Create a new Process - either in your Solution, or in the Processes subarea of the Settings menu.
Now you have a decision to make…well, that is if you are using CRM 2013.  I chose to create a Real-Time Workflow because I am planning to Deactivate my Email Bounce records once a matching Contact is found.  I will be uploading these emails using a spreadsheet, and I know there will be times when my email address does not find an exact match.  If two contacts are found, or none, I’d like the Email Bounce record to “hang around” so we can manually investigate.  With a Real-Time Workflow, when the Contact Lookup is populated, the screen will refresh and my Email Bounce will be Inactive, signaling success.  If I used a regular workflow, the record would be inactive, but the user wouldn’t see it unless they manually refresh their view.  Score one for CRM 2013!  Here’s how I setup my workflow.  Note, mine runs on Create and Update (of the Contact field)

Now, if you’ve never used CRM’s Import features, you are in for a real treat!  Check out Part 2 –Data Import Tricks.