forcedotcom/sf-skills / skills/nonprofit-volunteer-management-structure-generate
nonprofit-volunteer-management-structure-generate
VerifiedUse this skill to plan a Salesforce Nonprofit Cloud Volunteer Management (VM) program before anything is created: it interviews the user about their programs, sites, volunteer roles, requirements, and shift schedules, checks the org read-only for records to reuse, and presents a plan of the records the program needs. It never writes; on the user's yes it hands the plan to nonprofit-volunteer-management-records-create. TRIGGER when a user wants to plan, design, or structure a VM program, or asks "what records do we need" or "how should we model this program". DO NOT TRIGGER to explain what a VM object or field is for (use nonprofit-volunteer-management-model-get), to write records (use nonprofit-volunteer-management-records-create), to enable Volunteer Management in an org, for per-person records (JobPositionAssignment, PersonLocationAvailability, PersonCompetency / PersonExamination, ConstituentRole), or for NPSP / Volunteers for Salesforce (V4S), which is unsupported.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.7 KB |
| references/configuration-decisions.md | markdown | 8.3 KB |
| references/discovery-interview.md | markdown | 5.0 KB |
| references/edge-cases.md | markdown | 2.6 KB |
| references/mcp-invocation.md | markdown | 4.8 KB |
| references/plan-output.md | markdown | 9.0 KB |
references/mcp-invocation.md
View on GitHub# Org Calls — headless-360 and Salesforce CLI
**When to load:** Workflow steps 2 and 5. Every call here is a read and runs only after the user agrees to the org read.
Each call is shown for both connections, headless-360 and the Salesforce CLI (with the org's alias); they return the same result. See SKILL.md → Mechanism.
---
## Volunteer Management check
Every call uses API v67.0. The Salesforce CLI forms run `sf api request rest`, `sf sobject describe`, and `sf data query` against `--target-org <alias>`.
**1. Org preference**
```text
headless-360: dispatch_readonly({"path": "/services/data/v67.0/setup/org/preferences/VolunteerManagementEnabled", "method": "GET"})
Salesforce CLI: sf api request rest "/services/data/v67.0/setup/org/preferences/VolunteerManagementEnabled" --target-org <alias>
```
Response: `{"isPreferenceEnabled": true}` (a 360 call may wrap it as `{"status_code": 200, "body": {...}}` — read `body.isPreferenceEnabled`).
| Result | Meaning | Do |
|---|---|---|
| `true` | Volunteer Management is on | Continue to the describe |
| `false` | It's off | Stop. An admin turns it on in Setup → Volunteer Management Settings |
| 404 `NOT_FOUND` | The org doesn't have the preference (VM not provisioned) | Stop, same message |
| 403 | The user can't read org settings | Stop and say so; this is not the same as "off" |
**2. User access**
```text
headless-360: dispatch_readonly({"path": "/services/data/v67.0/sobjects/VolunteerInitiative/describe", "method": "GET"})
Salesforce CLI: sf sobject describe --sobject VolunteerInitiative --api-version 67.0 --target-org <alias> --json
```
| Result | Meaning | Do |
|---|---|---|
| 200 | The user can see the Volunteer Management objects | Continue |
| 404 `NOT_FOUND` / `INVALID_TYPE`, or 403 | The user can't see them | Stop. The user needs the Manage Volunteer Data permission set |
Don't query permission-set assignments up front; the describe answers the question.
---
## Reuse checks
All reuse checks use the same query call. Put only the planned names in the `WHERE`; never query an object without one.
```text
headless-360: dispatch_readonly({"path": "/services/data/v67.0/query", "method": "GET", "query_params": {"q": "<SOQL>"}})
Salesforce CLI: write the SOQL to a file, then
sf data query --file <soql-file> --api-version 67.0 --target-org <alias> --json
```
Prefer headless-360 when it is connected: the name travels inside a JSON value and never reaches a shell. **Never put names in a shell command line.** Names come from the user, so on the CLI path write the SOQL to a file (a quoted heredoc, `<<'EOF'`, or a file-write tool) and pass `--file`. Do not use `-q "<SOQL>"` with a name interpolated into it: a `"`, `$(…)` or backtick in a name would run in the shell.
**Apostrophes.** Escape an apostrophe in a name with a backslash: `O\'Brien`. Doubling it (`''`) fails with 400 `MALFORMED_QUERY`. Inside a headless-360 JSON argument the backslash itself must be escaped, so write `O\\'Brien` in the JSON string. In the SOQL file, write `O\'Brien` as is.
| Check | SOQL |
|---|---|
| Volunteer Initiative | `SELECT Id, Name FROM VolunteerInitiative WHERE Name IN ('Weekly Food Pantry', 'O\'Brien Youth Mentoring')` |
| Location | `SELECT Id, Name FROM Location WHERE Name IN ('Eastside Pantry', 'Virtual')` |
| Position | `SELECT Id, Name FROM Position WHERE Name IN ('Team Lead')` |
| Competency | `SELECT Id, Name FROM Competency WHERE Name LIKE '%Driv%' OR Name LIKE '%License%'` |
| Examination | `SELECT Id, Name FROM Examination WHERE Name LIKE '%Background%' OR Name LIKE '%Check%'` |
| Job Position, existing initiative | `SELECT Id, Name, VolunteerInitiative.Name, Location.Name FROM JobPosition WHERE Name IN ('Driver') AND VolunteerInitiativeId = '<initiative Id>'` |
| Job Position, new initiative | `SELECT Id, Name, VolunteerInitiative.Name, Location.Name FROM JobPosition WHERE Name IN ('Driver')` |
- For Competency and Examination, build the `LIKE` terms from the distinctive stem plus the category noun (`%Driv%` and `%License%`), not one spelling (`%Driving%` misses "Driver's License"). Escape `%` or `_` with a backslash when they're part of the name.
- When a stem query finds nothing but the org may word the record differently, run it again with a shorter stem (`%Lic%` instead of `%License%`) before planning the record as New.
- The Job Position initiative Id comes from the Volunteer Initiative check. With a new initiative, any match belongs to another initiative, so plan the Job Position as New.
| Result | Meaning |
|---|---|
| 200, `totalSize: 0` | No match; plan the record as New |
| 200 with `records` | Show each match (name and parent names) and ask whether it's the one the user means |
| 400 `MALFORMED_QUERY` | Usually an unescaped apostrophe; fix the escape and retry |
| 400 `INVALID_TYPE` / 404 | The object isn't visible; go back to the Volunteer Management check |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |