דלגו לתוכן

Steve Trucking's People Outside, What I Would Architect

תוכן זה אינו זמין עדיין בשפה שלך.

Checkpoint 3, part one of Securing Salesforce: Sharing and Visibility, module 5 of 6 in the chapter Reviewing a Security and Sharing Model. It puts chapters 14 to 17 on the model from Checkpoints 1 and 2.

The question this checkpoint answers: Can you open a sharing model to the people outside, partner users, mobile crews and anonymous Recipients, and still say for every record why each person can see it?

Try the challenge first. This is my walkthrough of Checkpoint 3’s challenge, part A. If you haven’t drawn your own design yet, do that before you read on.

This is “What I Would Architect”: a possible viable solution, not the answer. Checkpoint 1 built Steve Trucking’s internal model, and Checkpoint 2 finished it and proved it. Every Work Order is private, carries its Retail Partner and its DC account, and is owned by the partner’s integration user. Now three kinds of people come in from outside, and each one gets a different toolbox (Who’s Outside).

How each of them signs in is the Identity and Access course’s Checkpoint 3. Here, it’s what they see once they’re in.

About 300 people at three Retail Partners: DC managers and store staff. The requirement is the hardest line in the brief: a DC manager sees their own DC’s deliveries, exceptions, photos and claims, and never another DC’s or another partner’s (S2, R3).

The seat. Start with the minimum-seat question (The Seats). They use the portal for claims and reports today, so they need reports. That’s Customer Community Plus, halfway down the stadium. Partner Community adds leads, opportunities and campaigns, and they need none of those. Customer Community, the cheap seats, has no reports and no roles.

The external defaults. Private for Account, Work Order, Service Appointment and Case (External Org-Wide Defaults). Every partner user starts from nothing, and every grant below is on purpose.

The roles. Two per account, set before the first user is enabled, because a higher number later “isn’t applied to existing customer accounts” (External Roles). Each DC is a child account, so each DC gets a Manager role for its DC managers and a User role for its store staff, under the regional manager who owns the DC account (Checkpoint 1). A claim that store staff log rolls up to their DC manager, and to Steve Trucking’s regional manager, and never across to another DC’s branch.

The deliveries: a rule per DC, or a sharing set?

Option A: a criteria-based rule per DC, sharing that DC’s Work Orders with its Manager role. Nine today, and one more with every DC the business wins.

Option B: a sharing set, mapping the DC manager’s Contact.Account to the Work Order’s Account, Read Only, and the same on Case for the claims (Sharing Sets).

In my professional opinion, B. Look at what it reuses. Every Work Order already carries its DC account, the child account the Data Architect course added to spread the ownership skew. Now the same field carries the security. A new DC is a new account, not a new rule. And sharing sets aren’t only for the cheap seats: Salesforce lists Customer Community Plus and Partner Community among the licenses that support them (Metadata API Developer Guide, SharingSet (opens in a new tab), API version 68.0, checked 2026-11-26).

Three catches, and each is a design rule:

  • One sharing set per profile. “You can have one sharing set per profile only” (chapter 15 module 2). So the DC managers get their own profile, and Work Order and Case both go into that one set.
  • It doesn’t roll up. Sharing-set access isn’t extended to superiors in the role hierarchy (What a sharing set doesn’t do). That’s fine here: nobody above a DC manager at the partner needs the deliveries. If a partner later asks for a head-office view across its DCs, that’s one criteria-based rule per partner to a group of that partner’s roles. Not a group shared with Steve Trucking’s own account team: I don’t mix our people and theirs in one group.
  • The linkage is the security. If an integration writes the partner’s parent account instead of the DC account, the DC manager sees nothing. If it writes the wrong DC, the wrong DC manager sees it. That’s a line in each partner’s integration contract, and a test.

Photos and claims follow their records. Checkpoint 2 put the photos on the Work Order and the claim files on the Case. A file on a record is visible to anyone who can see the record (Files), so the DC manager sees their DC’s photos, and nothing new is built.

