Batch Jobs (Geopointe)

The Geopointe application utilizes Salesforce’s Batch Apex technology to handle many background operations. This document provides an overview of the various jobs that run and what they do. You can see these jobs and their statuses in the Batch Jobs tab of Geopointe Setup under Current & Recently Completed Batch Jobs. You can always see all jobs in the regular Salesforce Setup at Setup | Monitoring | Apex Jobs.


This job assigns the Map Object records to the Geopointe Assignment Areas.  

1. It only processes one Assignment Plan.  If it's run via the Scheduled Job, the scheduler will process the Assignment Plan that was run longest ago/never been run.  It will only run active plans with assignment areas.

2. It will iterate over your Map Object records in batches of 200 records at a time.  Please contact Geopointe support if this scope size needs to be changed.  In the future, we will provide an way for you to customize as needed.

3. Based on the Assignment Plan configuration, this job will populate the Assignment Area lookup field and/or insert a Custom Assignment Object record as needed. It will only populate lookup fields for records whose lookup fields are empty.

There are three ways to run this job:
1. Use the Schedule Job link in the Batch Jobs tab of Geopointe Setup.  When scheduled from the Geopointe Setup page, it will run twice a day around 10:30 pm and 2:30 am.  

2. In the Assignment Plans tab of Geopointe Setup, click the Run Assignments link on the assignment plan you want to process. This will start the batch job (if possible) or queue it to run as soon as possible.

3. Schedule AssignmentPlan_MasterSchedule to run on your own custom-defined schedule in Salesforce Setup. Using the Quick Find, navigate to the Apex Classes page and click Schedule Apex.  

It should be noted that this job does not unassign or reassign records (e.g. if a record's address changes or the areas change).  Records are unassigned in AssignmentPlanCleanup_Batchjob.


This job finds records that are no longer within their assigned Areas.  It will either clear the Assignment Area lookup field and/or delete the Custom Assignment Object record as necessary.  This job is executed by the AssignmentPlan_MasterSchedule class.


This job is another clean up job specifically for inactive Assignment Plans.


This is the most common job that runs. This job is responsible for geocoding your data. This is the process of converting your address data into latitude and longitude. We generally recommend that this job be scheduled from the Scheduled Jobs section of Geopointe Setup, found under the Batch Jobs tab. However, this job can also be invoked manually by using the Batch Geocode links in the Map Object list of the Geopointe Setup tab. When this job runs, it performs the following steps.

  1. Looks to your Map Object list for active Map Objects and selects the one whose Last Geocode Date is the furthest in the past or has never been run.
  2. There are two types of Geocoding types:
    • “Delta” – This is the default and is meant to look for changes to existing data. This mode will query records in that object that either:
      • Have never been geocoded
      • Have been modified since the last time the job ran
    • “All” – This mode is only run manually from the Geopointe Setup tab. This will query all records and force a reevaluation of every record’s geocode. This only needs to happen if changes were made to the Map Object such as where to look for address data.
  3. It runs through the data in batches of 100 records at a time or the batch size set on the Map Object record. This batch size determines how many Salesforce records will be created/updated at a time.
  4. In “Delta” mode, it determines whether each record needs to be geocoded. It will be geocoded if…
    • It has an address and has never been geocoded before
    • It’s been geocoded, but it’s address has changed since the last time it ran
  5. A single geocode request for all records in the batch is sent to Google's geocoding service.
  6. The geocoding response is received and the following is performed.
    • A geocode record is created/updated that corresponds to the record being geocoded. This data is managed in a custom object called “Geocodes” that comes with Geopointe.
    • For new records, the geocode record is linked to the master record in its Geocode field. For example, the Account object has a field from Geopointe called Geocode. This is a Lookup field in Salesforce and will carry the link between the Account record and the corresponding Geocode record.
  7. A summary of geocode operations is sent to Geopointe for support purposes. We only see the # of records geocoded, counts of success/failure and any error messages. No business data is transmitted to Geopointe.


This job deletes unneeded Geocode records. Since the Geocoding model is to house a Geocode record for each record geocoded, it is possible that geocode records become obsolete. For example, if you are geocoding Leads and then convert a Lead, the Geocode record will remain linked to the Lead, but the Lead record is no longer usable in Salesforce.  Likewise, if a Lead is deleted, the geocode record remains and is no longer usable.

In an effort to minimize the Storage Usage that geocodes take up, this job deletes unnecessary geocodes. This job is not scheduled. It periodically kicks off as people use the application. It’s possible that a non-admin kicks off this job.

A geocode record will be deleted in the following circumstances.

  • The master record no longer exists
  • The Map Object corresponding to the Geocode is inactive and/or no longer exists
  • The Map Object has been modified to refer to another object’s geocode rather than having its own geocode configuration.
  • The master record no longer meets the query criteria of the Map Object because a filter was added at the Map Object level.

While this job only deletes the Geocode record, the master record can also be triggered with an update since the Lookup field on it is being cleared of a value.


The Geo Locations custom object is installed with Geopointe. This object houses user’s personal addresses that they don’t want to co-mingle with business data (e.g. home, a hotel, etc). Geopointe also uses this object to temporarily house addresses manually entered into the Map page. This job is not scheduled. It periodically kicks off as people use the application and will delete any geolocation records marked as Temporary.


The Geopointe system and Geopointe’s Salesforce system sync some subscription level information. This job manages this. Information such as Primary Contact address and some preferences are sent up to Geopointe. Application permissions are sent down from Geopointe to the subscriber system. This job is not scheduled. It periodically kicks off as people use the application.


This job assigns the packaged permission sets in Geopointe to Salesforce users. This eliminates customers needing to manually manage profile permissions and simplifies user setup. This job is kicked off manually from the Geopointe Setup tab. All users will be assigned the permission set. The permission set will give them access to the Objects, Fields, Pages and Apex Classes necessary to make the app function.


This job unassigns the packaged permission sets in Geopointe from Salesforce users. This job is kicked off manually from the Geopointe Setup tab. All users will be unassigned from the permission set. This job is necessary to successfully uninstall Geopointe.


Geopointe uses the Route object to hold permanently saved routes as well as routes for temporary use. This job is not scheduled. It periodically kicks off as people use the application. It will delete any routes marked as Temporary.


This job manages the sending of data from Salesforce to SpatialKey, our partner for the Geopointe Analytics solution. A user chooses to Sync Data Set from the Visualize tab in Geopointe. This job queries the data in Salesforce, packages it up as a CSV and sends it to SpatialKey for import. No customer data is updated in Salesforce when this process runs. A record in the Temp object is used to manage the process.


The Temp object comes with Geopointe and is a generic object used for many different purposes. It contains fields of many data types and Geopointe uses this object to temporarily house information. This is sometimes more efficient than trying to hold data in memory as users navigate from page to page. Features like Add To Campaign, Print Route and more use this object. This job will delete Temp records from the system that are no longer needed. This job is not scheduled. It periodically kicks off as people use the application.