RouteForce RouteForce
Docs Install RouteForce from AppExchange
Advanced Admin Guide

RouteForce Configuration Guide

Complete reference for RouteForceConfig__mdt and RouteForceAction__mdt

Product
RouteForce for Salesforce
Version
V7.8.0 | April 2026
Audience
Salesforce Administrators
RouteForce V7.8.0: Configuration Guide. This document covers the two-layer configuration model (App Builder + Custom Metadata), deployment patterns, the complete field reference for RouteForceConfig__mdt and RouteForceAction__mdt, and ready-to-use configuration presets.

Version: V7.8.0 | April 2026
Audience: Salesforce Administrators
Applies to: RouteForce for Salesforce (managed package)

Table of Contents

  1. Configuration Model: Where Does Each Setting Live? NEW
  2. Deployment Patterns NEW
  3. Customizing the Global Workspace NEW
  4. App Builder Property Reference NEW
  5. Configuration Architecture
  6. RouteForceConfig__mdt: Complete Field Reference (36 fields)
  7. RouteForceAction__mdt: Custom Actions Reference
  8. FlexiPage Configuration (App Builder)
  9. Shared Filters (SavedFilter__c)
  10. Address Enrichment (France only)
  11. Usage Tracking
  12. Scheduled Jobs
  13. Permission Sets
  14. Data Requirements
  15. Remote Site Settings
  16. Licence System
  17. API Key Management
  18. Onboarding Wizard (RF_Onboarding)
  19. Configuration Presets NEW
  20. Configuration Examples
  21. Troubleshooting
  22. Quick Reference: All 36 Defaults

1. Configuration Model: Where Does Each Setting Live?

RouteForce has two configuration layers with clear ownership:

LayerWhereScopeHow to edit
App Builder propertiesLightning App Builder (FlexiPage)Per-pageDrag the routeforce component → edit properties in the right panel
Custom Metadata (CMDT)Setup → Custom Metadata Types → RouteForceConfigOrg-wideEdit the Default record

Ownership rule

Setting typeOwnerOverride behavior
What data appears on the map (fields, filters, colors, popups)App BuilderOverrides CMDT when set; if blank, falls back to CMDT
How the product behaves (features, limits, defaults, toggles)CMDTNot overridable from App Builder
Custom action buttons (Flow triggers in popups)CMDT (RouteForceAction)Not overridable from App Builder
Decision tree: "Where do I change this?"

Is it about WHICH FIELDS / FILTERS / COLORS appear? → App Builder properties (per-page). Falls back to CMDT if left blank.

Is it about enabling/disabling a FEATURE? → CMDT RouteForceConfig.Default

Is it about LIMITS or DEFAULTS (zoom, radius, days)? → CMDT RouteForceConfig.Default

Is it about CUSTOM ACTION BUTTONS in popups? → CMDT RouteForceAction records

Override cascade

App Builder property (if set)
  ↓ fallback
CMDT RouteForceConfig.Default (if set)
  ↓ fallback
Hardcoded product default

Only two fields follow this cascade: addressFieldPrefix and filterFields. All other fields are exclusively App Builder or exclusively CMDT.

Quick reference map

┌─────────────────────────────────────────────────────────┐
│                  ROUTEFORCE CONFIG MAP                   │
├─────────────────────────┬───────────────────────────────┤
│     APP BUILDER         │         CMDT                  │
│     (per page)          │         (org-wide)            │
├─────────────────────────┼───────────────────────────────┤
│ addressFieldPrefix  ──► │ AddressFieldPrefix__c         │
│ filterFields        ──► │ FilterFields__c               │
│ typeField/Values        │                               │
│ oppTypeField/Values     │                               │
│ leadTypeField/Values    │                               │
│ forceMultiPicklist      │                               │
│ markerFields            │                               │
│                         │ Enable*__c (feature flags)    │
│                         │ Default*__c (map settings)    │
│                         │ *QueryFields__c (data shape)  │
│                         │ *QueryFilter__c (data scope)  │
│                         │ VisitReport*__c (visit config)│
│                         │ RouteForceAction__mdt (flows) │
├─────────────────────────┴───────────────────────────────┤
│  ──► = App Builder overrides CMDT when set              │
│  All others = exclusive to their layer                  │
└─────────────────────────────────────────────────────────┘

2. Deployment Patterns

RouteForce supports two deployment models. Both are first-class.

Pattern A: Contextual (Record Page)

Best for teams that work from Account/Lead/Opportunity record pages.

AspectDetail
WhereAccount, Lead, or Opportunity Record Page
SetupLightning App Builder → Edit Record Page → drag routeforce component
ConfigApp Builder properties are scoped to that record page
Use case"Show me the map around this account"
MobileSupported (Small form factor)

Pattern B: Global Workspace (App Page / Tab / Home / Utility Bar)

Best for field reps and managers who use the map as their primary work surface.

AspectDetail
WhereApp Page, Tab, Home Page, or Utility Bar
SetupLightning App Builder → New App Page → drag routeforce component
ConfigApp Builder properties define the global experience
Use case"Plan my week, see all my accounts on one map"
MobileSupported (Small form factor)

Which pattern to use?

NeedPattern
Reps live on record pages and want contextual mapA: Record Page
Reps use the map as their main workspaceB: Global Workspace
Both contextual and global usageA + B (independent configs per page)
Quick access without leaving current pageB: Utility Bar

3. Customizing the Global Workspace

The packaged RouteForce app includes a default App Page with pre-configured values. Because it is a managed-package page, you cannot edit it directly in customer orgs. Use the clone-and-compose pattern below.

Step 1: Create your own App Page

  1. SetupLightning App BuilderNewApp Page
  2. Choose One Region layout
  3. Drag the RouteForce component onto the page
  4. Configure the App Builder properties to match your org (see Section 4)
  5. Save → name it (e.g., "RouteForce Custom")
  6. Activation → choose where to expose it (App Page, Tab)

Step 2: Create a Tab for your page

  1. SetupTabsLightning Page TabsNew
  2. Select your new page → give it a label (e.g., "RouteForce")
  3. Choose the RouteForce icon (or any preferred icon)

