Seeing a whole lot's bookings at a glance for a studio through a custom map component
Twenty-plus bookable spaces on one property, each sold as a product line on an opportunity. The team needed to answer "what is booked next Tuesday, and by whom" from a picture of the lot rather than a table, and to look weeks ahead at what would be free. We built it without adding a single object to the data model.
By the Shinden Consulting team
The problem
The client operates a single production campus: stages, workshops, sheds and office suites, more than twenty separately bookable spaces in all. Every one of them is a product in Salesforce, and every booking is that product added to an opportunity with a start and end date.
The data was already right. The problem was the question people asked of it. For any given day, the operations team needed to know which spaces are booked, by which production, and is anything double-booked or still just a hold in the pipeline. Answering it meant opening a list view, filtering by date, and cross-referencing rows by hand, then doing it again for the next day, and again for the week after.
Looking forward was worse. "What could we offer a new production in six weeks" is a question about gaps, and a list view is very bad at showing you gaps.
Why a map and not a Gantt
Salesforce list views and the various Gantt-style timeline options can show a booking per row and a bar per date. What none of them can show is that stage one sits next to stages two and three, that the north building splits into three workshop sections that book separately, or that an office suite is a two-minute walk from the stage a production has just taken. The people running the lot think about it spatially. They walk it. The tool needed to match the mental model they already had.
Pick a date, see the lot. Every space lights up by its booking status for that day. Hover for who has it, click for the full list of bookings on it. Step forward a day, a week, a quarter.
What we built
A Lightning Web Component that renders an oblique aerial photo of the actual property and overlays it with one clickable shape per bookable space. An earlier prototype used a stylised illustration of the lot. The client's reaction was that it did not look real enough, and they were right: an illustration is one more thing to learn. A photo of the place you walk through every morning is not.
Each space is an SVG polygon traced onto the photo in pixel coordinates. Hovering or clicking a space clips a copy of the photo to that polygon's outline and lifts it a few pixels with a drop shadow, so the building visually pops off the lot rather than just changing colour. It is a small effect and it is the one everyone comments on.
Every polygon carries a hover callout with the space's name and status, and a click opens a details panel listing production, company and stage for every booking on that space that day. That last word matters: a shared space can legitimately carry two bookings, and the panel lists all of them instead of assuming one booking per space.
One query, zero new objects
This is the decision worth explaining carefully, because the obvious design is the wrong one. The obvious design is a new custom object for "map areas", a junction object linking areas to products, a lookup on the product, and a set of records someone has to maintain. We built none of that.
The component holds a static array of map areas. Each has a short code, its polygon coordinates, and a list of the exact product names that belong to that visual area. On render, every area filters the single Apex result set client-side by product name. The "relationship" between a shape on the map and a product in Salesforce is a string match evaluated in the browser, not a schema-level relationship at all.
Adding a new trackable area to the map is: add a polygon, give it the right product names. No data model change, no deployment of new objects, nothing new to grant permissions on.
Reading the colours
Status is computed per area, per day, from the bookings that matched it:
These four states and their colours were carried over unchanged from the earlier illustrated version, which meant the business had already validated the semantics before we changed the visual style. Change one thing at a time.
Drawing the lot without engineers
Tracing twenty-seven irregular polygons onto a photo by hand-editing coordinates is miserable, and the shapes were never going to be right the first time. So alongside the component we built a small lot outline editor: a standalone drag-and-drop page, outside Salesforce, where you can drag polygon corners, add and remove vertices, and move each label independently of its shape, then export the whole layout as JSON.
That JSON is the single source of truth. A small generator script turns it into both the component's configuration and a live mock-up page, so the real component and the preview can never drift apart. The client's team iterated on shape accuracy over many rounds, including splitting single buildings into separately tracked sections once they clarified how those spaces were actually sold, without engineering touching Apex or the schema once.
The trade-off we accepted
The design only works because product names are stable and unique per space. If someone renamed a product, its area would silently stop matching; the platform would not stop them.
For a small, internally managed product catalogue that changes a few times a year, we judged that an acceptable price for skipping two custom objects, a junction table and the admin burden that comes with them. We documented the rule in the product's help text and in the component's own configuration, and it has held.
If the catalogue were customer-editable, or ran to hundreds of products, we would make the opposite call and put the mapping on the product record. Knowing which side of that line a client sits on is most of the job.
Why this design
| Goal | How it is achieved |
|---|---|
| A spatial, at-a-glance view of a physical lot | A real aerial photo with a clip-path hover, not a diagram |
| Booking data per space, per day | One Apex query, filtered and grouped in the browser |
| No new schema for "map area to product" | Name matching in a static config, not a junction object |
| Reshape areas without a deploy cycle | A JSON-driven editor and generator keep the editor, mock-up and component in sync |
| Handle shared and double-booked spaces | The panel and hover text list every booking on a space rather than assuming one |
The net result is a fully custom visualisation layer sitting on top of existing opportunity and product data, where "does this area know about this product" is a configuration concern rather than a data-model one. The team now plans the quarter from a picture of the place they work.

