Check out the process in the video below, or read on for more detailed instructions.
Note: It is important to understand this Shape Field functionality is best used to describe an attribute of a record in your system. It is tempting to use these for some form of territory coverage but that is not how they are designed to be used. If you are looking to assign records to records to territories/regions, you will want to look into our Assignment Plan feature.
This document will explain how to setup and use Shape Fields while also walking through a typical use case. In this example we will build a Shape Field that represents the delivery area for for a food restaurant.
Step 1: Create a Shape Field
The first step to mapping a restaurant’s delivery area is to create a shape field. In our organization we have a custom object called Restaurant. On this object we need to create a new custom field lookup to the Geopointe Shape object.
Select the Lookup (Relationship) field type.
Relate this lookup field to the Geopointe Shape object.
Change the name of the field to reflect the shape area. In this example we will call it Delivery Area. It is highly recommend to check the box that says, “Don’t allow deletion of the lookup record that’s part of a lookup relationship.” This will prevent the shape from being deleted if it is in use by any records.
We also need to create a Lookup Filter for this field where Geopointe Shape: Usage Type = ‘Shape Field.’
After these steps have been completed continue through the new custom field wizard to set user access and add the field to page layouts as necessary.
Step 2: Enable the Add Shape Action
Once this Delivery Area Shape Field has been created, we need some way to populate and build the shapes. Geopointe includes a record action called Add Shape that allows us to do this. (Learn more about Actions here). First we need to enable this Add Shape action.
Navigate to the Geopointe Setup tab and within this page select the Actions tab.
In the list of Record Actions look for the Add Shape action and edit the record. Upon editing, set the Available (Web) field to true and save it.
Step 3: Add a Shape to a Record
Now we can start to create Shapes and related them to records in our system. In this example I will view a Restaurant record and then click the Map button at the top of the record.
This will load the map and drop a marker on the map for this record. Select the marker on the map to view the info window for this record, then click the Add Shape action.
This will put the map in shape drawing mode so that we can draw a delivery area on the map. Note the Field picklist currently says Delivery Area but if you have multiple Shape Fields on a record, you can choose which field should be populated with the new shape.
We can also change the shape to a circle and define a range.
Finally, you can also use the Geopointe shape library to define the shape. They will add to the map as you select them in the list. Once satisfied with the shape, click Save Shape.
If we click the Map button on the Restaurant record, we will see the marker representing the location of the Restaurant and the Delivery Area shape associated with that restaurant.
Thats it! We’ve now created and populated a Shape Field on a custom object in our system.
To edit saved shapes, simply click the shape on the map and then click the Edit option from the Actions drop down list.
Shape Field Searching
Loading the map from a single record will show that record’s related shapes but the next logical step would be to search for multiple restaurants and see all of their delivery areas on the map at once. This is easy to do as well. Sticking with our restaurant example let’s say we have a Contact record and we want to see if this contact lives within the delivery area for any of the restaurants in our system. We're going to do a nearby search of Restaurants around a Contact record and include the shape fields in the search.
Follow these steps:
1. Navigate to a Contact record and click the Map button so that you are looking at that record on the Map.
2. Identify the Restaurant data set you want to search and make sure the shape fields are selected. To do this, hover over the name of the data set that you want to search, so that the Layer Options icon appears, then click Edit Data Set from the menu. Click the Fields section, then click the Add Field link.
Add the Shape Fields you want to show on the map. In our example this is the Delivery Area field. Make sure you select the field with (Shape) in parentheses. Close and save the data set.
3. Select the Nearby search type and configure search parameters. In this example, we are searching for Restaurants within 1 mile of the Contact record we are starting from.
4. Click to run the data set search. You can now see the location of the restaurants as indicated by the pin markers and the related Delivery Area.
We can see the contact (red pin, yellow house) is within the blue shape. Clicking on shape lets us know this contact is within the Delivery Area for the Thai Tastic restaurant.
IMPORTANT NOTE: When you include a Shape Field in the list of fields for a search, the Map search will not consider the bounds of the shape when calculating the results. It is only based on the mapped point location of the record.
Shape Fields in the Salesforce Mobile App
You can now view shape fields in Geopointe for the Salesforce mobile app. The shape field must be created in the browser version of Geopointe in order to be visible in the mobile app. Simply load the shape field data set to the map to see the shapes. You can then load another data set and tap a shape field to see a summary of records within it, as shown in the screencap below.