About 700 people, two to a truck, about ten stops a day. Challenge SV3: crews see only their assigned stops, only on the day (S4). Can it be declarative?

Half of it can. Field Service already shares by the assignment. In Field Service Settings, turn on “Share dispatched service appointments with their assigned resources” and “Share service appointments’ parent work orders with their assigned resources,” so the crew sees the stop and what’s being delivered. Salesforce says why the trigger is dispatch: “These settings allow dispatchers to control access to the appointment and its related information until they’ve finalized the appointment’s details” (Limit Access to Field Service Records (opens in a new tab), Salesforce Help, checked 2026-11-26). So the coordinators plan the evening before, and dispatch in the morning. Until then, the crew sees nothing. That’s “on the day,” the start.

Now the end. Read the same page for what takes the share away: “When a service resource is removed from a service appointment, sharing is deleted only for that service appointment.” Nothing about completing it. Field Service opens the stop on the day, and keeps it open after.

Do the arithmetic. About a million deliveries a year across 330 trucks is about 3,000 stops a truck. Leave the shares, and every crew member can look up about 3,000 Recipients’ homes a year, and more each year at 30% growth. That isn’t “only on the day.”

Option A: take the crew off the appointment when it’s done. The share goes, and so does the record of who delivered it, which the claims need. No.

Option B: a nightly job that removes yesterday’s completed appointments’ dispatch shares, and their parent Work Orders’ shares. That’s programmatic sharing (chapter 11): a job, with an owner, a test, and the three lines from module 1, because standard can’t end access by date.

In my professional opinion, B. And prove two things in a Developer Edition org with Field Service before it’s built: that the job can delete the shares Field Service wrote, and that Field Service doesn’t write them back. The same page warns that “an async sharing job can run after every status change on a service appointment.”

And the phone is a second place to close. The Data Architect course set the crew’s default list view to today’s appointments, so only today’s stops go onto the device, and put the gate code on its own small record, deleted when the stop is done (Data Architect, Checkpoint 2). Sharing decides what’s in the org. The list view decides what’s in the pocket.

About a million a year, and they never log in. Challenges SV4 and IA3: the tracking link shows only that one delivery, without an account, and stops working after a set time (S3). After delivery it shows the photos (R7).

The tracking page sits on a public site, so its visitor is the site’s guest user, one user for every anonymous visitor (The Guest User). What should the guest see through sharing? Nothing. No object access to Work Order or Service Appointment, and no guest user sharing rule (Guest user rules).

Instead, the page calls one controlled action. The text message carries a long, random link, the org stores only a hash of it with an expiry against one delivery, and the link stops working seven days after delivery, long enough for the photos and the survey. Given a valid link, the action returns that one delivery’s window, its status, the truck’s position near the end of the route (R6), and after delivery, its photos. Change one character of the link, and it returns nothing. After the expiry, the same.

That action runs in system mode, because the guest has no access of its own. That’s chapter 17’s exception, and it’s written down like one (Write the exception down): standard sharing can’t show one record to an anonymous person who holds a secret; the owner is the team that owns the tracking page; the test is the four links below. And the photos go out through the action, after delivery, for that delivery. Not as a public link, because a public link anyone can forward is the widest door into a file (Files), and it doesn’t expire with the delivery.

One trade-off stays. A Recipient can forward the text message, and whoever holds it sees one delivery until the link expires. That’s a risk the business accepts, by name, with a date (module 3).

Chapter 13: three users for each requirement, the null test first, and the evidence beside it. The new rows:

