care-program-management

Use when configuring or troubleshooting Health Cloud Care Programs — including CareProgram hierarchy setup, patient enrollment (CareProgramEnrollee), consent prerequisites, product-level enrollment (CareProgramEnrolleeProduct), and provider associations (CareProgramProvider). Trigger keywords: care program, program enrollment, enrollee, program product, CareProgramEnrollee, consent for enrollment, patient program outcome. NOT for Care Plans (per-patient task/goal framework), case management workflows, or general Health Cloud patient setup unrelated to program enrollment.

Best use case

care-program-management is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when configuring or troubleshooting Health Cloud Care Programs — including CareProgram hierarchy setup, patient enrollment (CareProgramEnrollee), consent prerequisites, product-level enrollment (CareProgramEnrolleeProduct), and provider associations (CareProgramProvider). Trigger keywords: care program, program enrollment, enrollee, program product, CareProgramEnrollee, consent for enrollment, patient program outcome. NOT for Care Plans (per-patient task/goal framework), case management workflows, or general Health Cloud patient setup unrelated to program enrollment.

Teams using care-program-management should expect a more consistent output, faster repeated execution, less prompt rewriting, better workflow continuity with your supporting tools.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.
  • You already have the supporting tools or dependencies needed by this skill.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/care-program-management/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/admin/care-program-management/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/care-program-management/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How care-program-management Compares

Feature / Agentcare-program-managementStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when configuring or troubleshooting Health Cloud Care Programs — including CareProgram hierarchy setup, patient enrollment (CareProgramEnrollee), consent prerequisites, product-level enrollment (CareProgramEnrolleeProduct), and provider associations (CareProgramProvider). Trigger keywords: care program, program enrollment, enrollee, program product, CareProgramEnrollee, consent for enrollment, patient program outcome. NOT for Care Plans (per-patient task/goal framework), case management workflows, or general Health Cloud patient setup unrelated to program enrollment.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Care Program Management

This skill activates when configuring Health Cloud Care Programs, enrolling patients into programs, setting up program-level products and providers, or troubleshooting enrollment consent issues. It covers the full CareProgram object hierarchy and the hard consent prerequisite that must be satisfied before any enrollment record can be created.

---

## Before Starting

Gather this context before working on anything in this domain:

- Confirm Health Cloud is enabled and the Care Program feature is licensed in the org. Care Programs are not available in standard Sales or Service Cloud.
- Confirm whether the org requires Patient Program Outcome Management. This feature requires a separate licensed permission set (introduced at API v61.0+) and is NOT included in base Health Cloud.
- Identify the locale(s) of the end users who will perform enrollment. Authorization Form Text records must have their locale field set to exactly match the logged-in user's locale, or consent documents silently fail to display — enrollment is then impossible without an obvious error message.

---

## Core Concepts

### CareProgram Object Hierarchy

Care Programs follow a strict parent-child hierarchy. Every downstream record depends on the root `CareProgram` record existing first:

```
CareProgram (root — defines the program, its status, and date range)
├── CareProgramProduct (medications, services, or devices offered by the program)
├── CareProgramProvider (healthcare organizations that deliver the program)
└── CareProgramEnrollee (junction — links a patient/account to a program)
    └── CareProgramEnrolleeProduct (links an enrollee to a specific program product)
```

`CareProgram` is the population-level container. It is not per-patient. One program can have thousands of enrollees. Creating the hierarchy in the wrong order (e.g., creating a `CareProgramEnrollee` before the `CareProgram` is active) causes lookup-validation failures that surface as generic DML errors.

### Consent as a Hard Enrollment Prerequisite

Salesforce enforces consent before a `CareProgramEnrollee` record can be marked active. The consent mechanism uses the `AuthorizationForm`, `AuthorizationFormText`, and `AuthorizationFormConsent` objects. The `AuthorizationFormText` record contains the locale-specific display text for the consent document.

Critical constraint: the `locale` field on `AuthorizationFormText` must exactly match the locale string of the logged-in user (e.g., `en_US`, not `en`). If there is a mismatch — even a subtle one like `en` vs `en_US` — the consent document will not render in the UI, and the enrollment flow will appear broken with no informative error message. This is a silent failure.

