agentleFS
SalesforceLabsSalesforceLabs/afls-for-claude/skills/lsc-data-model/SKILL.md

lsc-data-model

Skill10 starsChanged 29 days agoApache-2.0View on GitHub

Expert knowledge of the Life Sciences Cloud (LSC) data model concepts. Use when user asks about LSC objects, relationships, or needs help understanding the data architecture. Always verify actual API names with describe_sobject.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When helping with data model questions:

    line 101
  2. Very specific:

    Use describe_sobject to find actual API names

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

LSC Data Model Expert

You are an expert on LSC data model concepts and architecture.

Important Note

LSC is built on Salesforce Health Cloud and Industry Cloud foundations. Object API names vary by:

  • LSC package version
  • Customer customizations
  • Implementation choices

Always use describe_sobject to verify actual object and field API names in the connected org.

Core Data Model Concepts

Account Hierarchy

  • Accounts - HCPs (Healthcare Professionals) and HCOs (Healthcare Organizations)
    • Often uses PersonAccount for individuals
  • HealthcareProvider - 1:1 with Account (PersonAccount). Each HCP Account has exactly one HealthcareProvider record linked via HealthcareProvider.AccountId. Do NOT describe this as 1:many.
  • Addresses - Multiple addresses per account (ContactPointAddress)
  • Affiliations - Relationships between accounts (e.g., doctor to hospital)
  • Account Ratings - Segmentation and scoring
  • Business Licenses - Professional licenses and certifications

Territory Structure

  • Uses Salesforce Enterprise Territory Management
  • Territory2 - Territory definitions
  • Territory2Model - Territory hierarchy model
  • Account-to-territory assignments
  • User-to-territory assignments

Visit/Call Model

  • Visit records - HCP/HCO interactions
  • Product discussions - Products detailed during visits
  • Samples dropped - Sample distribution records
  • Attendees - Additional visit participants

Sample Management

  • Sample Limits - Distribution limits per product/template
  • Provider Sample Limits - Limits applied to specific accounts
  • Sample transactions - Movement/distribution records
  • Sample inventory - Rep inventory levels

Content & Engagement

  • Consent records - Consent capture and tracking
  • Content/Presentations - CLM content
  • Activity Plans - Planning and goals

Key Relationships

Account to HealthcareProvider (1:1)

  • Each Account (PersonAccount / HCP) has exactly one HealthcareProvider record
  • HealthcareProvider.AccountId is a lookup back to the Account
  • This is a 1:1 relationship — never 1:many

Account to Territory

  • Accounts assigned to territories
  • Users see accounts based on territory membership
  • Territory hierarchy controls rollup reporting

Visit to Account

  • Visits link to Account
  • Products discussed via junction object
  • Samples recorded via junction object

OmniStudio Components (Web Only)

LSC uses OmniStudio on the web app only. OmniStudio components (FlexCards, OmniScripts, DataRaptors, Integration Procedures) are NOT available in the LSC Mobile app (iPad).

  • FlexCards - Provider Card, Visit Summary (web only)
  • DataRaptors - Data extraction and transformation
  • OmniScripts - Multi-step guided processes (web only)
  • Integration Procedures - Complex orchestrations

Using Tools to Explore

  1. describe_sobject - Get actual field names for any object
  2. run_soql - Query relationships and data
  3. search_lsc_knowledge - Find documentation on specific features
  4. get_lsc_module_docs - Get module-specific guidance

Objects That Require Tooling API or Metadata API (NOT SOQL)

NEVER use run_soql for these — it will fail:

FeatureCorrect approach
Compact LayoutsTooling API (sf data query --use-tooling-api) or retrieve_metadata
Admin Console settings (LifeSciConfigRecord)list_admin_settings, update_admin_setting
DB Schema records (LifeSciConfigFieldValue)list_db_schema, update_db_schema
Quick Actions / Custom Actionslist_lsc_actions, create_quick_action, etc.
Page Layoutsretrieve_metadata / deploy_metadata

Best Practice

When helping with data model questions:

  1. Explain the conceptual model from documentation
  2. Use describe_sobject to find actual API names
  3. Help construct queries with verified field names

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.