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

lsc-briefings

Skill10 starsChanged 29 days agoApache-2.0View on GitHub

Guides Briefings (Daily Podcasts) configuration and troubleshooting. Use when user asks about Briefings, Field Insights, Daily Podcasts, audio briefings, Kokoro TTS, PresentationContent, podcast text generation, or on-device audio.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always call MCP tools to get sourced documentation: Do not answer from general knowledge alone.

    line 8
  2. Distinctive:

    When the user asks about Briefings configuration, ask them which mode they prefer:

    line 25
  3. Distinctive:

    Default to guided setup when connected to an org, or documentation mode if no org is connected.

    line 30
  4. Distinctive:

    Do NOT search by perm set label — admins can name them anything

    line 81
  5. Distinctive:

    Ask the user which end user(s) will receive Briefings — never auto-assign

    line 115
  6. Very specific:

    Create LifeSciConfigRecord with LifeSciConfigCategoryId pointing to the "DbSchema" category, Type, IsActive=false

    line 132
  7. Very specific:

    Create LifeSciConfigFieldValue records for: SObject (DataType=OBJECT, ObjectValue), Type (DataType=PICKLIST, PicklistValue), OneWaySync …

    line 133
  8. Very specific:

    Create Status field value: FieldName=Status, DataType=PICKLIST, PicklistValue=Valid — REQUIRED for the record to show as Valid in Admin …

    line 134
  9. Very specific:

    Create parent LifeSciMobileMetadataRecord with IntegrationStatus=New, Status=New

    line 162
  10. Very specific:

    Create child LifeSciMobileMetadataRecord with ParentMobileMetadataRecId=<parentId>, ProfileId=<profileId>, IntegrationStatus=New, Status=New

    line 163
  11. Very specific:

    Update BOTH parent and child to Status=ValidationCompleted

    line 164
  12. Distinctive:

    No iOS native TTS fallback — Kokoro only

    line 175

≈ “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

How to Answer Briefings Questions

Always call MCP tools to get sourced documentation. Do not answer from general knowledge alone.

User asks about...Call this tool
Briefings overview, setup steps, how it workssearch_lsc_knowledge({ query: "Briefings Daily Podcasts setup" })
Briefings documentationget_lsc_module_docs({ module: "briefings" })
Check if Briefings is configuredcheck_briefings_config()
Check a specific user's accesscheck_briefings_config({ username: "user@org.com" })
DB Schema / mobile cache for Briefingslist_db_schema({ filter: "PresentationContent" })
Mobile cache statuscheck_mobile_cache_status()
Permission sets for Briefingslist_permission_sets()
Troubleshoot why Briefings isn't workingcheck_briefings_config() then diagnose_lsc_issue({ symptom: "<error>" })

Configuration Mode

When the user asks about Briefings configuration, ask them which mode they prefer:

  1. Show me the documentation — call search_lsc_knowledge({ query: "Briefings setup" }) and present the relevant sections
  2. Walk me through it — configure it directly in their org step-by-step (guided setup below)

Default to guided setup when connected to an org, or documentation mode if no org is connected.

Guided Setup Workflow

Step 1: Run Comprehensive Check

check_briefings_config()

Step 2: Report Findings

Present the diagnostic results. Highlight FAIL items that need attention.

Step 3: Fix Issues

For each issue found, use the appropriate tool:

IssueFix With
Briefings toggle OFFGuide user to Setup → Life Sciences for Customer Engagement Setup → Configure Briefings → Toggle ON
Missing permission setsassign_permission_set({ label: "...", usernames: [...] })
Missing Briefings permission (PermissionsStoriesUser/PermissionsStoriesAdmin)Guide user through clone + enable "Use Briefings" or "Manage Briefings" system permission
Account Summarization not configuredGuide to Setup → Configure Account Summarization
No Content DefinitionGuide to Configure Briefings → Manage Assignments
Scheduling flow not clonedGuide through clone + activate flow
Missing DB Schema configscreate_db_schema({ objectName: "PresentationContent" }) etc.
Stale mobile cachegenerate_mobile_metadata_cache({ profileNames: [...] })