Step 3: Add to your App

Option A: Use the packaged RouteForce app (recommended):

  1. SetupApp Manager → find RouteForceEdit
  2. In Navigation Items, add your new tab
  3. Optionally remove the default RouteForce tab if you want full control

Option B: Create your own app shell:

  1. SetupApp ManagerNew Lightning App
  2. Add your custom RouteForce tab + any other tabs you need
  3. Assign to the right profiles/permission sets
When to use which option?

Default config works, minor tweaks needed → Edit CMDT only, keep packaged page
Need different filters/fields than default → Clone-and-compose (Option A)
Need fully custom app navigation → Clone-and-compose (Option B)
Multiple teams need different map configs → One custom page per team

4. App Builder Property Reference

These properties are set per-page in the Lightning App Builder when you configure the routeforce component.

addressFieldPrefix

AttributeValue
TypeString
DefaultShipping (from CMDT, then hardcoded)
PurposeWhich compound address field to use for geolocation
OverrideOverrides CMDT AddressFieldPrefix__c when set

Shipping → uses ShippingLatitude/ShippingLongitude. Billing → uses BillingLatitude/BillingLongitude. Leave blank to use the org-wide default from RouteForceConfig.

filterFields

AttributeValue
TypeString (comma-separated)
DefaultCMDT FilterFields__cAccount.Industry,Account.Type
PurposeWhich picklist/boolean fields appear as map filters
OverrideOverrides CMDT entirely (not additive)

Syntax: {Object}.{FieldApiName}, always prefix with the object name.

ScenarioValue
Account onlyAccount.Industry,Account.Type,Account.Rating
Account + OpportunityAccount.Industry,Account.Type,Opportunity.StageName,Opportunity.ForecastCategory
Prospecting (Leads)Lead.Status,Lead.LeadSource,Lead.Rating
Cross-objectOpportunity.Account.Industry
Full setupAccount.Industry,Account.Type,Account.Rating,Opportunity.StageName,Lead.Status,Lead.LeadSource

typeField / typeValues (Account markers)

Assigns distinct marker colors to Account records based on a field value. App Builder only, no CMDT equivalent.

Example: typeField = Type, typeValues = Customer - Direct,Customer - Channel,Prospect,Other

Each value gets a distinct color. Order determines color assignment: first value = first color in the palette. Leave both blank for uniform Account markers.

oppTypeField / oppTypeValues (Opportunity markers)

Same pattern as Account, with warm-toned colors. Requires EnableOpportunities__c = true in CMDT.

Example: oppTypeField = StageName, oppTypeValues = Prospecting,Qualification,Needs Analysis,Closed Won,Closed Lost

leadTypeField / leadTypeValues (Lead markers)

Same pattern, cool-toned colors. Requires EnableLeads__c = true in CMDT.

Example: leadTypeField = Status, leadTypeValues = Open - Not Contacted,Working - Contacted,Closed - Converted

forceMultiPicklist

AttributeValue
TypeString (comma-separated)
DefaultNone
PurposeRenders specified picklist filters as multi-select checkboxes instead of single-select dropdowns

Example: Industry,Type: the Industry and Type filters become multi-select. Only applies to fields already listed in filterFields.

markerFields

AttributeValue
TypeString (comma-separated)
DefaultNone (minimal popup)
PurposeFields displayed in marker popups when you click a pin on the map

Account fields have no prefix. Opportunity/Lead fields use {Object}.{Field}.

ScenarioValue
Account basicPhone,Industry,Website
Account + OpportunityPhone,Industry,Opportunity.StageName,Opportunity.Amount,Opportunity.CloseDate
ProspectingLead.Company,Lead.LeadSource,Lead.Status,Lead.Email,Lead.Phone
Full popupPhone,Industry,Website,Opportunity.StageName,Opportunity.Amount,Lead.Company,Lead.Status,Lead.Email

Configuration Presets

Copy-paste these ready-made configurations. Each preset lists the App Builder properties and CMDT settings to apply.

Preset A: Account-only map (simple)

Use case: Teams that only work with Account records. Clean, fast, no clutter.
App Builder PropertyValue
Address field prefixShipping
Filter fieldsAccount.Industry,Account.Type
Account marker color fieldType
Account marker color valuesCustomer - Direct,Customer - Channel,Prospect
Marker popup fieldsPhone,Industry,Website

CMDT: EnableLeads__c = false, EnableOpportunities__c = false

Preset B: Account + Opportunity (sales team)

Use case: Sales teams that need to see pipeline on the map alongside existing customers.
App Builder PropertyValue
Filter fieldsAccount.Industry,Account.Type,Opportunity.StageName,Opportunity.ForecastCategory
Account marker color fieldType
Account marker color valuesCustomer - Direct,Customer - Channel,Prospect
Opportunity marker color fieldStageName
Opportunity marker color valuesProspecting,Qualification,Needs Analysis,Closed Won,Closed Lost
Marker popup fieldsPhone,Industry,Opportunity.StageName,Opportunity.Amount,Opportunity.CloseDate

CMDT: EnableOpportunities__c = true, OpportunityQueryFilter__c = IsClosed = false

Preset C: Prospecting mode (Leads-heavy)

Use case: BDR/SDR teams focused on converting leads in a territory.
App Builder PropertyValue
Filter fieldsLead.Status,Lead.LeadSource,Lead.Rating,Account.Industry
Lead marker color fieldStatus
Lead marker color valuesOpen - Not Contacted,Working - Contacted,Closed - Converted
Marker popup fieldsLead.Company,Lead.LeadSource,Lead.Status,Lead.Email,Lead.Phone

CMDT: EnableLeads__c = true, LeadQueryFilter__c = IsConverted = false, DefaultDisplayMode__c = leads

Preset D: Full operations workspace

