Geopointe

Mass Create Shapes from Postal Code or County Data

Disclaimer: This is a manual solution. It will still require significant setup on your end to make it work, as well as experience using Data Loader or the Data Import Wizard. You should be at least a Salesforce admin to complete these steps.

Disclaimer 2: This isn't actually supported. We only suggest this as a last resort. If your shapes do not import correctly, we WILL NOT comb the CSV for errors, but instead direct you to the web interface. You've been warned.

Are you wanting to Import US Zip Codes? STOP! We now support loading USPS Zip Codes from text on the Map page. Click on the Globe icon to bring up the Geopointe Shape library, and switch to the From Text option. It allows you enter zips as comma delineated lists or spreadsheet rows.

When you plan to use Geopointe for multiple shapes and each shape is broken down by postal code or county data, a mass import may be easier. This article walks through a solution that allows you to import a spreadsheet into Salesforce that will create the shape records for you.

Get to Know The Shape Object

Before you start down this road, you'll want to familiarize yourself with the shape object in general. I promise, it'll make this process a lot easier for you.

1. Go to the Map tab and create a shape using the Shape Library. If you plan to create shape based on zip codes, do that for this test; if you'll be using counties, build this test shape with the counties. Need help? We've got you covered.

2. Once you have a shape created, expose the Geopointe Shapes Tab in Salesforce. If you don't know how, here is the process to follow:

- Go to Salesforce Setup.
- Navigate to Create | Tabs | New | New Custom Object Tab.
- Choose Geopointe Shapes as the Object; Choose a Tab Style you like (there's lots of shape to choose from; I recommend those). Click Next.
- Change Apply one tab visibility to all profiles to Tab Hidden. Then, select the Radio button for Apply a different tab visibility for each profile. Turn the tab on for ONLY those that need it. If you're a System Admin, it may only be your profile. If you're a different kind of admin, you may want to do your profile and another admin type. Click Next.
- Uncheck Include Tab so it doesn't show up on all your Custom Apps. Add it back to any you want it visible on (I usually don't, personal preference). Click Next.
- Click Save.

3. Now that you have a shiny new Geopointe Shapes tab, navigate to it (if you didn't attach it to a custom app, it'll be behind the sign on your tabs). Open the Shape you created in Step 1. More than likely it'll be in your recent shapes.

4. Once you're looking at the shape record itself, edit the layout; there are some fields that you'll want that are not exposed by default. Make sure you can see the following:

- Shape Name
- Color
- Opacity
- Folder
- Type
- Usage Type
- Coordinates 1



5. These are all fields that you will need to have filled in on a spreadsheet when you do your import. Here's a breakdown of what each stores.

- Shape Name: The name you want displayed for your users on the map.
- Color: The HEX code for the color you want your shape to me.
- Opacity: How dark the shape will be against the map. The default is 0.40, as shown above.
- Folder: Where they will live on the map. This is a look-up field to Geopointe Folders. I'd strongly recommend having a Folder in place to put them into before you import.
- Type: Multipolygonrequired value
- Usage Type: GeoShaperequired value
- Coordinates 1 (et al): This is where the IDs for each individual shape are stored.

Formatting the Spreadsheet for Upload

When you are preparing to upload the spreadsheet into Salesforce, each of the fields mentioned above will need to be a column in the spreadsheet.

To start the process, you need to contact us at help@geopointe.com and request a CSV of shape IDs (either zip codes or counties or their equivalents in another country).

What you'll receive from us will be a very long list that looks something like this:



So, what is important to you on this spreadsheet?



We are going to use this information to determine what needs to be in Coordinates 1 on the new spreadsheet. If you remember from above, Coordinates 1 is formatted something like this:



Notice that list looks very similar to the ID field above in the spreadsheet. You're going to match the Geographic area to its Id, enclose it in quotes, and contain it with brackets. If you're putting more than one geographic area in a single shape, you comma delineate inside the brackets. Here's an example:



After that, you fill in the rest of the data table. Each row represents a shape you'll be creating. It'll look something like this (note that the Folder is the record ID, not the Folder Name):



At this point, save it as a CSV and it's just about ready to upload either using Data Loader or the Data Import Wizard. A few notes:

1. Autoformatting is bad for CSV imports! Either disable it in Excel or after you've completed it, do a find/replace on all formatted punctuation. The biggest culprits are the commas and double quotes. You don't want those coming into your system as so-called "smart" characters because your shapes will be broken.

2. Do a test with a few records to make sure it is working correctly before doing the whole batch.

Once done, you should have plenty of brand new shapes imported into Geopointe and ready to use! Happy shape building!