Salesforce Maps Apex Developer Guide Version 59.0

This guide describes how to use the Salesforce Maps Apex Developer API to manage records, create routes, get routes, and more.


Salesforce Maps Apex Developer Guide Version 59.0 - cover page
Brand
Salesforce
Category
Programming
Document type
Programming Manual
Language
English
Pages
73
File format
PDF
File size
492 KB
Published
31 October, 2023
Updated
31 October, 2023
MD5 checksum
247BB03900C767F5F9F588CF3119DBAC

About this manual

This guide describes the Apex methods that developers can use to perform Salesforce Maps operations without using the user interface, such as returning travel distances and times between locations, getting geographical coordinates for addresses, and retrieving geometric data for areas and perimeters. It is published as version 59.0, Winter ’24, and was last updated on September 28, 2023.

The guide first lists requirements—Apex class access through Enterprise, Unlimited, or Developer Editions, an installed Salesforce Maps package, and the appropriate Salesforce Maps license—then documents each method in the maps.API class, including AssignRecords(), CreateRoute(), route retrieval, boundary information, distance matrices, batch geocoding, dataset and alignment deletion, and territorial data lookups. Sample code, responses, and notes on avoiding uncommitted work errors are included throughout.

What's inside

  • Overview
  • Salesforce Maps Apex Requirements
  • Salesforce Maps Apex Methods
  • Assign Records to Owners Using an Assignment Plan
  • Create a Route
  • Create Routes for Specific Users
  • Create Routes from Visit Plan
  • Get a Route
  • Get the Distance Matrix
  • Get the Geographical Coordinates of an Address

Specifications

Document version59.0, Winter ’24
Required editionsEnterprise, Unlimited, or Developer Editions
Required licenseSalesforce Maps or Salesforce Maps Advanced
Additional license for location methodsSalesforce Maps Live Tracking
Apex namespacemaps
API classmaps.API
AssignRecords signaturemaps.API.AssignRecords(String, List)

Frequently asked questions

Do Salesforce Maps Apex methods count against org API limits?

No. The guide states that Apex methods don’t count against org API limits.

What do I need before using Salesforce Maps Apex methods?

You need access to Apex classes through Enterprise, Unlimited, or Developer Editions, Salesforce Maps installed, and a Salesforce Maps or Salesforce Maps Advanced license.

How do I avoid uncommitted work errors when invoking these methods in a flow, process builder, or trigger?

Call the methods through a future method or call them as queueable.

What does CreateRoute() return?

It creates a record that includes a list of waypoints that reps access in Salesforce Maps; the record doesn't include a route between waypoints.

Download PDF (492 KB)

More Salesforce Manuals


View all Salesforce manuals →