sshvarzman-salesforce/claude-skills

authoring-record-summary-prompt-templates

Build a RECORD SUMMARY type Salesforce prompt template (GenAiPromptTemplate type=einsteingptrecordSummary) that renders an AI briefing on a record's page / Record Summary component / agent record-summary — grounded in that record AND related records (parent…

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/sshvarzman-salesforce/claude-skills --skill authoring-record-summary-prompt-templates

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Authoring Record Summary Prompt Templates

What this skill is for

A Record Summary prompt template is a GenAiPromptTemplate of type=einstein_gpt__recordSummary. It renders an AI-written summary of one record on that record's page (the Einstein Record Summary component / "Summarize" on the record, and agent record-summary surfaces). It is bound to a specific object and receives the record itself as input — not a free String.

This is a DIFFERENT template type from a einstein_gpt__flex template (see the companion skill calling-prompt-templates-in-flows, Pattern B). The grounding engine — a Capability PromptFlow data provider that reads the record + related records + getConvTscpForRecord transcript — is identical and reusable. Only the template wrapper changes. This skill is the record-summary wrapper; reuse the flex skill's PromptFlow guidance for the data provider.

Verified reference ships in `assets/`: inh-record-summary-template.genAiPromptTemplate-meta.xml — a working Active einstein_gpt__recordSummary template on Case whose data provider is a Capability PromptFlow that reads the INH child case, its PARENT case, the parent's VoiceCall/MessagingSession transcript, the Contact, and the Account, and emits a 4-section specialist briefing (Situation / What to focus on / Key facts / Flags). inh-record-summary-context.flow-meta.xml is that PromptFlow.

The five things that make it a RECORD SUMMARY template (not flex)

Diff a record-summary template against a flex one and exactly these differ:

ElementRecord Summary (einstein_gpt__recordSummary)Flex (einstein_gpt__flex)
<type>`einstein_gpt__recordSummary`einstein_gpt__flex
<relatedEntity>present — the object the summary renders on, e.g. <relatedEntity>Case</relatedEntity>absent
the inputthe record itself: apiName=objectToSummarize, definition=SOBJECT://Case, referenceName=Input:Case, required=truea primitive://String (e.g. recordId)
data-provider parammaps recordId to the record's Id: valueExpression={!$Input:Case.Id}{!$Input:recordId} or similar
<fileDroppingStrategy>present (e.g. {"dropFilesBy":"LAST_MODIFIED_DATE","dropFileStartingWith":"OLDEST"})absent

Everything else — <content> referencing {!$Flow:<PromptFlow>.Prompt}, the <templateDataProviders> block pointing at flow://<PromptFlow>, primaryModel, status, visibility — is the same.

The exact record-summary template shape (copy this)

xml
<?xml version="1.0" encoding="UTF-8"?>
<GenAiPromptTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
    <developerName>INH_Record_Summary_Updated</developerName>
    <masterLabel>INH Record Summary Updated</masterLabel>
    <relatedEntity>Case</relatedEntity>                                  <!-- bind to the object -->
    <templateVersions>
        <content>You brief the specialist... Use ONLY the facts below; never invent.

{!$Flow:INH_Record_Summary_Context.Prompt}</content>
        <fileDroppingStrategy>{"dropFilesBy":"LAST_MODIFIED_DATE","dropFileStartingWith":"OLDEST"}</fileDroppingStrategy>
        <inputs>
            <apiName>objectToSummarize</apiName>                         <!-- FIXED api name -->
            <definition>SOBJECT://Case</definition>                      <!-- the record, not a String -->
            <referenceName>Input:Case</referenceName>                    <!-- Input:<Object> -->
            <required>true</required>
        </inputs>
        <isCitationEnabled>false</isCitationEnabled>
        <primaryModel>sfdc_ai__DefaultGPT5Mini</primaryModel>
        <status>Published</status>
        <templateDataProviders>
            <definition>flow://INH_Record_Summary_Context</definition>
            <label>INH Record Summary Context</label>
            <parameters>
                <definition>primitive://String</definition>
                <isRequired>false</isRequired>
                <parameterName>recordId</parameterName>
                <valueExpression>{!$Input:Case.Id}</valueExpression>      <!-- pull Id off the SObject -->
            </parameters>
            <referenceName>Flow:INH_Record_Summary_Context</referenceName>
        </templateDataProviders>
    </templateVersions>
    <type>einstein_gpt__recordSummary</type>                             <!-- the type -->
    <visibility>Global</visibility>
</GenAiPromptTemplate>

Key joins:

  • The input `referenceName` is Input:<Object> (e.g. Input:Case); the body/data-provider

reference the Id as {!$Input:Case.Id}. The apiName is the fixed literal objectToSummarize.

  • The data-provider flow still takes a recordId String param — the template feeds it

{!$Input:Case.Id}. So a PromptFlow written for a flex template (String recordId input) is reused verbatim; you only rewrap it.


The data provider (reuse the flex Pattern B PromptFlow)

The grounding flow is a Capability PromptFlow (processType=PromptFlow, start.triggerType=Capability) with one `recordId` String input, that:

  1. Get_<Record> by Id = {!recordId}, storeOutputAutomatically=true, querying the

lookups you want to dereference (ParentId, ContactId, AccountId, …).

  1. AddPromptInstructions assignments ($Output.Prompt Add <stringValue>) that append

the record + related-record context using cross-object merge fields ({!Get_Case.Parent.Subject}, {!Get_Case.Contact.Name}, {!Get_Case.Account.Name}, …).

  1. A Decision that gates getConvTscpForRecord on the parent interaction