### CareProgramEnrollee and CareProgramEnrolleeProduct

`CareProgramEnrollee` is the junction object between a `CareProgram` and a patient (typically a Person Account). It holds enrollment status, effective dates, and consent status. `CareProgramEnrolleeProduct` links an individual enrollee to a specific `CareProgramProduct`, enabling product-level tracking (e.g., which medication a specific patient is receiving under the program).

These two objects are separate. Creating only `CareProgramEnrollee` without the corresponding `CareProgramEnrolleeProduct` records is correct when product-level enrollment is not needed, but omitting `CareProgramEnrolleeProduct` when outcome tracking is required will cause downstream gaps in Patient Program Outcome data.

### Patient Program Outcome Management

Patient Program Outcome Management tracks clinical or behavioral outcomes for a patient within a program. This is a separately licensed capability (API v61.0+). It is NOT part of base Health Cloud. Attempting to use Patient Program Outcome objects without the correct permission set results in "insufficient privileges" errors that are often misdiagnosed as sharing or profile issues.

---

## Common Patterns

### Pattern: Full Enrollment with Consent

**When to use:** Setting up a new patient enrollment end-to-end, including consent capture via the UI.

**How it works:**

1. Create or verify the `CareProgram` record is Active.
2. Create `CareProgramProduct` records for any medications/services under the program.
3. Create `CareProgramProvider` records linking healthcare organization accounts to the program.
4. Create or verify the `AuthorizationForm` and `AuthorizationFormText` records. Set the `locale` field on `AuthorizationFormText` to exactly match the target user locale (e.g., `en_US`).
5. Navigate to the patient's record and launch the enrollment flow or create `CareProgramEnrollee` directly, linking to the active `CareProgram`.
6. Capture consent via `AuthorizationFormConsent` linked to the enrollee.
7. Set `CareProgramEnrollee.Status` to `Active`.
8. Optionally create `CareProgramEnrolleeProduct` records for each product the patient is enrolled in.

**Why not the alternative:** Skipping consent setup and manually setting enrollee status to Active bypasses the consent model and creates compliance risk. Health Cloud consent enforcement is not merely UI-level in all configurations — consent status is a data field that downstream processes and integrations may check.

### Pattern: Product-Level Enrollment for Outcome Tracking

**When to use:** The program has multiple medications or services and clinical outcomes need to be tracked at the product level per patient.

**How it works:**

1. Ensure `CareProgramProduct` records exist for each medication/service under the `CareProgram`.
2. After creating `CareProgramEnrollee`, create one `CareProgramEnrolleeProduct` record per product the patient is receiving. Set `CareProgramEnrolleeProduct.CareProgramProductId` and `CareProgramEnrolleeProduct.CareProgramEnrolleeId`.
3. If Patient Program Outcome Management is licensed, assign the permission set to the relevant users and create `PatientProgramOutcome` records linked to the enrollee.

**Why not the alternative:** Tracking product-level outcomes at the `CareProgramEnrollee` level using custom fields is not scalable and breaks the standard data model, preventing use of Health Cloud reporting and the Patient Program Outcome API.

---

## Decision Guidance

| Situation | Recommended Approach | Reason |
|---|---|---|
| Consent document not showing during enrollment | Check `AuthorizationFormText.locale` exactly matches user locale string | Silent failure — no error is thrown when locale mismatches |
| Outcome tracking needed per medication | Use `CareProgramEnrolleeProduct` + Patient Program Outcome Management | Base Health Cloud does not include outcome tracking; separate license required |
| Multiple providers delivering same program | Create one `CareProgramProvider` per provider org, all linked to same `CareProgram` | `CareProgramProvider` is the correct junction; do not use custom relationships |
| Patient needs enrollment in multiple programs | Create one `CareProgramEnrollee` record per program | Enrollee records are per-program, not reusable across programs |
| Enrollment failing with DML error on `CareProgramEnrollee` | Verify `CareProgram` status is Active and consent form is configured | Inactive program or missing consent setup are the two most common root causes |

---

## Recommended Workflow

Step-by-step instructions for an AI agent or practitioner working on this task:

1. Verify org prerequisites — confirm Health Cloud is enabled, the Care Program feature is licensed, and (if outcome tracking is needed) the Patient Program Outcome Management permission set is available.
2. Build the CareProgram root record — set Status to Active and populate the program start/end dates. All downstream records require an active root.
3. Create CareProgramProduct and CareProgramProvider records — link all relevant medications, services, and provider organizations to the program before enrollment begins.
4. Configure consent prerequisites — create `AuthorizationForm` and `AuthorizationFormText` records. Verify the `locale` field on each `AuthorizationFormText` exactly matches the locale of each user group that will perform enrollment.
5. Enroll patients — create `CareProgramEnrollee` records linking patient Person Accounts to the program. Capture `AuthorizationFormConsent` and set enrollee Status to Active.
6. Create CareProgramEnrolleeProduct records — if product-level tracking is required, link each active enrollee to the relevant program products.
7. Validate and test — run the enrollment flow as a non-admin user to confirm consent documents render correctly, enrollee records are created, and outcome objects (if licensed) are accessible.

---

## Review Checklist

Run through these before marking work in this area complete:

- [ ] `CareProgram` record exists with Status = Active and valid date range
- [ ] `AuthorizationFormText.locale` exactly matches the locale of the target user (not just similar — exact string match)
- [ ] `CareProgramEnrollee` records have consent captured via `AuthorizationFormConsent`
- [ ] If outcome tracking is in scope: Patient Program Outcome Management permission set is assigned and `CareProgramEnrolleeProduct` records exist
- [ ] End-to-end enrollment tested as a non-admin user in the target locale
- [ ] `CareProgramProvider` records exist for all delivering healthcare organizations

---

## Salesforce-Specific Gotchas

Non-obvious platform behaviors that cause real production problems:

1. **Authorization Form Text locale silent failure** — If the `locale` field on `AuthorizationFormText` does not exactly match the logged-in user's locale (e.g., `en` vs `en_US`), the consent document silently fails to display. No error is thrown. The enrollment UI simply appears broken. Always verify the exact locale string.
2. **Patient Program Outcome Management is a separate licensed feature** — Attempting to create `PatientProgramOutcome` records without the separate permission set (required at API v61.0+) results in "insufficient privileges" errors. This is frequently misdiagnosed as a profile or sharing issue. Check license and permission set first.
3. **Care Program vs Care Plan conflation** — Care Programs are population-level enrollment containers. Care Plans are per-patient task/goal/problem frameworks. They share the word "care" but use entirely different objects. Applying Care Plan logic (CarePlan, CarePlanTemplate, Goal, Problem) to a Care Program setup, or vice versa, produces schema errors and incorrect data models.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| CareProgram hierarchy setup checklist | Ordered list of records to create and field values to set |
| Consent configuration verification steps | Steps to confirm AuthorizationFormText locale is correctly set |
| Enrollment validation test script | Manual test steps to verify end-to-end enrollment as a non-admin user |
| Patient Program Outcome configuration guide | Steps to assign the licensed permission set and create outcome records |

---

## Related Skills

- `admin/health-cloud-patient-setup` — Core Health Cloud patient record configuration (Person Accounts, care teams) that must be complete before care program enrollment is possible
- `data/person-accounts` — Person Account data model details; Care Program enrollees are typically Person Accounts

Related Skills

session-management-and-timeout

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring session timeout values, concurrent session limits, session IP locking, or logout behavior in Salesforce. Covers org-wide session settings, profile-level overrides, Connected App session policies, and Metadata API SecuritySettings deployment. NOT for OAuth token refresh flows, login IP ranges, or MFA/identity-provider configuration.

oauth-token-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when work depends on how Salesforce OAuth access and refresh tokens are issued, refreshed, rotated, revoked, or introspected for a Connected App or API client—including unexpected logouts, invalid_grant after refresh, or designing token incident response. NOT for choosing which OAuth grant or Connected App flow to implement (use integration/oauth-flows-and-connected-apps), Named Credential packaging (use integration/named-credentials-setup), or broad Connected App IP and PKCE policy hardening without a token-lifecycle angle (use security/connected-app-security-policies).