Use case: Managers and ops teams who need the complete picture: every object, every filter, every feature.
App Builder PropertyValue
Filter fieldsAccount.Industry,Account.Type,Account.Rating,Account.Ownership,Opportunity.StageName,Opportunity.ForecastCategory,Lead.Status,Lead.LeadSource,Opportunity.Account.Industry,Lead.Rating
Multi-select fieldsIndustry,Type
Account marker color field / valuesType / Customer - Direct,Customer - Channel,Prospect,Other
Opportunity marker color field / valuesStageName / Prospecting,Qualification,Needs Analysis,Value Proposition,Negotiation/Review,Closed Won,Closed Lost
Lead marker color field / valuesStatus / Open - Not Contacted,Working - Contacted,Closed - Converted,Closed - Not Converted
Marker popup fieldsPhone,Industry,Website,Opportunity.StageName,Opportunity.Amount,Opportunity.CloseDate,Lead.Company,Lead.LeadSource,Lead.Status,Lead.Email

CMDT: EnableLeads__c = true, EnableOpportunities__c = true, EnableHeatmap__c = true, EnableBulkSelect__c = true, EnableVisitReports__c = true, EnableCSVExport__c = true


1. Configuration Architecture

RouteForce uses a Custom Metadata Type-first approach. All configurable application settings are stored in two CMDTs:

This architecture provides:

RF_Onboarding Flow (Screen Flow)
 |
 +---> SecureConfigService --> InternalConfig__c (API keys, protected)
 |
 +---> Custom Metadata deployment (Setup UI) --> RouteForceConfig__mdt (app settings, 36 fields)
 |                                          --> RouteForceAction__mdt (custom actions)
 |
 v
 ConfigService.cls (Apex reader, cached)
 |
 v
 LWC Components (@wire getConfig)
Important: All CMDT changes are deployed asynchronously via the Metadata API. After saving changes through the onboarding wizard or Setup UI, allow 10–30 seconds for the deployment to complete before refreshing the app.

2. RouteForceConfig__mdt: Complete Field Reference

The central configuration record. All 36 settings reside in the Default record (RouteForceConfig__mdt.Default). Each field is documented below, organized by category.

2.1 Map Settings (7 fields)

Control the initial map appearance, clustering behavior, and display mode.

Field API Name Type Default Description
AddressFieldPrefix__c Picklist Shipping Determines which compound address fields are used for geolocation. Values: Shipping (uses ShippingLatitude/ShippingLongitude) or Billing (uses BillingLatitude/BillingLongitude).
ClusterRadius__c Number 60 Marker clustering radius in pixels. Higher values produce more aggressive clustering (fewer, larger clusters). Range: 20–200. Recommended: 40–80.
DefaultDisplayMode__c Text both Initial marker display mode when the map loads. Accepted values: accounts, leads, opportunities, or both. Users can toggle display modes at runtime.
DefaultMapLayer__c Picklist Standard Initial basemap layer. Accepted values: Standard (OpenStreetMap tiles), Terrain, or Satellite (aerial imagery). Users can switch layers via the map controls.
DefaultZoom__c Number 10 Initial map zoom level on load. Range: 1 (world view) to 18 (street level). Recommended: 6–12 depending on territory size.
EnableHeatmap__c Checkbox true Enables the heatmap overlay toggle in the map toolbar. When active, users can visualize account density as a heatmap layer overlaid on the marker view.
EnableBulkSelect__c Checkbox true Enables the lasso (polygon) bulk selection tool. Users can draw a freehand area on the map to select all markers within it, then add them to a route or perform bulk actions.
Example: Satellite view for a rural territory:
Set DefaultMapLayer__c = Satellite, DefaultZoom__c = 8, ClusterRadius__c = 40 (less clustering for sparse markers).

2.2 Feature Toggles (11 fields)

Enable or disable major application features. All toggles are Checkbox fields (true/false).

Field API Name Type Default Description
EnableEvents__c Checkbox true Enables calendar event integration: agenda panel, event markers on the map, and the ability to create events directly from optimized routes.
EnableLeads__c Checkbox true Shows geocoded Lead records as markers on the map. When enabled, Lead-specific filters and Lead route steps become available.
EnableOpportunities__c Checkbox true Shows Opportunity records as markers (positioned at the parent Account address). Enables Opportunity filters and Opportunity route steps.
EnableVisitReports__c Checkbox true Enables the check-in/check-out visit report system. When enabled, users can record visit outcomes, notes, satisfaction scores, and next actions during field visits.
EnableCSVExport__c Checkbox true Shows the CSV export button in the route panel after optimization. Exports route steps with account details, addresses, and visit sequence.
EnableHistoryNaming__c Checkbox true When saving a route, prompts the user to enter a custom name. If disabled, routes are saved with auto-generated names (date + stop count).
EnableUsageTracking__c Checkbox true Tracks feature usage events (map loads, filter applications, route optimizations, check-ins, etc.). Data is aggregated daily and available in the Usage Dashboard. See Section 7.
EnableRoleFilter__c Checkbox false Adds a filter based on the Salesforce role hierarchy. When enabled, managers can view accounts owned by users in their role subtree. Requires role hierarchy to be configured in the org.
EnableTeamFilter__c Checkbox false Adds a filter based on team membership. When enabled, users can view accounts assigned to specific teams. Requires Account Team Members to be configured.
ContactLookupEnabled__c Checkbox true Shows a contact lookup section in Account marker popups. Displays related contacts with fields defined in ContactQueryFields__c. Allows quick access to contact details without leaving the map.
QuickTextEnabled__c Checkbox true Enables quick text snippet insertion in visit report notes. Users can select from predefined text blocks to speed up note-taking during check-in. Requires Quick Text records in the org.
Performance note: Enabling EnableLeads__c and EnableOpportunities__c increases the number of SOQL queries and markers rendered. For orgs with 50,000+ Leads, consider using LeadQueryFilter__c to limit the result set.

2.3 Route Settings (2 fields)

Control route optimization behavior and display.

Field API Name Type Default Description
MaxRouteSteps__c Number 50 Maximum number of stops allowed per route. The ORS routing API enforces a hard limit of 50 waypoints. Values above 50 are clamped to 50.
RouteStepFields__c Text null Comma-separated list of additional Account fields to display on route step cards (e.g., Phone,Industry,Website). These fields appear below the account name in each route step.

2.4 Filter Settings (8 fields)

Configure which data is queried and how filters behave.