({!Get_Case.Parent.VoiceCall__c} IsNull false → voice; …Parent.Messaging_Session__c IsNull false → messaging; default → "no interaction linked"), each branch appending {!<Action>.conversationTranscript}. getConvTscpForRecord needs <flowTransactionModel>CurrentTransaction</flowTransactionModel> and is flow-only.

  1. A final AddPromptInstructions with the TASK (the sections you want the summary to produce).

Full PromptFlow authoring detail (merge-field grounding, transcript gating, gotchas) lives in calling-prompt-templates-in-flows Pattern B — do not duplicate it; this skill is just the record-summary wrapper.


Lifecycle

  1. Write + deploy the PromptFlow data provider (Active).
  2. Write the record-summary template status=Draft, deploy. For a FRESH template, do NOT

hand-manage versionIdentifier/activeVersionIdentifier — the server assigns on deploy.

  1. Retrieve the deployed template to read the server versionIdentifier, then set

<status>Published</status> + top-level <activeVersionIdentifier> = that hash, and redeploy — otherwise it is "No active template version". (Same flex-template publish dance; see flex-prompt-template-active-version-identifier memory.)

  1. Surface it: the record-summary template appears as the Einstein Record Summary

content for its <relatedEntity> object. Add the Record Summary / prompt-template component to that object's Lightning record page (admin step), or invoke the template with the record Id programmatically.


Smoke-test (Rule 0)

Record-summary templates are callable via ConnectApi.EinsteinLLM.generateMessagesForPromptTemplate with the SObject input. Pass Input:<Object> as a WrappedValue whose value is the record Id (the platform resolves the SObject). Confirm the briefing is grounded in the real record + transcript, not generic. Verified call shape:

apex
Map<String,ConnectApi.WrappedValue> inp = new Map<String,ConnectApi.WrappedValue>();
ConnectApi.WrappedValue v = new ConnectApi.WrappedValue(); v.value = '<recordId>';
inp.put('Input:Case', v);
ConnectApi.EinsteinPromptTemplateGenerationsInput req = new ConnectApi.EinsteinPromptTemplateGenerationsInput();
req.additionalConfig = new ConnectApi.EinsteinLlmAdditionalConfigInput();
req.additionalConfig.applicationName = 'PromptBuilderPreview';
req.isPreview = false; req.inputParams = inp;
String out = ConnectApi.EinsteinLLM.generateMessagesForPromptTemplate('<TemplateDevName>', req).generations[0].text;

(If the SObject input won't resolve from a bare Id in your org, test instead by adding the Record Summary component to the record page and viewing it there.)


Gotchas

  • `{!Get_<Record>.Owner.Name}` is NOT dereferenceable in a Flow — OwnerId is a polymorphic

User/Group lookup, so a merge field through .Owner.Name fails deploy with field integrity exception: invalid reference. Drop it or resolve the owner another way. Standard lookups (Parent, Contact, Account) dereference fine with storeOutputAutomatically.

  • The input apiName is the literal `objectToSummarize` and the definition is

SOBJECT://<Object> — not a String. Using a String input makes it a flex template, not a record summary, and it won't bind to the Record Summary component.

  • `<relatedEntity>` must match the object the record page is for, or the template won't be

offered as that object's Record Summary.

  • Converting a flex template to record-summary: you cannot flip <type> on a published

flex template cleanly (input shape changes from String to SObject = unsafe change). Create a NEW template dev name with the record-summary shape; keep the same PromptFlow.

  • Reuse everything else from calling-prompt-templates-in-flows Pattern B (transcript gating,

merge-field grounding, the publish version dance).

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
sshvarzman-salesforce
커뮤니티

activating-datacloud

Salesforce Data Cloud Act phase. Use this skill when the user manages activations, activation targets, data actions, or downstream delivery of Data Cloud audiences and data. TRIGGER when: user manages activations, activation targets, data actions, or downstream delivery of Data Cloud audiences and data. DO NOT TRIGGER when: the task is segment creation (use segmenting-datacloud), data retrieval/search work (use retrieving-datacloud), or STDM/session tracing (use observing-agentforce).

설치 수
1
GitHub Stars
0
업데이트
10월 15일
sshvarzman-salesforce
커뮤니티

agentforce-skills-research

Research Agentforce configuration patterns — topics, actions, instructions, CLTs, knowledge, planner behavior. Searches Salesforce docs, Trailhead, internal repos (git.soma), Slack channels, and Google Docs to find working examples, known issues, and best practices.

설치 수
1
GitHub Stars
0
업데이트
10월 15일
sshvarzman-salesforce
커뮤니티

harmonizing-datacloud

Salesforce Data Cloud Harmonize phase. Use this skill when the user works with DMOs, mappings, relationships, identity resolution, unified profiles, data graphs, or universal IDs. TRIGGER when: user works with DMOs, mappings, relationships, identity resolution, unified profiles, data graphs, or universal IDs. DO NOT TRIGGER when: the task is only about streams/DLOs (use preparing-datacloud), segments/insights (use segmenting-datacloud), retrieval/search (use retrieving-datacloud), or STDM/sessio

설치 수
1
GitHub Stars
0
업데이트
10월 15일
sshvarzman-salesforce
커뮤니티

preparing-datacloud

Salesforce Data Cloud Prepare phase. Use this skill when the user creates or manages Data Cloud data streams, DLOs, transforms, or Document AI configurations. TRIGGER when: user creates or manages Data Cloud data streams, DLOs, transforms, or Document AI configurations, or asks about ingestion into Data Cloud. DO NOT TRIGGER when: the task is connection setup only (use connecting-datacloud), DMOs and identity resolution (use harmonizing-datacloud), or query/search work (use retrieving-datacloud)

설치 수
1
GitHub Stars
0
업데이트
10월 15일