PersonaCheckExpected
Keystone Dallas DC managerOpen a Keystone Dallas delivery, its photos and its claimCan view
Keystone Dallas DC managerOpen a Keystone Phoenix deliveryCan’t see
Keystone Dallas DC managerOpen a Redrock Dallas deliveryCan’t see
Keystone Dallas store staffOpen a claim a colleague loggedCan’t see; their DC manager can
Dallas crew memberOpen tomorrow’s stop before it’s dispatchedCan’t see
Dallas crew memberOpen today’s dispatched stop and its Work OrderCan view
Dallas crew memberOpen yesterday’s completed stop, after the nightly jobCan’t see
RecipientThe tracking link, unchangedOne delivery
RecipientThe link with one character changed; the link after expiry; no link at allNothing

Two notes on the evidence. A sharing set writes no share rows (No share rows to look at), so the partner tests are run as the user, logged in to the site. The crew’s evidence is the opposite: query the appointment’s share rows before and after the nightly job, and record both.

Who sees what at Steve Trucking: the people outside Who sees what at Steve Trucking, after Checkpoint 3's people outside. Columns: Keystone Dallas deliveries, Keystone Phoenix deliveries, Redrock Dallas deliveries, the Recipient's details, and photos. The Keystone Dallas coordinator sees only Keystone Dallas, its Recipients and photos, through a User Territory. Customer care sees every delivery, through the owner-based rule. Keystone's account manager sees both Keystone DCs but not Redrock, through the partner rule. New, highlighted: the Keystone Dallas DC manager sees only Keystone Dallas, its Recipients and photos, through a sharing set. A Dallas crew member sees only today's dispatched stops, through dispatch sharing, ended each night. A Recipient sees one delivery, their own details and its photos after delivery, through a token, and nothing else. Footnote: every cell has a mechanism, and every cell has a test. {"author": "Steve Simpson", "blueprint": "1.0.0", "builder": "standard 1.60.0", "built": "2026-11-23", "id": "DGM-SVA-SR-05", "rights": "\u00a9 2026 Twinshark LLC. All rights reserved.", "template": "matrix 0.1.0", "theme": "stevetecharc 1.5.0"} KEYSTONE DALLAS KEYSTONE PHOENIX REDROCK DALLAS RECIPIENT DETAILS PHOTOS THROUGH Keystone Dallas coordinator Checkpoint 1 unless covering their DC's stops USER TERRITORY Customer care Checkpoint 1 Recipients call us OWNER-BASED RULE Keystone account manager Checkpoint 2 another partner PARTNER RULE Keystone Dallas DC manager new: Customer Community Plus deliveries and claims another DC SHARING SET Dallas crew member new: two to a truck today's stops only not their stops on the day DISPATCH SHARING Recipient new: no login one delivery their own only after delivery TOKEN Every cell has a mechanism, and every cell has a test. © 2026 Twinshark LLC · stevetecharc.com
Click to enlarge

The tempting design for the tracking page is a guest user sharing rule: share each delivery with the site’s guest user, then filter the page by the link. It’s quick, and it’s all clicks.

But a guest user sharing rule shares with every anonymous visitor at once. The page’s filter is all that stands between a million Recipients’ addresses and anyone who finds a way to query the site, and the rule counts against the same limit as the criteria-based rules. I don’t choose that design. The guest gets nothing, and one action returns one delivery to the one person holding its link.

The requirement is: the Retail Partners’ DC managers see only their own DC, the crews only their stops on the day, and each Recipient only their own delivery, without an account, for a limited time.

My solution is: Customer Community Plus with Private external defaults, two external roles per DC account, and one sharing set from the user’s DC account to the Work Order’s and the Case’s; Field Service’s dispatch sharing for the crews, dispatched in the morning and ended by a nightly job; and for Recipients, no guest access at all, one system-mode action behind a hashed link that expires seven days after delivery.

The reason is: each boundary uses a structure the business already has, the DC account, the assignment, the delivery itself, so the model grows with the business instead of with the rule count.

The option I didn’t choose was a guest user sharing rule for the tracking page.

In my professional opinion, opening a model to the outside is where you find out whether it was designed for access. If every outside person maps to a structure you already have, it was. Part two brings the late changes: a fourth partner, a second org and an assistant.