Assignment Plans is a powerful Geopointe feature that allows you to categorize your data by location. Traditional solutions typically rely on matching parts of the address (e.g. country, state, zip code) to pre-defined criteria. Assignment plans are a more robust solution that offers more flexibility and ease of use. Instead of worrying about spelling variations and whether zip codes are contiguous, you can create areas right on the map. Whether your areas are delivery areas, sales areas, service areas, marketing areas, or any other kind of areas, you can create any arbitrary boundary by hand-drawing it and/or leveraging our extensive Geopointe Shape Library. Then, use Assignment Plans to automatically assign your records to your areas.
This document covers the following topics:
How Assignment Plans Work
Creating Assignment Plans
- What sales territory does this Account belong to?
- What timezone is this Account/Contact/Custom Object located in?
- Is this customer located in a valid service area?
Assignment Plans can be used with any object that has been configured as a Map Object. Assignment Plans can be configured to update a field on the record with its assignment information and/or insert junction records between areas and map object records. In the first case, a record can only belong to one area (per assignment plan). In the second case, a record can belong to many areas (per assignment plan). If desired, Assignment Plans can also be configured to change the ownership of a record.
It’s important to understand some basic terminology before diving into Assignment Plan functionality.
An Assignment Plan defines the Assignment Areas for an object and how the assignment information will be saved. It also defines whether the ownership of the records will be updated. Examples of Assignment Plans may be “2015 Sales Territories” or “Service Delivery Areas”. Each object you want assigned must have its own Assignment Plan. You can also have multiple Assignment Plans for an object. For example, you can have "Account Sales Territories" and "Account Service Territories." There is no limit to the number of Assignment Plans you can create.
An Assignment Area links a Shape to an Assignment Plan. While you can use the same Shape in many Assignment Plans, each Assignment Area can only belong to one Plan. When records are assigned, they are associated with an Assignment Area. You may create up to 10 Assignment Areas for free. Additional Assignment Area licenses can be purchased.
A Shape is a geographic area. Assignment Plans currently supports two types of shapes. Geopointe Shapes from our library, which are curated and pre-managed shapes such as states and postal codes. Standard Shapes, which are manually drawn shapes on the map page.
This article provides information on how to create shapes: How to Create a Shape
In this article we will walk through the process of creating a Sales Territories Assignment Plan that will automatically link Accounts to a geographic territory. You can also think of this in reverse as linking geographic areas to Accounts.
When creating an Assignment Plan you need to decide if you would like a lookup field on the Account populated, a related list populated, or both be populated with the matching geographic area. Here are some basic scenarios for each configuration.
Single Lookup field:
This is ideal for records that will only match with one Geographic area. There are no overlapping areas. If multiple geographic areas are matched to this account record, one geographic area will be randomly linked to it.
Related lists can be used when an Account may fall into multiple geographic areas. In this scenario, a related list is required to show multiple geographic areas related to one account. Another scenario is when you have have multiple Assignment Plans and prefer to show the various assignments in a related list instead of with multiple lookup fields. The best option for you depends on your data, business rules, and the desired architecture of your Salesforce.com implementation.
For sake of example in this example we will create both a lookup field and a related list for the related geographic areas so we can see how they each work.
To create a single lookup field, start with step 1A below. If you are creating a Related List, jump ahead to step 1B.
1A. Create a Lookup field.
In Setup, create a custom field on the Account Object, select Lookup Relationship as the Data Type, then click Next.
Use the drop-down to select Geopointe Assignment Area for the Related To object.
Enter an appropriate name for the Field Label. Salesforce.com will automatically default this to “Geopointe Assignment Area” but we want to rename this to “Territory”. Click Next and proceed through the new field creation wizard, then proceed to step 2 below.
1B. Create a Related List.
Related lists can be used when an Account may fall into multiple geographic areas (i.e. if you have overlapping assignment areas). This requires a special junction object that will be used to display the multiple assignments as a related list.
In Setup, create a custom object and give it a meaningful name. In our example it is called Territory Assignment.
Create two new fields on the object and select Lookup Relationship as the data type for each of them. For the first object, select Account as the Related To object. For the other, select Geopointe Assignment Area as the Related To object. Be sure to give these fields appropriate names.
Here is what the completed object may look like:
2. Create an Assignment Plan.
Once the field and/or related object has been setup we can create a Geopointe Assignment Plan. To do this navigate to the Geopointe Setup tab in Salesforce.com, click the Assignment Plans tab, then click New Assignment Plan.
Select the Map Object we would like the Assignment Plan to run against. In this example it is Account.
Enter the Name, Description, and other information about the Assignment Plan.
Assignment Plan Name - The name of the Assignment Plan.
Map Object - The map object this assignment plan will run against.
Description - A description of the Assignment Plan.
Status - Only Active plans can be run.
Where to Save Assignment Info:
- Custom Assignment Field - This is the lookup field to the Geopointe Assignment Area we created that will be populated on your standard or custom object.
- Custom Assignment Object - This is the related list we created that will be populated the Assignment Areas related to a record.
Reassign Owner - Whether the record ownership should change based on the Assignment Area. See the Changing Ownership section below for more details.
SOQL Filter - You can enter a SOQL string here to filter what records the Assignment Plan runs against. Learn more about Creating SOQL Filters.
Note how the Custom Assignment Field and the Custom Assignment Objects pick lists are the field and related list custom object we created in the previous steps. Typically, you would only populate one of these options, but again, for this example, we are using both.
Grandfather Records - If you check this option, records that have already been assigned, but which do not meet SOQL filter criteria, will not be unassigned. Additionally, if you have manually assigned ownership of a record (using the Change Owner action), that ownership will not be changed by the Assignment Plan batch job even if it falls in another user's territory.
3. Create geographic shapes for the Assignment Plan to use.
This will be completed on the Map. See this documentation on how to create Shapes.
4. Create Assignment Areas.
Assignment Areas link the shapes created to the Assignment Plans. On the Assignment Plan edit page, click New Assignment Area.
Populate the following fields and then select the Save button:
Geopointe Assignment Area Name - This is the name of the Assignment Area. This is what will be displayed in the Territory Lookup field on the Account or in the related list. This will usually have the same or a very similar name the the selected shape.
Geopointe Shape - The geographic shape we created in the previous step for this Assignment Area.
User - A User related to this Assignment Area. If Reassign Owner is checked on the Plan and this field is populated, then the Assignment Plan will attempt to change the ownership of records assigned to this Area. More details below in Changing Ownership.
Repeat these steps for each Assignment Area for this Assignment Plan. Once complete your Assignment Plan may look something like this.
At this point our Assignment Plan is fully configured and we can run it against the Accounts in our system.
5. Run the Assignment Plan job.
In the Assignment Plans tab, click All under the Batch Assign column. This will prompt the system to review all records and assign them accordingly.
Click Delta if you want to process only newly-added records. This should only be done if an All batch has already been processed.
6. Schedule a Batch Job.
In addition to manually launching the Assignment Plan batch job, we can also schedule Assignment Plans to run on a daily or hourly basis, to ensure assignments stay current as changes are made to records. To do this, select the Batch Jobs tab on the Geopointe Setup page.
In the Action column for Assignment Plans, click Schedule AP Daily or Schedule AP Hourly, depending on how frequently you want to job to run.
Note: If you already have an Assignment Plan batch job scheduled and want to change the frequency, you must first click Cancel Assignment Plans in order to see these scheduling options.
Once the batch job has completed, we can review the results. Before the batch job runs, the Territory field and the custom related list Territory Assignments were blank.
After the Assignment Plan job has completed, the Territory and Related List are automatically populated. This account is currently located in Seattle so it falls into the Northwest Assignment Area we defined earlier.
There is a hard limit of 500 sub shapes allowed in an Assignment Area. For example, one Assignment Area can be comprised of a maximum of 500 postal codes. Occasionally, some shapes may be too large and complex to process even though they contain fewer than 500 sub shapes. The Geopointe Admin will receive an email if this occurs.Note: For Leads and Cases only, this can be done by checking Run Assignment Rule.
Reassign OwnerIf Reassign Owner is checked on the Plan and the Assignment Area’s User field is populated, then the Assignment Plan will attempt to change the ownership of records assigned to that Area. Two important things to note:
- The ownership change may fail if your have custom validation rules/triggers/workflows in place that are in conflict.
- The record ownership is changed only when Custom Assignment Fields are used.
If Assignment Area’s User field is populated but Reassign Owner is not checked, this User info will still be available for your custom processes.
Run Assignment Rule
This checkbox is only available when the Assignment Plan is for Leads or Cases. When checked, the Assignment Plan will execute the DEFAULT Lead/Case Assignment Rule when assigning Leads or Cases. Two important things to note:
If a Lead or Case does not get assigned, it will not be processed by the Assignment Rule.
If both Reassign Owner and Run Assignment Rule are checked, the Reassign Owner option will be ignored. The Assignment Area User fields are ignored when Run Assignment Rule is checked.