health-cloud-timeline
Configure the Industries Enhanced Timeline in Health Cloud to display clinical events, custom object records, and activity history on a patient or member record. Trigger keywords: Enhanced Timeline, TimelineObjectDefinition, Industries Timeline, timeline categories, clinical event display, timeline configuration. NOT for standard Activity Timeline (task/event list), NOT for Experience Cloud timelines, NOT for legacy Health Cloud managed-package Timeline component unless migrating away from it.
Best use case
health-cloud-timeline is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure the Industries Enhanced Timeline in Health Cloud to display clinical events, custom object records, and activity history on a patient or member record. Trigger keywords: Enhanced Timeline, TimelineObjectDefinition, Industries Timeline, timeline categories, clinical event display, timeline configuration. NOT for standard Activity Timeline (task/event list), NOT for Experience Cloud timelines, NOT for legacy Health Cloud managed-package Timeline component unless migrating away from it.
Teams using health-cloud-timeline 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/health-cloud-timeline/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How health-cloud-timeline Compares
| Feature / Agent | health-cloud-timeline | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure the Industries Enhanced Timeline in Health Cloud to display clinical events, custom object records, and activity history on a patient or member record. Trigger keywords: Enhanced Timeline, TimelineObjectDefinition, Industries Timeline, timeline categories, clinical event display, timeline configuration. NOT for standard Activity Timeline (task/event list), NOT for Experience Cloud timelines, NOT for legacy Health Cloud managed-package Timeline component unless migrating away from it.
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
# Health Cloud Timeline
This skill activates when a practitioner needs to configure the **Industries Enhanced Timeline** in Health Cloud — adding custom object records, clinical events, or activity history to the patient or member timeline view. It covers `TimelineObjectDefinition` metadata setup, timeline category configuration, component placement, and migration away from the legacy managed-package Timeline component.
---
## Before Starting
Gather this context before working on anything in this domain:
- Confirm the org has a Health Cloud or Industries license that includes the **Timeline** permission. Without this, `TimelineObjectDefinition` records cannot be created and the Industries Timeline component will not render.
- Identify whether the page currently uses the **legacy Timeline component** (from the `HealthCloud` managed package, typically installed as `HealthCloud.Timeline`) or the **Industries Timeline component** (`industries:timeline` or `forceContent:timeline` in the page layout). These two components use completely different configuration mechanisms.
- Determine the relationship path from each target object back to the **Account** object. Enhanced Timeline requires every displayed object to be related to the patient/member through Account — direct or through a related Account lookup. Objects without an Account relationship path cannot be surfaced.
- Check the API version in use. `TimelineObjectDefinition` metadata is available at **API v55.0 and later**. Orgs deploying via older tooling or scratch org definitions with older API versions will get metadata errors.
---
## Core Concepts
### TimelineObjectDefinition Metadata Type
`TimelineObjectDefinition` is the metadata type that tells the Industries Enhanced Timeline which objects to query and how to display their records. Each definition maps one object to the timeline and configures:
| Field | Purpose |
|---|---|
| Object API name | The Salesforce object whose records appear as timeline entries |
| Date field | Which date/datetime field determines where the record appears on the timeline axis |
| Title field | Field shown as the entry headline |
| Description field | Optional secondary text |
| Timeline category | The filter group label (appears in the filter picklist on the timeline component) |
| Icon | SLDS utility icon name to display alongside entries |
`TimelineObjectDefinition` records are org-wide metadata; they are not record-type-specific. Once deployed, all instances of the Industries Timeline component in the org will include records from that object definition unless filtered by category at the component level.
### Account Relationship Requirement
The Enhanced Timeline queries objects by traversing the relationship graph from the patient's Account record. Every object surfaced on the timeline must have a lookup or master-detail relationship that connects it to Account — either a direct `AccountId` field or a chain of lookups that resolves to Account. Objects related only to Contact, Case, or other non-Account objects cannot be displayed. This is the single most common configuration mistake.
For Health Cloud clinical objects (e.g., `PatientHealthCondition`, `EhrPatientMedication`, `ClinicalEncounter`), the Account relationship is built into the Health Cloud data model and can be referenced directly. For custom objects, verify the relationship chain before writing the `TimelineObjectDefinition`.
### Timeline Categories
Timeline categories are the filter labels that appear in the Industries Timeline component's filter picklist. A practitioner creates category values in Setup and then assigns each `TimelineObjectDefinition` to one category. Well-designed categories group related clinical events (e.g., "Medications", "Encounters", "Labs") so the clinician can filter the timeline to relevant event types without scrolling through unrelated entries.
Categories are configured in **Setup > Timeline > Categories**, not in the metadata file itself. If a `TimelineObjectDefinition` references a category name that does not exist as a configured category value, the timeline will silently omit the filter option — a hard-to-diagnose display gap.
### Legacy vs. Enhanced Timeline Components
The original Health Cloud managed package shipped a `Timeline` component under the `HealthCloud` namespace. This component is **deprecated** as of Health Cloud v236 (Summer '22). Salesforce has directed customers to migrate to the Industries Timeline component, which is backed by `TimelineObjectDefinition` metadata.
Key differences:
| Aspect | Legacy Timeline (HealthCloud.Timeline) | Enhanced Timeline (Industries Timeline) |
|---|---|---|
| Configuration | Custom Settings and list views | TimelineObjectDefinition metadata |
| Object support | Limited to Health Cloud clinical objects | Any object with Account relationship |
| API version | Not metadata-API-configurable | API v55.0+ |
| Filter UI | Hardcoded categories | Configurable timeline categories |
| Future support | Deprecated — no new features | Actively developed |
---
## Common Patterns
### Pattern 1: Adding a Custom Object to the Patient Timeline
**When to use:** An org has a custom object (e.g., `Patient_Visit__c`) with an `Account__c` lookup field, and the care team needs visit records to appear chronologically on the patient record timeline.
**How it works:**
1. Confirm `Patient_Visit__c` has an `Account__c` lookup to Account (or `AccountId` standard field).
2. In Setup > Timeline > Categories, create a category named "Visits" if it does not exist.
3. Create a `TimelineObjectDefinition` metadata record:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<TimelineObjectDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
<active>true</active>
<baseObject>Patient_Visit__c</baseObject>
<dateField>Visit_Date__c</dateField>
<descriptionField>Visit_Notes__c</descriptionField>
<icon>event</icon>
<isActive>true</isActive>
<label>Patient Visit</label>
<labelPlural>Patient Visits</labelPlural>
<nameField>Name</nameField>
<timelineCategory>Visits</timelineCategory>
</TimelineObjectDefinition>
```
4. Deploy via SFDX or Metadata API. Verify in Setup > Timeline that the definition appears and is active.
5. Open the patient record and confirm the Industries Timeline component shows visits in the expected date range.
**Why not the alternative:** Manually customizing page layouts with related lists is not equivalent — related lists show records in a table, not chronologically alongside other clinical events. The timeline provides the unified chronological view clinical staff need to understand care history at a glance.
### Pattern 2: Migrating from Legacy to Enhanced Timeline
**When to use:** The org was provisioned before Health Cloud v236 and uses the legacy `HealthCloud.Timeline` component. Clinical data appears on the timeline today, but the component is deprecated and no longer receives updates.
**How it works:**
1. Audit which objects currently appear on the legacy timeline using the Health Cloud Custom Settings under `HealthCloud__Timeline__c` or equivalent.
2. For each object, confirm its relationship path to Account.
3. Create `TimelineObjectDefinition` records for each object, matching category labels to the existing filter structure so end users experience minimal change.
4. Add the Industries Timeline Lightning component to the patient page layout (App Builder > drag `Industries Timeline` from component panel).
5. Remove the legacy `HealthCloud.Timeline` component from the same page layout.
6. Validate in a sandbox with representative patient records before deploying to production.
**Why not the alternative:** Leaving both components on the page layout simultaneously causes duplicate entries and performance issues. The two components query independently and do not deduplicate records.
---
## Decision Guidance
| Situation | Recommended Approach | Reason |
|---|---|---|
| Adding a standard Health Cloud clinical object (EhrPatientMedication, PatientHealthCondition) | Create TimelineObjectDefinition referencing the standard Health Cloud object | These objects already have Account relationships built into the Health Cloud data model |
| Adding a custom object with no Account relationship | Add Account lookup to the custom object first, then create TimelineObjectDefinition | Enhanced Timeline cannot surface the object without Account path |
| Org uses legacy HealthCloud.Timeline | Full migration to Industries Timeline + TimelineObjectDefinition | Legacy component is deprecated; no new features or bug fixes will be delivered |
| Need to filter timeline by event type per user role | Configure timeline categories and use component-level category filtering | Categories are the supported filter mechanism; record type filters on the component are not available |
| Object is related to Contact only, not Account | Evaluate adding an Account lookup or using a junction object | There is no workaround; Account relationship is mandatory for Enhanced Timeline |
---
## Recommended Workflow
Step-by-step instructions for an AI agent or practitioner working on this task:
1. **Verify license and permissions** — Confirm the org has Health Cloud or an Industries license that includes Timeline. Check that the running admin user has the "Industries Timeline" permission. Without these, Setup > Timeline will not appear.
2. **Audit object relationships** — For each object to be surfaced, trace the relationship path to Account. Document the lookup field name used. Flag any objects that do not have an Account path before proceeding.
3. **Create timeline categories in Setup** — Navigate to Setup > Timeline > Categories and add any new category values needed (e.g., "Medications", "Encounters", "Labs", "Custom Visits"). Note the exact label spelling — it must match the `timelineCategory` field in the metadata exactly.
4. **Author and deploy TimelineObjectDefinition metadata** — Create one XML file per object in the `timelineObjectDefinitions/` metadata folder. Set `active` to `true`, choose the correct date field, and assign the correct timeline category. Deploy via SFDX (`sf project deploy start`) or Metadata API.
5. **Place the Industries Timeline component on the page layout** — In App Builder, open the patient or member record page and add the `Industries Timeline` component. If the legacy component is present, remove it in the same deployment to avoid duplicate entries.
6. **Validate with representative records** — Open 2–3 patient records that have data in each configured object. Confirm entries appear in the correct date order, under the correct category, with the correct icon and label.
7. **Document the configuration** — Record each TimelineObjectDefinition, its object, date field, and category in the org's admin runbook. Future administrators will need this to diagnose gaps or add new object types.
---
## Review Checklist
Run through these before marking work in this area complete:
- [ ] All target objects have a confirmed Account relationship path (direct lookup or chain)
- [ ] All referenced timeline category values exist in Setup > Timeline > Categories with exact spelling match
- [ ] All TimelineObjectDefinition metadata records are set to `active: true` and deployed successfully
- [ ] Industries Timeline component is on the page layout; legacy HealthCloud.Timeline component is removed if present
- [ ] Timeline renders correctly on at least 2 representative patient records with real data
- [ ] API version in project configuration is v55.0 or later
- [ ] Admin runbook updated with new TimelineObjectDefinition entries and relationship field names
---
## Salesforce-Specific Gotchas
Non-obvious platform behaviors that cause real production problems:
1. **Legacy component deprecation is silent in production** — The legacy `HealthCloud.Timeline` managed-package component continues to function after deprecation; Salesforce does not force-remove it. Orgs discover the deprecation only when they hit a bug that Salesforce will not fix or when a new Health Cloud release breaks the component. Proactive migration to the Industries Timeline is the only safe path.
2. **Category name mismatch silently drops timeline entries** — If the `timelineCategory` value in a `TimelineObjectDefinition` does not match an active category in Setup > Timeline > Categories (case-sensitive, exact match), the object's records will not appear in the filter picklist and will render uncategorized or not at all depending on component settings. There is no deployment-time validation of this mismatch.
3. **Account relationship is strictly required — Contact-only objects cannot appear** — Practitioners who design custom Health Cloud objects with only a Contact lookup (no Account lookup) cannot surface those objects on the Enhanced Timeline regardless of workarounds. The component's query engine anchors to Account. Retrofitting an Account lookup onto an existing object with data requires a data migration and re-deployment.
---
## Output Artifacts
| Artifact | Description |
|---|---|
| `timelineObjectDefinitions/*.timelineObjectDefinition` | Deployable metadata XML files, one per object surfaced on the timeline |
| Timeline category configuration | Category values added in Setup > Timeline > Categories |
| App Builder page layout | Patient/member record page with Industries Timeline component placed and legacy component removed |
| Migration checklist | Tracking sheet for legacy-to-enhanced migration covering each previously configured object |
---
## Related Skills
- `health-cloud-patient-setup` — Person Account and patient record type setup required before timeline configuration makes sense; the timeline anchors to the patient's Account recordRelated Skills
health-cloud-patient-setup
Use this skill when configuring patient or member records in Salesforce Health Cloud — including Person Account enablement, Health Cloud patient record type creation, care team role configuration, patient card customization, and clinical data display. Trigger keywords: patient setup, Health Cloud person account, patient card component, care team roles, clinical data display. NOT for standard account setup, general CRM contact configuration, or non-Health-Cloud person account questions.
security-health-check
Use when running, interpreting, or acting on Salesforce Security Health Check results — reading the score, understanding risk categories, evaluating specific settings, creating or importing a custom baseline, querying the Tooling API programmatically, or planning remediation from findings. Triggers: 'security health check score', 'health check failing settings', 'custom baseline', 'remediate health check findings', 'fix risk'. NOT for org hardening implementation, permission model design, or broad baseline config beyond what Health Check directly measures.
experience-cloud-security
Use when configuring access controls, sharing, or site security for authenticated or guest Experience Cloud (community) users: external OWD, Sharing Sets, Share Groups, CSP, clickjack protection, guest user record access. NOT for internal sharing model configuration (use sharing-and-visibility).
headless-experience-cloud
Use when building custom frontends (React, Vue, mobile, static sites) that consume Salesforce CMS content via the Connect REST API headless delivery endpoint. Triggers: 'headless Salesforce CMS', 'deliver CMS content to external frontend', 'React app Salesforce content API', 'custom frontend Experience Cloud data', 'CMS delivery channel API'. NOT for standard Experience Builder site development. NOT for CMS Connect (3rd-party CMS federation into Experience Builder). NOT for Experience Cloud LWC components rendered inside a site.
experience-cloud-search-customization
Use this skill when configuring or extending search on an Experience Cloud site — covering Search Manager scope configuration, LWR vs Aura search component selection, federated search setup, guest user search access, and custom search result components. NOT for SOSL/SOQL query development. NOT for internal Salesforce global search or Einstein Search for agents.
experience-cloud-multi-idp-sso
Use this skill when configuring multiple identity providers (OIDC and/or SAML) on a single Experience Cloud site or across tenant-specific portals in the same org — covering auth provider registration, Start SSO URL routing, Federation ID mapping, RegistrationHandler implementation, and simultaneous SP+IdP topology. Trigger keywords: multiple identity providers Experience Cloud, multi-tenant SSO community portal, vendor and citizen portal same site, OIDC SAML both on login page, tenant-specific login routing community. NOT for internal Salesforce employee SSO configuration. NOT for single auth provider setups — see experience-cloud-authentication for basic SSO.
experience-cloud-lwc-components
Use when building custom LWC components for Experience Cloud (Experience Builder sites, LWR portals, Aura-based communities). Covers community context imports, guest user Apex access patterns, navigation API differences between LWR and Aura, and JS-meta.xml target configuration for Experience Builder exposure. NOT for internal LWC components deployed to Lightning App Builder or standard record pages (see lwc/lwc-development). NOT for Aura community components. Trigger keywords: build LWC for Experience Cloud, custom component community portal LWC, guest user LWC component, community context import salesforce, lightningCommunity target, @salesforce/community, guest Apex.
experience-cloud-authentication
Use when building custom login pages, social SSO flows, self-registration flows, or passwordless OTP login for Experience Cloud (community) sites. Trigger keywords: custom login page Experience Cloud, social SSO community portal, passwordless login Experience Cloud, self-registration custom flow, headless authentication community, auth provider OIDC SAML site. NOT for internal SSO configuration (use identity/sso skills). NOT for standard username/password authentication with no customization.
experience-cloud-api-access
Use this skill when configuring or troubleshooting API access for Experience Cloud external users and guest users: guest user Apex data access, Customer Community Plus or Partner Community REST/SOAP API access, external user OAuth scopes, and sharing enforcement on API responses. Trigger keywords: Experience Cloud API access external user, community user REST API, guest user API limits, Customer Community API permissions, external user OAuth. NOT for internal Salesforce API authentication, non-community OAuth flows, or internal user API security.
net-zero-cloud-setup
Use this skill when configuring Salesforce Net Zero Cloud — including Scope 1/2/3 emission source modeling via the StnryAssetCrbnFtprnt / VehicleAssetCrbnFtprnt / Scope3CrbnFtprnt object families, emission factor library setup (EmssnFctr / EmssnFctrSet), DPE-driven carbon calculation jobs, supplier engagement scoring, and CSRD / ESRS / TCFD disclosure pack mapping. Triggers on: Net Zero Cloud setup, Sustainability Cloud carbon accounting, Scope 1 2 3 emissions Salesforce, emission factor library, supplier engagement Net Zero, ESG disclosure pack mapping. NOT for ESG content scoring (use Marketing Cloud), NOT for general financial reporting (use Accounting Subledger), NOT for energy-only utility billing (use Energy & Utilities Cloud).
manufacturing-cloud-setup
Use this skill when configuring Salesforce Manufacturing Cloud — including Sales Agreement setup, Account-Based Forecasting (ABF) recalc jobs, run-rate management, Rebate Management programs, channel inventory tracking via Channel Revenue Management, and Group Membership / OrderItem-to-SalesAgreement reconciliation. Triggers on: Manufacturing Cloud setup, Sales Agreement Salesforce, account-based forecast recalculation, run rate manufacturing, rebate program setup, channel revenue management. NOT for general Sales Cloud opportunity-to-order flow (use standard Opportunity / Order), NOT for Field Service install-base management (use FSL skills), NOT for Automotive Cloud dealer modeling (use automotive-cloud-setup).
data-cloud-zero-copy-federation
Use this skill when configuring or troubleshooting Data Cloud Zero Copy / Lakehouse Federation against Snowflake, Databricks, BigQuery, or Redshift — including external Data Lake Object setup, query semantics through federation, refresh and cache behavior, and choosing federation versus physical ingestion. Triggers on: Data Cloud federated DLO setup, query latency against external warehouse, Snowflake/Databricks/BigQuery integration with Data Cloud, federation vs ingestion decision. NOT for physical Ingestion API streaming/bulk patterns (use data-cloud-integration-strategy), not for CRM Analytics external connectors (use analytics-external-data), not for outbound Data Cloud activation to external systems (use data-cloud-activation-development).