Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


How to Assign a Territory to a Lead in Dynamics CRM

Post Author: Joe D365 |

In today's blog we'll take a peek at an extremely powerful tool in Dynamics CRM 2011: workflows. In particular, let's look at a scenario: Alpha Company would like to use CRM to automatically sort their lead records for their sales team. To accomplish this, they've decided to use a workflow to assign a territory to a lead.

We'll assume that Alpha Company has read up on adding a State/Province field as a drop-down or look-up, and that they've created a global option-set called State containing 50 US states and a custom look-up to the Territory entity, containing their desired territories. The state and territory fields will be located on the lead form.

After the State and Territory fields are created and implemented, a new workflow will be created under the Lead entity. This workflow will run when a record is created, and the Scope will be set to Organization.

The workflow will begin with a Check Condition and an Update step that looks like this:

If Lead:State equals (desired states for desired territory), then:

Update: Lead (set properties) > (Choose desired territory from Territory look-up)

The Check Condition and Update step work to check what state the lead record is in, and update the Territory field accordingly.

For example: A lead record is created, and located in Wisconsin (WI). The workflow would check for WI, and if found, it would update that same lead record's Territory field to read Midwest. This is useful in that it will automatically sort incoming leads to appropriate territories, unlocking a bevy of further automation possibilities!

If that was a little confusing, don't worry. Below you will find an easy-to-follow, step-by-step guide aimed at creating a workflow to solve Alpha Company's issue.

1. Click settings

a. Click processes

i. Click New

Assign a Territory to a Lead

2. Enter "Assign Territory to Lead" in Process Name

a. Choose Entity: Lead

b. Choose Category: Workflow

3. Choose Scope: Organization

a. Choose Start when: Record is created

b. Click Add Step

c. From the Add Step menu, choose Check Condition (not shown in screen-shot)

d. Click (click to configure)

4. Choose Primary Entity Lead

a. Choose State

b. Choose Equals

c. Choose desired States for Midwest Territory.

d. Click Save and Close

e. Select row and click Add Step (see 10b), in the Add Step menu, choose Update Record

f. Click Set Properties

g. Click Territory look-up.

h. Choose desired (in this case, Midewest) Territory.

i. Click OK.

j. Click Save and Close

5. Click on the word If of the Check Condition you created in steps 10 & 11.

a. Click Add Step

b. From the Add Step menu, choose Conditional Branch (not show in screen-shot)

c. Click on (click to configure)

d. Repeat steps 11a – 11h, for as many territories as you desire.

6. Repeat steps 12a – 12d until you've finished all of your territories.

7. Once you've finished all of your territories, click Save.

a. Click Activate

8. You made it! Test it out by creating a lead and assigning the lead a state from the drop-down. Wait 20-30 seconds and refresh the page, and you'll have your territory automatically assigned!

Want to learn more about workflows? Here are some more posts delving into a wonderful, wonderful world of automation:

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

One comment on “How to Assign a Territory to a Lead in Dynamics CRM”

  1. Hi JoeCRM,
    I came to your blog (bookmarked some posts in the past) looking for information regarding rollup 13. I know this is unrelated to the post here, but why did the icons dissapear in entity views and the bottom left navigation selectors?
    I can see from the screenshots in this article that it looks like you might be on rollup 13 as well as I can see the icons from your CRM are gone as well.
    Was this a change they made by design or a bug with the rollup?

PowerObjects Recommends