Have you ever wished your Salesforce data could be more engaging and insightful?
.png)
Standard Salesforce reports and lists lack visual impact. They don't drive action. While custom Lightning Web Components (LWCs) or CRM Analytics can solve this, they introduce complexity that most teams can't sustain.
There's a better way. Combine Screen Flow Builder with Avonni's component library to build interactive, dynamic visualizations without the overhead of custom development.
Picture a live map within your Screen Flow. It responds instantly to user interaction—filtering data, updating metrics, loading locations dynamically as users pan and zoom. The map stays synchronized with user actions. Data loads efficiently based on what the user is actually viewing.
.png)
Metrics: real-time and responsive
Avonni's Metrics components display location data—counts and breakdowns by type—at the top. These aren't static numbers. They update in real time as users interact with the map, delivering the responsiveness users expect from modern applications.
.gif)
The map: reactive and performant
The map updates markers and metrics dynamically with every pan or zoom. Users get a smooth experience without lag.
You might assume Screen Flows are for multi-step data collection workflows. They offer much more than that.
We chose Screen Flows for this solution because they deliver:
You get powerful functionality with sustainable maintenance overhead.
The flow structure intentionally stays minimal. One screen acts as the canvas for the map and metrics. This avoids unnecessary complexity and keeps the focus on the visualization itself.
.png)
The magic is in dynamic formulas. They act as real-time filters, constantly evaluating map attributes like center point and visible bounds. The Avonni Map only fetches locations within the user's current view. The map responds instantly to pans and zooms while handling large datasets efficiently.
.png)
.png)
Breaking down the formula
Here's the core formula:
DISTANCE(Location__c, GEOLOCATION("&{!map.centerLatitude}&","&{!map.centerLongitude}&"), 'km') <"&TEXT({!map.visibleWidthKm})
This formula:
This simple formula ensures only visible locations load, keeping performance tight.
Requirements:
The metrics component uses the same core distance logic, plus an additional filter for specific categories.

The metrics formula adds one filter condition: AND Type__c = 'Bakery'. The metric counts locations that are both within the visible map area and classified as the target type.
Interactive maps solve different problems depending on your industry and workflow.
Field service teams need to see where jobs are, prioritize by location, and route efficiently. A map-based flow gives your dispatcher immediate visibility into all open service calls, pinned to their locations. Add a metric showing jobs by priority or technician, and dispatchers instantly identify bottlenecks.
Sales managers need to understand territory coverage and account distribution. A map flow shows all accounts or opportunities within a sales region, color-coded by territory or assigned rep. Add metrics showing pipeline value by territory, and managers see immediately which areas are under-resourced.
Embed an interactive map flow into your Experience Cloud portal so customers find locations themselves. The map shows store hours, current inventory, or service availability. Customers zoom to their area and see which locations are nearest. No help desk calls needed.
Maps only work if your records have valid geolocation data. Before building your first map flow, prepare your data.
Run a report on your object and filter for records where your geolocation field is empty. For records with addresses but no coordinates, use Salesforce's geocoding to populate the geolocation field in bulk. For records where location is genuinely unknown, exclude them with a WHERE clause in your map formula.
Your map formula handles this gracefully. The DISTANCE function returns empty/null for records without valid geolocation data. These records simply don't display as markers. Consider adding a note in your flow: "Showing X of Y locations. Z records have no location data."
The Avonni Map supports several marker types. For a detailed walkthrough of the Pin marker, see configuring the new Map Pin marker type.
Plain markers look generic. Differentiate location types with colors, icons, and custom styling.
Avonni Map supports custom marker colors based on record field values. If your records have a Type__c field (Bakery, Coffee Shop, Restaurant), assign a color to each type. Configure this using the "Marker Color Field" setting.
Beyond colors, use icons that match Salesforce's icon library. A bakery shows a standard:store icon. A service location shows standard:location. Each icon reinforces what the marker represents.
Your map formula's distance-based filtering handles scale well.
Your formula fetches only the records visible in the current map view. When your user is looking at a neighborhood, they're loading maybe 20-50 markers. When they zoom out, they might load 500. The map never fetches all 10,000 records at once. This approach scales naturally.
Maps get slow for two reasons: loading too many records at once, or complex record lookups in your formula. If your formula is missing the distance check, you might be loading thousands of markers. Complex lookups (like Account.Name instead of Name) degrade performance. Keep your map display field simple. Test with your actual dataset and watch for lag.
Maps work especially well with reactive components — when a user interacts with one component, the map updates automatically.
Add an Avonni Data Table below your map showing the same records. Users click a location on the map, that record highlights in the table. Both views always in sync.
Place Avonni Metrics at the top showing aggregates. Add filter buttons that update your distance formula and metrics in real time. One interaction, multiple components reacting.
Organize your flow screen top to bottom: Metrics showing totals, filter buttons/toggles, map (primary visualization), data table (secondary view). This matches how users naturally scan content.
This is one example of building dynamic, interactive maps within Flow Builder.
Key takeaways:
Start experimenting with Flow Builder and push the boundaries of what your Salesforce implementation can deliver.
Your users will notice the difference.
Save time, reduce costs, and see your Salesforce projects come to life faster.