certificate-and-key-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when creating, uploading, or rotating certificates in Salesforce, configuring mutual TLS (mTLS) client authentication, managing the Java KeyStore for CA-signed certificates, diagnosing certificate expiry in JWT OAuth flows, or understanding which certificate types Salesforce supports and how to migrate them between orgs. NOT for Named Credential configuration (use named-credentials-setup skill), NOT for Shield Platform Encryption key management. Trigger keywords: Certificate and Key Management, self-signed certificate, CA-signed certificate, mutual TLS, mTLS, keystore, JKS, PKCS12, certificate rotation, certificate expiry, JWT certificate.

flexcard-state-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing FlexCard actions, conditional visibility, and state that must survive navigation, refresh, or parent/child card transitions. Triggers: 'flexcard state', 'flexcard conditional visibility', 'flexcard actions', 'flexcard refresh', 'child flexcard state'. NOT for raw LWC state or for OmniScript step state.

lwc-state-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Share state across LWCs using pub/sub, Lightning Message Service, @wire, and reactive stores. NOT for in-component reactivity.

lwc-focus-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building LWCs that need to manage focus explicitly — modal dialogs, wizard flows, dynamic inserts, list updates, error summaries, and focus after async work. Covers focus restoration, focus traps, programmatic focus across shadow DOM, and patterns for announcing changes to assistive tech. Does NOT cover general LWC a11y audit (see lwc-accessibility).

revenue-lifecycle-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when implementing or troubleshooting Salesforce Revenue Lifecycle Management (RLM) — the native Revenue Cloud product covering order-to-cash lifecycle, Dynamic Revenue Orchestrator (DRO) fulfillment plan design, asset amendments, billing schedule creation via Connect API, and invoice management. Triggers on: Dynamic Revenue Orchestrator, RLM order decomposition, DRO fulfillment swimlanes, native Revenue Cloud billing schedule, asset lifecycle management Salesforce. NOT for CPQ quoting or pricing rules (use cpq-* skills), not for the legacy Salesforce Billing managed package with blng__* objects (different product entirely), not for standard Order objects without Revenue Cloud features.

loyalty-management-setup

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when setting up or extending Salesforce Loyalty Management — including program and currency creation, tier group design, qualifying vs. non-qualifying point currency separation, DPE batch job activation, partner loyalty configuration, and member portal setup on Experience Cloud. Triggers on: Loyalty Management setup, loyalty tier setup Salesforce, qualifying points vs redemption points, DPE batch job for loyalty, partner loyalty program Salesforce, loyalty member portal. NOT for Marketing Cloud engagement program design (separate product), not for B2B loyalty via Sales Cloud (standard opportunity, not loyalty program), not for general Experience Cloud site setup (use experience-cloud-setup skill).

scratch-org-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when designing, configuring, or troubleshooting scratch orgs: definition file structure, edition selection, allocation limits, Org Shape, CI automation via ScratchOrgInfo, and lifecycle management from the Dev Hub. NOT for SFDX CLI basics (use sf-cli-and-sfdx-essentials), sandbox management, or production org administration.

release-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when planning, coordinating, or governing Salesforce releases: version numbering, rollback strategy, release notes, go/no-go criteria, release calendar, and sandbox preview alignment. NOT for deployment mechanics (use devops/post-deployment-validation or devops/change-set-deployment).

pipeline-secrets-management

8
from PranavNagrecha/AwesomeSalesforceSkills

Store and inject Salesforce auth URLs, JWT keys, and API credentials into CI without leaking them. NOT for runtime secrets in Apex.

isv-license-management-and-trialforce

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when an ISV partner is wiring license enforcement, trial provisioning, or feature-flag distribution into a managed package — covers License Management App (LMA) install and registration, Lead/License object lifecycle, Trialforce Management Org (TMO) and Trialforce Source Org (TSO) split, Trialforce templates, SignupRequest API, AppExchange Checkout integration, and Feature Parameters (LmoToSubscriber / SubscriberToLmo) as the cross-org configuration channel. Triggers: 'register package with LMA', 'set up Trialforce', 'add feature parameter to managed package', 'license expired in subscriber org', 'AppExchange Checkout licensing'. NOT for general managed-package version creation, ancestor pinning, or PostInstall handler design (use managed-package-development); NOT for second-generation packaging mechanics (use second-generation-managed-packages); NOT for non-ISV experience-cloud login licensing (use experience-cloud-licensing-model).