Field API Name Type Default Description
FilterFields__c Text Account.Industry,Account.Type Comma-separated filter field API names that appear in the filter panel. Supports three syntaxes: simple (Industry), object-prefixed (Account.Industry), and cross-object (Opportunity.Account.Industry). Only Picklist, Multi-Picklist, and Boolean fields are supported.
NotVisitedSinceDays__c Number 30 Default threshold in days for the "Not visited since" filter. Accounts whose last visit date exceeds this threshold are highlighted. Set to 0 to disable the default filter.
LeadQueryFields__c Text Rating,LeadSource Comma-separated Lead field API names to include in Lead queries. These fields are available in Lead marker popups and Lead filter options.
LeadQueryFilter__c Text IsConverted = false SOQL WHERE clause appended to Lead queries. Default excludes converted Leads. Example: IsConverted = false AND Rating = 'Hot'.
OpportunityQueryFields__c Text StageName,Amount,CloseDate Comma-separated Opportunity field API names to include in queries. These fields appear in Opportunity marker popups.
OpportunityQueryFilter__c Text IsClosed = false SOQL WHERE clause appended to Opportunity queries. Default shows only open Opportunities. Example: IsClosed = false AND Amount > 10000.
ContactQueryFields__c Text Id,Name,Email,Phone,MobilePhone Comma-separated Contact field API names displayed in the contact lookup section of Account marker popups.
ContactQueryFilter__c Text null Optional SOQL WHERE clause for Contact queries. When empty, all related Contacts are returned. Example: IsActive__c = true.
Cross-object filter example: Setting a filter field to Opportunity.Account.Industry allows users to filter Opportunities by their parent Account's Industry value. The filter dropdown shows all Industry picklist values, and only Opportunities whose parent Account matches the selected value are displayed.

2.5 Visit Report Settings (5 fields)

Configure the check-in/check-out visit report system.

Field API Name Type Default Description
CheckInNotePrefix__c Text Check-in DEPRECATED: No longer used. Check-in data is now stored entirely in Visit Reports; Event Subject and Description are not modified during check-in.
CheckInOnSiteRadiusMeters__c Number 500 GPS radius in meters for on-site detection. When the user's GPS position is within this distance from the account location, the check-in is marked as "On Site". Beyond this radius, it is marked as "Remote".
VisitReportCustomFields__c LongTextArea(1000) No metadata default; recommended value set by onboarding wizard: result, routeforce__Satisfaction__c, nextAction, routeforce__OrderAmount__c, notes, routeforce__NextVisitDate__c Comma-separated field identifiers shown in the visit report form. Controls the order and visibility of fields in the check-in modal. Supports both standard identifiers (result, nextAction, notes) and custom field API names.
VisitResultOptions__c LongTextArea(1000) Positive,Neutral,Negative,No Answer Comma-separated picklist values for the visit result dropdown in the check-in form. Customize to match your organization's visit outcome categories.
VisitAlertDays__c Number 0 Alert threshold in days for overdue visits. When set to a value greater than 0, accounts that have not been visited within this many days display a warning indicator on their marker. Set to 0 to disable visit alerts.
Example: Customizing the visit report form:
To add a custom "Competitor Mentioned" field, create the field on VisitReport__c, then update VisitReportCustomFields__c:
result, routeforce__Satisfaction__c, nextAction, routeforce__CompetitorMentioned__c, notes, routeforce__NextVisitDate__c

2.6 System Settings (3 fields)

Application-level system configuration.

Field API Name Type Default Description
SupportEmail__c Email contact@routeforce.app Support email address displayed in error messages, licence screens, and the Configuration tab. Override this with your internal support email if you provide first-line support.
LogRetentionDays__c Number 30 Number of days before application log records are purged by the LogPurgeSchedulable job. Logs older than this value are permanently deleted. Minimum recommended: 7 days.
EventOppLinkTarget__c Text opportunity Determines how Events created from Opportunity markers are linked. Set to opportunity to link the Event's WhatId to the Opportunity record, or account to link it to the parent Account instead.

3. RouteForceAction__mdt: Custom Actions Reference

Each record in RouteForceAction__mdt defines a custom action button that appears in marker popups, route step cards, or both. Actions launch Screen Flows, allowing administrators to build custom workflows triggered directly from the map interface.

3.1 Field Reference

