Loading
Salesforce now sends email only from verified domains. Read More
Salesforce Maps
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Schedule Geocoding Batch Jobs for Salesforce Maps Records

          Schedule Geocoding Batch Jobs for Salesforce Maps Records

          Apply geocodes to a large number of records in Salesforce Maps more quickly by processing records with geocoding batch jobs. You can run a one-off batch job or schedule batch jobs at daily, weekly, or monthly intervals. This automation can help you save time when plotting records that are missing geocodes in Salesforce Maps.

          Required Editions

          View supported editions.
          User Permissions Needed
          To customize settings: Customize Application
          To schedule Apex jobs:

          API Enabled

          AND

          Access to the Name field on the ApexClass object

          Before you start a geocoding batch job, review these important considerations.

          • Batch jobs are subject to Salesforce limits for asynchronous Apex method executions. See Execution Governors and Limits.
          • Batch jobs skip any records that already have geocodes specified.
          • Make sure that any automation on the object, such as triggers or flows, doesn’t prevent the saving of coordinates.

          Go to Batch Options

          1. From Setup, in the Quick Find box, enter Installed Packages, and then select Installed Packages.
          2. Find the Salesforce Maps package and click Configure.
          3. From the left menu, select Automation.

          The Automation page includes these tabs.

          Tab Description
          Schedule New Batch Schedule a new geocoding batch that runs at time intervals that you specify.
          Run Manual Batch Run an unscheduled geocoding batch. Try this option after you import or create a large number of records.
          Last 5 Batches Ran Find the results of the five most recent geocoding batch jobs.
          Scheduled Batches Review any upcoming geocoding batch jobs that are scheduled to run.

          Schedule a New Batch

          1. On the Automation page, click the Schedule New Batch tab.
          2. Enter a descriptive batch name.
          3. For Apex Class, leave the GeoCoderSchedulable class selected.
          4. For Base Object, specify the object with the records that you want to geocode.
          5. In the Schedule Apex Execution section, specify whether the batch job runs weekly or monthly, and specify a start time.
            • For weekly frequency, select the days that you want the job to run each week. You can select up to seven days, which causes the job to run daily.
            • For monthly frequency, specify the day of the month that the job runs.
          6. To save your changes, click Schedule.

          Run a Manual Batch

          1. On the Automation page, click the Run Manual Batch tab.
          2. For Base Object, specify the object with the records that you want to geocode.
          3. Select an option for running the batch.
            • To geocode all records for the specified base object, click Start Geocoding Batch. The batch job geocodes records in increments of 10, up to 250,000 records total.
            • To clear the latitude and longitude values for the specified base object’s records so that you have fresh geocodes, click Start Lat/Long Removal Batch. This batch job is limited to 500 records.
            • To reset records with improperly formatted address values, click Start Clear Skip GeoCode Flag Batch. This option requires some additional customization in Salesforce, as described in the next section.

          (Optional) Complete Prerequisites for the Skip Geocode Flag Batch

          A geocoding batch job can identify records that have an improperly formatted address, which can cause the next geocoding batch job to skip those records. You can run a special batch to reset that flag on affected records so that you can run a new geocoding batch on them. This special batch job requires some additional customization in Salesforce.

          1. From the object management settings for the base object that you want to geocode, create a custom field with these details. See Create a Custom Field.
            1. For Data Type, select Checkbox.
            2. For Field Label, enter MASkipGeocoding.
            3. For Field Name, enter MASkipGeocoding__c.
          2. Turn on the Skip Failed Geocodes field for the base object.
            1. From Setup, in the Quick Find box, enter Installed Packages, and then select Installed Packages.
            2. Find the Salesforce Maps package and click Configure.
            3. From the left menu, select Base Objects.
            4. Select the base object.
            5. Turn on Skip Failed Geocodes.
            6. Save your changes.
          3. Return to the Automation page, run a geocoding batch, and then try Start Clear Skip GeoCode Flag Batch.
           
          Loading
          Salesforce Help | Article