Assignment Plans are 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 Geo-Library. Then, use Assignment Plans to automatically assign your records to your areas.
Assignment Plans help answer questions like:
- 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. Geo 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
Creating an Assignment Plan
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, Accounts in this example, that will only match with one Geographic area. There are no overlapping areas. If multiple geographic areas are matched to this Account one geographic area will be randomly linked to this Account.
Related lists can be used when an Account may fall into multiple geographic areas. In this scenario a related list is required to support the one account to many geographic areas relationship. Another scenario is having multiple Assignment Plans and you wish to reuse one related list instead of creating multiple Lookup fields on the Account for each Assignment Plan.
There is no correct way and this decision 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.
Single Lookup field Setup
Step 1 First we will create a custom Lookup field on the Account standard object that points to a Geopointe Assignment Area. This same process would apply to any other standard or custom objects you would use with Assignment Plans. Create a new field for Account and follow these steps.
For the field type select Lookup Relationship.
On Step 2 select Geopointe Assignment Area for the Related To object.
On Step 3 of the new field wizard be sure to give the field an appropriate name. Salesforce.com will automatically default this to “Geopointe Assignment Area” but we want to rename this to “Territory”. After this step proceed through the new field creation wizard.
Related List Setup
Related lists can be used when an Account may fall into multiple geographic areas. The next step will be to create a custom object related list for the Assignment Areas. You will need to create a custom object with two Master-Detail fields. One of those fields will lookup to the Account object. The other field will lookup to the Geopointe Assignment Area object. Be sure to give these fields appropriate names.
Here is what the completed object may look like:
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 and then select the Assignment Plans tab on the page and choose the New Assignment Plan button.
The first step will be to choose the Map Object we would like the Assignment Plan to run against. In this example it is Account.
Next we will 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.
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.
Now that we have defined our Assignment Plan we must create some geographic shapes for the Assignment Plan to use. This will be completed on the map page. See this documentation on how to create Shapes.
Once the geographic shapes have been created we can start to create Assignment Areas. Assignment Areas link the shapes created to the Assignment Plans. On the Assignment Plan edit page select the “New Assignment Area” button.
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. Navigating back to the main Assignment Plans tab we can see a “Run Assignment Plan” link in the rightmost Batch Assign column. Selecting this will run the Assignment Plan.
In addition to manually launching the Assignment Plan batch job. We can also schedule Assignment Plans to run on a daily basis. To do this select the Batch Jobs tab on the Geopointe Setup page.
Next the the Job Name “Geopointe Assignment Plans” select the Schedule Job link. This will run the Assignment Plans on a daily basis.
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 are blank.
This account is currently located in Seattle so it falls into the Northwest Assignment Area we defined earlier. After the Assignment Plan job has completed running the Territory and Related List are automatically populated.
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.
Changing OwnershipAn Assignment Plan can be configured to change the ownership of records when they are assigned to Areas. This can be done via the “Reassign Owner” checkbox and the Assignment Area User field. Or, 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.