Field API Name Type Description
Label__c Text Button label displayed to users. Keep concise (1–3 words). Example: Log Call, Create Quote, Send Email.
Icon__c Text SLDS icon name (without the utility: prefix). Example: call, email, edit, new. See SLDS Icons for the full list.
FlowApiName__c Text API name of the Screen Flow to launch when the button is clicked. The Flow receives the record Id as an input variable (recordId).
ObjectType__c Picklist Which object type markers display this action. Values: All (default, shows on all object types), Account, Lead, Opportunity.
DisplayContext__c Picklist Where the action button appears. Values: All (default, both locations), Popup (marker popup only), EventPanel (event panel only).
FilterCondition__c Text Optional condition to conditionally show/hide the action. Uses a simple expression syntax: FieldApiName == 'Value'. Example: Type == 'Prospect' shows the action only on Prospect accounts. Leave empty to show on all records.
ButtonColor__c Text CSS color value for the button. Accepts hex codes (#4CAF50), named colors (green), or CSS variables. Default: #10B981.
IsActive__c Checkbox Enable or disable the action without deleting the record. Inactive actions are not rendered in the UI.
SortOrder__c Number Display order within the popup or route step card. Lower numbers appear first. Actions with the same sort order are displayed alphabetically by label.

3.2 Example: Create a "Log Call" Action

Prerequisites: A Screen Flow named RF_Log_Call that accepts a recordId input variable.

Field Value
Label__c Log Call
Icon__c call
FlowApiName__c RF_Log_Call
ObjectType__c Account
DisplayContext__c All
FilterCondition__c (empty, shows on all accounts)
ButtonColor__c #4CAF50
IsActive__c true
SortOrder__c 10

3.3 Example: Conditional Action for Prospects Only

Field Value
Label__c Qualify Lead
Icon__c new
FlowApiName__c RF_Qualify_Lead
ObjectType__c Lead
DisplayContext__c Popup
FilterCondition__c Status == 'Open - Not Contacted'
ButtonColor__c #FF9800
IsActive__c true
SortOrder__c 20

3.4 Flow Input Variables

RouteForce passes the following input variables to the launched Screen Flow:

Variable Name Type Description
recordId Text The Salesforce record Id of the marker (Account Id, Lead Id, or Opportunity Id)
Tip: Design your Screen Flows to accept a recordId input variable of type Text. Use a Get Records element to retrieve the full record at the start of the Flow.

4. FlexiPage Configuration (App Builder)

While RouteForceConfig__mdt controls product behavior (feature toggles, query filters, map defaults), the FlexiPage properties control the visual presentation: which filters appear, how the legend is colored, what fields show in marker popups. Both should be configured during initial setup.

The default RouteForce page ships with generic settings and serves as a template. We recommend cloning it to match your organization's data model (see 4.3 Option B). The RouteForce LWC component (routeforce) is fully reusable; you can also place it on Record Pages (Account, Lead, Opportunity), custom App Pages, or your own Lightning Apps.

Record Page integration: When placed on an Account, Lead, or Opportunity record page, the map automatically centers on the current record and loads nearby items. This gives field reps a contextual geographic view directly from any record, with no manual search needed. The same component properties (filters, legend, popup fields) are available for configuration.

4.1 Filter Fields Configuration

The RouteForce component accepts a single comma-separated string of filter field paths: either via the filterFields App Builder property or via FilterFields__c in RouteForceConfig__mdt. There are no numbered slots. Each field path uses one of three syntaxes:

Syntax Example Description
Simple Industry Account field (no prefix needed, Account is the default object)
Object-prefixed Opportunity.StageName Field on a specific object (Account, Opportunity, Lead)
Cross-object Opportunity.Account.Industry Filter one object's markers by a related object's field value

Supported field types: Picklist, Multi-Picklist, Boolean (Checkbox). Text and Number fields are not supported as filters but can be displayed in marker popups.

4.2 Default Filter Configuration

Out of the box, FilterFields__c is set to:

Account.Industry,Account.Type

This means only 2 filters appear by default. To add more, edit the value in RouteForceConfig__mdt or in App Builder.

Example with more filters:

Account.Industry,Account.Type,Account.Rating,Opportunity.StageName,Lead.Status,Opportunity.Account.Industry

4.3 Adding or Changing Filter Fields

Option A: via RouteForceConfig__mdt:

  1. Go to Setup > Custom Metadata Types > RouteForceConfig > Default
  2. Edit the FilterFields__c field
  3. Add comma-separated field paths (e.g. Account.Industry,Account.Type,Lead.Status)
  4. Save

Option B: via Lightning App Builder (overrides CMDT):

  1. Open Setup > Lightning App Builder
  2. Find the RouteForce page and open it
  3. Click Clone (or Save As) to create your own copy
  4. Click the RouteForce component, then in the properties panel set the filterFields property to your comma-separated field paths
  5. Configure any other properties as needed (legend, marker fields, etc.)
  6. Click Save, then Activation. Create a custom tab for this page and add it to the RouteForce app via Setup > App Manager > RouteForce > Edit > Navigation Items.
Note: The default RouteForce page is part of the managed package and cannot be edited directly. Your cloned page replaces it when added to the app navigation.
Important: Only Picklist, Multi-Picklist, and Boolean (Checkbox) fields are supported. Text, Number, and Date fields will not render as filters.

4.4 Legend Configuration

The legend assigns distinct colors to marker values. Configure these comma-separated lists in the App Builder properties:

Property Example Description
typeField Type Account field used for marker color assignment
typeValues Customer - Direct,Customer - Channel,Prospect,Other Account legend entries (blue tones)
oppTypeField StageName Opportunity field used for marker color assignment
oppTypeValues Prospecting,Qualification,Needs Analysis,Closed Won,Closed Lost Opportunity legend entries (warm tones)
leadTypeField Status Lead field used for marker color assignment
leadTypeValues Open - Not Contacted,Working - Contacted,Closed - Converted,Closed - Not Converted Lead legend entries (cool tones)

Order matters: the first value gets the first color in its palette, the second value gets the second color, and so on. Colors cycle if there are more values than colors in the palette.

4.5 Color Assignment by Position

Position Account Color Opportunity Color Lead Color
1st Dark Blue Dark Orange Dark Teal
2nd Blue Orange Teal
3rd Light Blue Light Orange Light Teal
4th Lighter Blue Yellow Green
5th+ Cycles through palette Cycles Cycles

4.6 Marker Popup Fields

Configure which fields appear in marker popups via the markerFields property. Any field type is supported (not limited to picklists).

Phone,Industry,Website,Opportunity.StageName,Opportunity.Amount,Opportunity.CloseDate,Lead.Company,Lead.LeadSource,Lead.Status,Lead.Email
Syntax Example
Account field Phone, Industry, Website
Opportunity field Opportunity.Amount, Opportunity.NextStep
Lead field Lead.Company, Lead.Email

4.7 Other FlexiPage Properties

Property Type Default Description
addressFieldPrefix String Shipping Overrides the CMDT AddressFieldPrefix__c for this specific FlexiPage instance
forceMultiPicklist String Industry,Type Comma-separated field API names to render as multi-select checkbox lists instead of single-select dropdowns

5. Shared Filters (SavedFilter__c)

Users can save their current filter configuration for instant reload. Saved filters are stored in the SavedFilter__c custom object.

5.1 How It Works

  1. User applies filters on the map (Industry = "Technology", Type = "Customer - Direct", etc.)
  2. User clicks Save Filter and enters a name
  3. The filter state is serialized to JSON and stored in the Configuration__c field
  4. To reload, the user selects a saved filter from the dropdown; all filter values are restored instantly

5.2 Object Fields

Field Type Description
Name Text User-provided filter name (e.g., "My Hot Prospects")
FilterType__c Text(255) Filter category
User__c Lookup(User) User who created the filter
Configuration__c Long Text Area JSON-serialized filter state (field names, selected values, display mode)
IsPublic__c Checkbox When checked, the filter is visible to all users in the organization (team-wide sharing). Private filters are only visible to the creator.

5.3 JSON Configuration Format

The Configuration__c field stores a JSON object with the following structure:

{
  "displayMode": "both",
  "filters": {
    "Account.Industry": ["Technology", "Finance"],
    "Account.Type": ["Customer - Direct"],
    "Opportunity.StageName": ["Prospecting", "Qualification"]
  },
  "notVisitedSince": 30,
  "recordType": null
}

6. Address Enrichment (France Only)

RouteForce integrates with the BAN API (Base Adresse Nationale) to enrich French addresses with latitude/longitude coordinates.

6.1 Overview

6.2 How to Use

  1. Navigate to the Configuration tab (requires RouteForce Admin permission set)
  2. Open the Address Enrichment panel
  3. Select the target object: Account or Lead
  4. The batch processes 95 records per batch (hard limit due to Salesforce callout governor limits)
  5. Click Start Enrichment
  6. The batch processes records without coordinates and queries the BAN API for each address
  7. Results are written back to the Latitude/Longitude fields on each record

6.3 Configuration Options

Option Default Description
Target Object Account Which object to enrich (Account or Lead)
Batch Size 95 Records processed per batch execution. This is a hard limit due to Salesforce callout governor limits (100 callouts per transaction minus overhead).
Address Prefix Shipping Which address compound field to use as input (Shipping or Billing)
Overwrite Existing false When checked, re-enriches records that already have coordinates
Rate limits: The BAN API has a rate limit of approximately 50 requests per second. The enrichment batch automatically throttles to stay within this limit. For large datasets (10,000+ records), run the enrichment in multiple batches.

7. Usage Tracking

When EnableUsageTracking__c is set to true, RouteForce automatically tracks feature usage to help managers understand adoption and identify training needs.

7.1 Tracked Events

Event Name Triggered When
ROUTE_CREATED Route Created
ROUTE_OPTIMIZED Route Optimized
CHECK_IN Check-In
EVENT_CREATED Event Created
FILTER_APPLIED Filter Applied
ADDRESS_ENRICHED Address Enriched
CSV_EXPORTED CSV Exported
PDF_EXPORTED PDF Exported

7.2 Daily Aggregation

Raw usage events are aggregated daily by the UsageAggregationBatch (see Section 8). The aggregation produces daily summaries per user per event type, reducing storage requirements while preserving analytics value.

7.3 Usage Dashboard

The Usage Dashboard LWC component is available to managers and administrators. It displays:

Access the dashboard from the Configuration tab (requires RouteForce Admin permission set).

7.4 Disabling Usage Tracking

Set EnableUsageTracking__c to false on the RouteForceConfig__mdt.Default record. This immediately stops all event tracking. Existing aggregated data is retained until manually deleted or purged by the LogPurgeSchedulable job.


8. Scheduled Jobs

RouteForce includes three schedulable Apex classes that must be scheduled after installation.

8.1 UsageAggregationSchedulable

Property Value
Purpose Aggregates raw usage tracking events into daily summaries per user per event type
Recommended Schedule Daily, after business hours (e.g., 1:00 AM)
Prerequisite EnableUsageTracking__c = true

Schedule via Anonymous Apex:

System.schedule(
  'RouteForce Usage Aggregation',
  '0 0 1 * * ?',
  new routeforce.UsageAggregationSchedulable()
);

8.2 LogPurgeSchedulable

Property Value
Purpose Deletes application log records older than the value specified in LogRetentionDays__c
Recommended Schedule Daily, after business hours (e.g., 2:00 AM)
Retention Period Configured by LogRetentionDays__c (default: 30 days)

Schedule via Anonymous Apex:

System.schedule(
  'RouteForce Log Purge',
  '0 0 2 * * ?',
  new routeforce.LogPurgeSchedulable()
);

8.3 UsagePurgeBatch

Property Value
Purpose Purges old raw usage records after aggregation
Recommended Schedule Weekly, Sunday at 3:00 AM
Prerequisite EnableUsageTracking__c = true

Schedule via Anonymous Apex:

System.schedule(
  'RouteForce Usage Purge',
  '0 0 3 ? * SUN',
  new routeforce.UsagePurgeBatch()
);
Important: Scheduled jobs are automatically removed when deploying a new version of the schedulable class. After upgrading RouteForce, re-schedule all three jobs using the Anonymous Apex snippets above.

9. Permission Sets

9.1 RouteForce Admin

Target: Salesforce Administrators responsible for configuring RouteForce.

Category Access
Apex Classes All 32 Apex classes including SecureConfigService
Objects Full CRUD + ViewAll + ModifyAll on History__c, SavedFilter__c, VisitReport__c
CMDT Read/Write RouteForceConfig__mdt, RouteForceAction__mdt
Tabs RouteForce, History, Saved Filters, Visit Reports, Configuration, Licence
App RouteForce visible

9.2 RouteForce Manager

Target: Sales managers and team leads.

Category Access
Apex Classes 17 Apex classes (operational + reporting services)
Flows RF_CreateEvent only
Objects viewAllRecords on History__c, VisitReport__c, and RouteForceUsageSummary__c. Standard CRUD on SavedFilter__c.
CMDT Read-only RouteForceConfig__mdt, RouteForceAction__mdt
Tabs RouteForce, History, Saved Filters, Visit Reports
App RouteForce visible

Key difference from User: Managers have viewAllRecords on History__c, VisitReport__c, and RouteForceUsageSummary__c, allowing them to see team activity and reports. They do not have access to admin tabs (Configuration, Licence).

9.3 RouteForce User

Target: Sales Reps and field users.

Category Access
Apex Classes 14 Apex classes (excludes admin-only services like SecureConfigService)
Objects CRUD on History__c, SavedFilter__c; Create/Read on VisitReport__c
CMDT Read-only RouteForceConfig__mdt, RouteForceAction__mdt
Tabs RouteForce, History, Saved Filters, Visit Reports
App RouteForce visible

Key difference: Users do not see the Configuration or Licence tabs, and cannot modify CMDT settings or manage API keys.

9.4 Assigning Permission Sets

Via Setup UI:

  1. Setup > Permission Sets
  2. Click RouteForce Admin or RouteForce User
  3. Click Manage Assignments > Add Assignments
  4. Select users > Assign

Via SF CLI:

sf org assign permset --name RouteForce_Admin --target-org <org-alias>
sf org assign permset --name RouteForce_Manager --target-org <org-alias>
sf org assign permset --name RouteForce_User --target-org <org-alias>

10. Data Requirements

10.1 Account Geocoding

Accounts must have latitude/longitude fields populated to appear on the map:

Address Prefix Latitude Field Longitude Field
Shipping ShippingLatitude ShippingLongitude
Billing BillingLatitude BillingLongitude

Geocoding options:

Tip: Records without coordinates are silently excluded from the map, no error is thrown.

10.2 Lead Geocoding

Leads use their standard Latitude and Longitude fields (part of the Lead Address compound field).

10.3 Opportunity Geocoding

Opportunities do not have their own address. RouteForce uses the parent Account's address (via the AccountId relationship). The parent Account must be geocoded.

10.4 Events

Events appear on the map when they have a related record (WhatId or WhoId) with geocoded coordinates. Events without a geocoded related record appear in the calendar panel but not on the map.


11. Remote Site Settings

RouteForce requires callout access to external services:

Name URL Purpose
RouteForce_ORS https://ors.routeforce.app Route optimization, directions, licence validation
RouteForce_HeiGIT https://api.openrouteservice.org Fallback routing (when VPS is unavailable)
RouteForce_BAN https://api-adresse.data.gouv.fr French address enrichment (BAN API)

These are included in the managed package and deployed automatically on install. If missing, add them manually via Setup > Remote Site Settings > New.


12. Licence System

12.1 How It Works

  1. Validation callout to https://ors.routeforce.app/api/licence/{key}
  2. Server returns: { valid: true, expires: "2026-12-31", client: "Acme Corp" }
  3. Result is cached in LicenceCache__c for 24 hours
  4. If the server is unreachable, the app continues for 7 days (fail-open grace period)
  5. After 7 days without successful contact, the app blocks with a licence error overlay

12.2 Licence States

State Behavior
Active Normal operation. Green indicator in Configuration tab.
Inactive Licence expired or invalid. Red indicator, app blocked.
Not Configured No licence key entered. Setup prompt displayed.
Server Unreachable Fail-open: app works for up to 7 days. Warning indicator.

12.3 HTTP Response Handling

Code Meaning Action
200 Success Update cache, allow/block based on valid field
401 Invalid key Block immediately (no fail-open)
403 Kill switch Block immediately (nginx-level block)
5xx Server error Fail-open for 7 days
Timeout Unreachable Fail-open for 7 days

13. API Key Management

API keys are stored in InternalConfig__c (Hierarchy Custom Setting), protected by the routeforce namespace; subscribers cannot read them directly.

Key Purpose Stored In
Licence Key RouteForce licence validation InternalConfig__c.LicenceKey__c
ORS API Key VPS routing server (ors.routeforce.app) InternalConfig__c.OrsApiKey__c
Fallback API Key HeiGIT public API (fallback routing) InternalConfig__c.FallbackApiKey__c
BAN Endpoint BAN geocoding API endpoint InternalConfig__c.BanEndpoint__c
Licence Endpoint Licence validation API endpoint InternalConfig__c.LicenceEndpoint__c
Note: BanEndpoint__c and LicenceEndpoint__c are system-managed fields and are not typically edited by admins.

Keys are set during the RF_Onboarding wizard (Step 1) and stored via SecureConfigService.storeKeys().


14. Onboarding Wizard (RF_Onboarding)

The onboarding wizard is a Screen Flow accessible from the Configuration tab (RouteForce Admin only). It walks through all essential settings in 6 steps.

Step 1: API Keys

Field Required Description
Licence Key Yes Your RouteForce licence key (provided by RouteForce support)
ORS API Key Yes API key for the VPS routing server
Fallback API Key No HeiGIT fallback key (used when VPS is unavailable)

Step 2: Map Settings

Field Default Options
Address Prefix Shipping Shipping, Billing
Default Map Layer Standard Standard, Terrain, Satellite
Default Zoom 10 1–18
Display Mode both accounts, leads, opportunities, both

Step 3: Feature Toggles

Feature Default Impact
Enable Events true Calendar panel, event markers, check-in
Enable Leads true Lead markers, Lead filters, Lead in route
Enable Opportunities true Opportunity markers, Opp filters, Opp in route
Enable Visit Reports true Check-in/check-out visit report creation
Enable CSV Export true CSV download button in route panel
Enable History Naming true Name prompt when saving routes
Enable Heatmap true Heatmap overlay toggle in toolbar
Enable Bulk Select true Lasso selection tool
Enable Usage Tracking true Feature usage event tracking
Enable Quick Text true Quick text snippets in check-in modal

Step 4: Query Configuration

Field Default Description
Contact Fields Id,Name,Email,Phone,MobilePhone Fields shown in contact lookup popups
Lead Query Fields Rating,LeadSource Additional Lead fields for popups
Lead Query Filter IsConverted = false SOQL WHERE for Leads
Opp Query Fields StageName,Amount,CloseDate Opportunity fields for popups
Opp Query Filter IsClosed = false SOQL WHERE for Opportunities
Not Visited Since 30 Default threshold in days

Step 5: Visit Report & System Settings

Field Default Description
Check-In Note Prefix Check-in DEPRECATED: No longer used
On-Site Radius 500 m GPS radius for on-site detection
Visit Result Options Positive,Neutral,Negative,No Answer Picklist values for visit outcome
Visit Alert Days 0 Overdue visit alert threshold (0 = disabled)
Support Email contact@routeforce.app Contact email in error screens
Log Retention Days 30 Days before log purge
Event-Opp Link Target opportunity How Events from Opp markers are linked

Step 6: Deploy

After running the onboarding flow, configure all remaining settings directly in RouteForceConfig__mdt.Default via Setup > Custom Metadata Types > RouteForceConfig > Default.


15. Configuration Examples

15.1 Minimal Setup (Accounts only)

For organizations that only need Account mapping without Leads or Opportunities:

Setting Value
EnableLeads__c false
EnableOpportunities__c false
DefaultDisplayMode__c accounts
EnableRoleFilter__c false
EnableTeamFilter__c false

15.2 Full Pipeline View (Accounts + Opportunities + Leads)

Setting Value
EnableLeads__c true
EnableOpportunities__c true
DefaultDisplayMode__c both
OpportunityQueryFields__c StageName,Amount,CloseDate,Probability
OpportunityQueryFilter__c IsClosed = false AND Amount > 5000
LeadQueryFilter__c IsConverted = false AND Rating = 'Hot'

15.3 Manager View (Role + Team Filtering)

Setting Value
EnableRoleFilter__c true
EnableTeamFilter__c true
EnableUsageTracking__c true

This configuration enables managers to view accounts across their team and monitor usage adoption via the Usage Dashboard.

15.4 Visit-Heavy Configuration (Field Service)

Setting Value
EnableVisitReports__c true
EnableEvents__c true
QuickTextEnabled__c true
CheckInOnSiteRadiusMeters__c 200
VisitAlertDays__c 14
NotVisitedSinceDays__c 14
VisitResultOptions__c Sale Made,Demo Scheduled,Callback Needed,No Answer,Declined

15.5 Custom Action: Create a Follow-Up Task

Create a new RouteForceAction__mdt record:

Field Value
Label__c Follow-Up
Icon__c task
FlowApiName__c RF_Create_Follow_Up
ObjectType__c Account
DisplayContext__c All
FilterCondition__c Type == 'Customer - Direct'
ButtonColor__c #2196F3
IsActive__c true
SortOrder__c 5

16. Troubleshooting

Issue Diagnostic Solution
Configuration changes not taking effect CMDT deployment is async Wait 10–30 seconds, then hard-refresh the page
"Licence not configured" No key in InternalConfig__c Run RF_Onboarding, enter licence key in Step 1
Leads/Opportunities not showing on map Feature toggle is off Enable EnableLeads__c and/or EnableOpportunities__c
Filter field not appearing in panel Wrong syntax or unsupported field type Use Object.FieldName format; field must be Picklist, Multi-Picklist, or Boolean
Cross-object filter shows no values No matching records Verify records exist with both the filter value and geocoded coordinates
Legend colors incorrect Order mismatch in typeValues Reorder typeValues; position determines color assignment
"Not visited since" filter missing No visit date field configured Set NotVisitedSinceDays__c to a value > 0
Contact lookup shows nothing No related contacts or feature disabled Ensure Contacts exist on the Account and ContactLookupEnabled__c is true
Events not appearing on map Related record not geocoded The Event's WhatId/WhoId record must have latitude/longitude populated
Quick Text not working Feature toggle off or no Quick Text records Enable QuickTextEnabled__c and create Quick Text records in Setup
Heatmap toggle missing Feature disabled Set EnableHeatmap__c to true
Lasso selection not available Feature disabled Set EnableBulkSelect__c to true
Custom action not showing in popup Action inactive or wrong ObjectType Verify IsActive__c is true, ObjectType__c matches the marker type, and DisplayContext__c includes the expected location
Custom action shows on wrong records FilterCondition missing or incorrect Check FilterCondition__c syntax: FieldApiName == 'Value'
Usage Dashboard shows no data Tracking disabled or batch not scheduled Enable EnableUsageTracking__c and schedule UsageAggregationSchedulable
Logs accumulating (storage issues) LogPurge job not scheduled Schedule LogPurgeSchedulable and verify LogRetentionDays__c value
Address enrichment not working Non-French addresses or Remote Site missing BAN API only works for French addresses; verify RouteForce_BAN Remote Site Setting is active
Visit report form fields missing Fields not in VisitReportCustomFields__c Add the field API names to the VisitReportCustomFields__c comma-separated list
Role filter shows no accounts Role hierarchy not configured Ensure role hierarchy is set up in the org and users have assigned roles

17. Quick Reference: All 36 Default Values

Map Settings (7)

Field Default
AddressFieldPrefix__c Shipping
ClusterRadius__c 60
DefaultDisplayMode__c both
DefaultMapLayer__c Standard
DefaultZoom__c 10
EnableHeatmap__c true
EnableBulkSelect__c true

Feature Toggles (11)

Field Default
EnableEvents__c true
EnableLeads__c true
EnableOpportunities__c true
EnableVisitReports__c true
EnableCSVExport__c true
EnableHistoryNaming__c true
EnableUsageTracking__c true
EnableRoleFilter__c false
EnableTeamFilter__c false
ContactLookupEnabled__c true
QuickTextEnabled__c true

Route Settings (2)

Field Default
MaxRouteSteps__c 50
RouteStepFields__c null

Filter Settings (8)

Field Default
FilterFields__c Account.Industry,Account.Type
NotVisitedSinceDays__c 30
LeadQueryFields__c Rating,LeadSource
LeadQueryFilter__c IsConverted = false
OpportunityQueryFields__c StageName,Amount,CloseDate
OpportunityQueryFilter__c IsClosed = false
ContactQueryFields__c Id,Name,Email,Phone,MobilePhone
ContactQueryFilter__c null

Visit Report Settings (5)

Field Default
CheckInNotePrefix__c Check-in (deprecated)
CheckInOnSiteRadiusMeters__c 500
VisitReportCustomFields__c No metadata default; recommended value set by onboarding wizard: result, routeforce__Satisfaction__c, nextAction, routeforce__OrderAmount__c, notes, routeforce__NextVisitDate__c
VisitResultOptions__c Positive,Neutral,Negative,No Answer
VisitAlertDays__c 0

System Settings (3)

Field Default
SupportEmail__c contact@routeforce.app
LogRetentionDays__c 30
EventOppLinkTarget__c opportunity

Total: 36 fields (7 Map + 11 Feature Toggles + 2 Route + 8 Filter + 5 Visit Report + 3 System)