Step 4: Verify

Re-run check_briefings_config() to confirm all issues are resolved.


Key Technical Details

Correct Object Names

  • PresentationContent — generated briefing records
  • PrstContentDefinition — content definition (NOT PresentationContentDefinition)
  • PrstCntntDefAssignment — profile assignments (NOT PresentationContentDefinitionAssignment)
  • PrstCntntUsageSummary — usage tracking (NOT PresentationContentUsageSummary)
  • PrvdAccountTerritorySummary — account summarization output

System Permissions (queryable via boolean fields on PermissionSet)

The feature shipped as Briefings in production (262). The API/XML names use the legacy Stories naming — they were not renamed when the feature was rebranded. Both are correct.

UI Label (Setup)SOQL field on PermissionSetXML <name> in metadataWho needs it
Manage BriefingsPermissionsStoriesAdminStoriesAdminAdmins
Use BriefingsPermissionsStoriesUserStoriesUserEnd users (reps)
  • Query: SELECT Id, Label FROM PermissionSet WHERE PermissionsStoriesAdmin = true AND IsCustom = true
  • Query: SELECT Id, Label FROM PermissionSet WHERE PermissionsStoriesUser = true AND IsCustom = true
  • Do NOT search by perm set label — admins can name them anything

Programmatic Creation of Cloned Permission Sets

Cloned perm sets can be created via metadata deploy (sf project deploy start). Do NOT include a <license> element — it causes deploy failures.

Admin perm set (StoriesAdmin):

<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Life Sciences Commercial Admin - Briefings</label>
    <hasActivationRequired>false</hasActivationRequired>
    <userPermissions>
        <enabled>true</enabled>
        <name>StoriesAdmin</name>
    </userPermissions>
</PermissionSet>
  • Auto-assign to the currently authenticated admin user (the user running this configurator)

End user perm set (StoriesUser):

<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Life Sciences [Role] - Briefings</label>
    <hasActivationRequired>false</hasActivationRequired>
    <userPermissions>
        <enabled>true</enabled>
        <name>StoriesUser</name>
    </userPermissions>
</PermissionSet>

Determining which base role to name the cloned set after:

  1. Ask the user which end user(s) will receive Briefings — never auto-assign
  2. Query those users' profiles: SELECT Id, Profile.Name FROM User WHERE Username = '<username>'
  3. Map profile to role name for the label:
End User ProfileBase Perm Set (reference)Suggested Cloned Label
Field Sales RepresentativeLifeSciencesFieldSalesRepresentative"Life Sciences Field Sales Rep - Briefings"
Key Account ManagerLifeSciencesKeyAccountManager"Life Sciences KAM - Briefings"
Medical Science LiaisonLifeSciencesFieldMedical"Life Sciences MSL - Briefings"

Assignment rules:

  • Admin perm set → assign to current authenticated user (auto, no need to ask)
  • End user perm set → always ask user for specific username(s) — never guess or auto-assign based on profile

Required DB Schema Records

These can be created programmatically via the Tooling API (v67+). Use LifeSciConfigRecord and LifeSciConfigFieldValue objects. Each record requires:

  1. Create LifeSciConfigRecord with LifeSciConfigCategoryId pointing to the "DbSchema" category, Type, IsActive=false
  2. Create LifeSciConfigFieldValue records for: SObject (DataType=OBJECT, ObjectValue), Type (DataType=PICKLIST, PicklistValue), OneWaySync (DataType=BOOLEAN, HasBooleanValue=true for Unidirectional, false for Bidirectional), WhereSoql (DataType=LONGTEXT, LongTextValue)
  3. Create Status field value: FieldName=Status, DataType=PICKLIST, PicklistValue=Valid — REQUIRED for the record to show as Valid in Admin Console
  4. Update LifeSciConfigRecord.IsActive = true
Config NameObjectTypeSyncWHERE Clause
DbSchema_PresentationContentPresentationContentDATAUnidirectional(EffectiveStartDate = NULL OR EffectiveStartDate <= TODAY) AND EffectiveEndDate >= TODAY AND (TargetUserId = '{USER.ID}' OR TargetUserId = NULL) AND (TerritoryId = '{USER.TERRITORYID}' OR TerritoryId = NULL)
DbSchema_PrstCntntUsageSummaryPrstCntntUsageSummaryDATABidirectionalUserId = '{USER.ID}' AND PresentationContentId IN (SELECT Id FROM PresentationContent WHERE (EffectiveStartDate = NULL OR EffectiveStartDate <= TODAY) AND (EffectiveEndDate >= TODAY OR EffectiveEndDate = NULL) AND (TargetUserId = '{USER.ID}' OR TargetUserId = NULL) AND (TerritoryId = '{USER.TERRITORYID}' OR TerritoryId = NULL))
DbSchema_PrstCntntDefAssignmentPrstCntntDefAssignmentCONFIGURATIONUnidirectionalIsActive = true
DbSchema_PrstContentDefinitionPrstContentDefinitionCONFIGURATIONBidirectional(none)

Briefings Icon Visibility (Two Conditions)

The Briefings icon appears in the mobile app ONLY when BOTH:

  1. User's profile is in an active PrstCntntDefAssignment
  2. User has read access to PresentationContent object

Key Flows

Flow ApiNameTypeExpected State
SchdDlyBriefingsOfPrvdAcctOriginal scheduling template (managed)Should exist, NOT active
(admin's clone — any name)Cloned scheduling flowShould be ACTIVE with Daily frequency
GenDailyBriefingsTextText generation flow (managed)Should exist, ACTIVE
Generate Provider Account Territory SummaryAccount SummarizationShould exist, ACTIVE

Important: The scheduling flow clone can have any label/ApiName the admin chooses. Do NOT search for it by name. Verify the pipeline outcome (PresentationContent records being generated) instead.

Metadata Cache Generation (Programmatic)

To generate the mobile metadata cache via API:

  1. Create parent LifeSciMobileMetadataRecord with IntegrationStatus=New, Status=New
  2. Create child LifeSciMobileMetadataRecord with ParentMobileMetadataRecId=<parentId>, ProfileId=<profileId>, IntegrationStatus=New, Status=New
  3. Update BOTH parent and child to Status=ValidationCompleted
  4. POST to /services/data/v67.0/connect/life-sciences/commercial/metadata/actions/generate with body: {"parentMetadataRecordId":"<parentId>","apiVersion":"67.0","prefix":"lsc4ce"}
  5. Poll parent record until Status=Active (takes 2-5 minutes, poll every 15s)

The endpoint returns {"message":"Task enqueued for metadata cache generation."} on success. Status transitions: New → Loading → Processing → Active.

Limitations (262 GA)

  • English only — Kokoro TTS uses English pronunciation exclusively
  • 3,000 character limit per briefing
  • Daily frequency only — current day's visits only
  • Playlist not dynamically updated for same-day visit changes
  • No iOS native TTS fallback — Kokoro only

Common Issues

SymptomMost Likely Cause
Briefings icon not showingPermissionsStoriesUser not enabled in any assigned perm set, OR profile not in Content Definition Assignment, OR no read access to PresentationContent
No audio playingScheduled flow hasn't run, or no PresentationContent records generated
"sObject type PresentationContent is not supported"Briefings toggle is OFF OR admin user lacks StoriesAdmin permission. Verify with secondary check: SELECT Id FROM FlowDefinitionView WHERE Label LIKE '%Briefings%' — if flows exist, toggle is ON and the issue is permissions
Flow not foundManaged package (lsc4ce) not installed or wrong version
Briefings flows missingBriefings toggle was recently enabled — flows appear after toggle ON

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.