13.2 Topic Definitions, Instructions, Actions & CRM/Data Cloud Grounding

Key Takeaways

  • Topics represent the fundamental boundary and capability units of an Agentforce agent, grouping related natural language instructions and executable actions under a discrete domain of agency authority.
  • Topic instructions define operational scope, statutory boundaries, behavioral tone, and procedural sequences; clear negative guardrails ('Never provide legal interpretations') are just as vital as positive instructions.
  • Agent actions can be declared using Invocable Flows, Invocable Apex, OmniStudio Integration Procedures, or Prompt Templates, with Atlas dynamically choosing which action to invoke based purely on semantic action and parameter descriptions.
  • Grounding anchors generative outputs in verified agency truth—leveraging PSS standard objects (IndividualApplication, BusinessLicenseApplication, Visit), Salesforce Knowledge, and Data Cloud unified constituent profiles.
  • High-stakes administrative state changes—including benefit terminations, license revocations, and financial disbursements—must strictly enforce human-in-the-loop (HITL) confirmation guardrails rather than full autonomous commitment.
Last updated: September 2026

13.2 Topic Definitions, Instructions, Actions & CRM/Data Cloud Grounding

Exam Focus: Autonomous agency requires precise administrative boundaries. On the AP-222 exam, candidates must understand how to configure Topics, author Natural Language Instructions, bind Standard and Custom Actions, and ground reasoning in CRM and Data Cloud architectures. Most crucially, candidates must master the governance boundary: knowing exactly when an action can be executed autonomously by an agent versus when statutory compliance mandates a deterministic Human-in-the-Loop (HITL) approval gate before committing data changes.


The Agentforce Configuration Hierarchy

In Agentforce, an agent does not operate as an unconstrained, open-domain chatbot. Instead, it is configured with a modular, highly structured capability hierarchy:

+-----------------------------------------------------------------------------------+
| Agentforce Configuration Model                                                    |
+-----------------------------------------------------------------------------------+
| AGENT: City Citizen Services Agent                                                |
|  |                                                                                |
|  +---> TOPIC 1: Permit Application Inquiries                                      |
|  |      |-- Instructions: Scope, boundary rules, identity verification steps       |
|  |      +-- Actions: GetPermitStatus (Flow), DownloadPermitDocument (IP)          |
|  |                                                                                |
|  +---> TOPIC 2: Building Inspection Scheduling                                    |
|  |      |-- Instructions: Inspection booking window, cancellation policies         |
|  |      +-- Actions: CheckInspectorAvailability (Apex), ScheduleVisit (Flow)      |
|  |                                                                                |
|  +---> TOPIC 3: Public Benefit Eligibility Inquiries                              |
|         |-- Instructions: Non-discrimination rules, means-testing guidelines       |
|         +-- Actions: QueryBenefitSchedule (IP), StageAssistanceRequest (Flow)     |
+-----------------------------------------------------------------------------------+

Topics: Defining Domains of Agency Capability

A Topic is a discrete operational domain that defines what an agent can understand and accomplish. Topics serve as the routing and compartmentalization boundary for the Atlas Reasoning Engine.

Key Components of a Topic Definition

  1. Topic Name: A concise, semantic identifier (e.g., Permit_Application_Status, Inspection_Management, SNAP_Benefit_Inquiries).
  2. Classification Description (Scope): A detailed natural language summary explaining the exact capabilities and boundaries of the topic. Atlas uses this description to calculate semantic similarity against user utterances. Example: `"Use this topic when a constituent asks about the progress, review status, assigned examiner, or required documents for a submitted building, electrical, or plumbing permit application."*
  3. Trigger Phrases (Optional / Guiding): Representative user questions that help anchor the topic's semantic vector embedding during classification.
  4. Assigned Actions: The library of discrete executable tools that the agent can trigger exclusively when operating within this topic.

Natural Language Instructions: Engineering Administrative Boundaries

Instructions are the heart of agent governance. They are not code; they are declarative natural language directives written in clear, imperative English that govern how Atlas reasons, what constraints it enforces, and how it behaves.

+-----------------------------------------------------------------------------------+
| Anatomical Structure of Robust Public Sector Topic Instructions                  |
+-----------------------------------------------------------------------------------+
| [1. Persona & Tone]     --> Objective, empathetic, professional, plain language   |
| [2. Scope & Boundaries] --> Explicit CAN and CANNOT rules; anti-advice guardrail   |
| [3. Authentication]     --> Identity verification requirements prior to disclosure|
| [4. Procedural Workflow]--> Ordered execution steps (Step 1 -> Step 2 -> Step 3)  |
| [5. Escalation Rules]   --> Conditions triggering immediate transfer to human     |
+-----------------------------------------------------------------------------------+

Public Sector Instruction Best Practices

  • Explicit Negative Guardrails: In government, what an agent must not do is just as critical as what it can do. Topic instructions must contain unambiguous prohibitions:
    • "You are strictly prohibited from providing legal interpretations of municipal codes. Always provide the verbatim ordinance text and direct the constituent to consult legal counsel."
    • "Never promise or guarantee application approval or benefit award amounts."
  • Identity Verification Mandate: Instructions must prevent unauthorized disclosure of PII:
    • "Before disclosing the status or inspection history of an IndividualApplication, verify that the constituent provides both the Application Number and the Primary Applicant Postal Code. If the postal code does not match the record, refuse disclosure and offer to transfer to a caseworker."
  • Deterministic Procedural Ordering: Guide the reasoning engine through explicit step-by-step logic:
    • "Step 1: Inquire if the constituent has their Application Record ID. Step 2: If yes, invoke GetApplicationDetails. Step 3: If status is 'Incomplete', query the DocumentChecklist to list missing items. Step 4: Ask the constituent if they wish to receive an upload link via SMS."

Standard & Custom Actions: The Agent's Tool Portfolio

While Topics and Instructions govern reasoning, Actions give the agent the power to act. Actions are invocable building blocks exposed to the platform.

Action TechnologyPrimary Architectural PurposeBest Public Sector Use Case
Invocable FlowsDeclarative CRUD operations, deterministic routing, and multi-step screen/autolaunched logic.Updating a constituent mailing address; scheduling or cancelling a Visit record; creating an ApprovalRequest.
Invocable ApexHigh-performance programmatic computation, complex SOQL/SOSL multi-table traversal, and external API calls.Validating complex parcel boundary polygons against GIS coordinates; cryptographic signature checks; bulk data lookups.
OmniStudio Integration Procedures (IP)Native Public Sector Solutions server-side orchestration engine; integrates Data Mappers and external systems.Calling an external state criminal justice database or state Medicaid system via Named Credentials; aggregating multi-source eligibility data.
Prompt Templates (Prompt Builder)Executing specialized LLM generative prompts (Flex, Field Generation, Record Summary).Generating a plain-language summary of a 50-page zoning board resolution or drafting an individualized notice of inspection findings.

[!IMPORTANT] The Power of Semantic Action Descriptions: Atlas relies exclusively on the Action Name, Action Description, and Parameter Descriptions to determine when and how to invoke an action. If an Invocable Flow has an ambiguous description like "Updates data", Atlas will fail to select it. The description must be explicit: "Queries the IndividualApplication record matching the Application Number and Postal Code, returning the current review status, assigned case officer, and pending document checklist items."


Grounding in Agency Data: RAG & Unified Profiles

Large Language Models are prone to confabulation (hallucination) if allowed to generate responses from pre-trained weights alone. In public administration, every statement must be defensible and grounded in verified institutional data.

+-----------------------------------------------------------------------------------+
| Retrieval-Augmented Generation (RAG) Grounding Pipeline                           |
+-----------------------------------------------------------------------------------+
| [Constituent Query] --> "What are the setbacks for building an ADU in Zone R-1?" |
|                               |                                                   |
|                               v                                                   |
| [Data Cloud Vector Search] -> Searches chunked municipal zoning PDF manuals       |
|                               |                                                   |
|                               v                                                   |
| [Grounding Payload] ------> Retrieved: Section 14.204.B: 5-ft side, 10-ft rear   |
|                               |                                                   |
|                               v                                                   |
| [Atlas + Trust Layer] ----> Synthesizes response citing exact Municipal Code      |
+-----------------------------------------------------------------------------------+

1. Grounding with CRM Standard Objects

Agentforce directly grounds prompts using records from the Public Sector Solutions data model:

  • IndividualApplication and BusinessLicenseApplication: Status, application type, submission date, renewal dates.
  • BusinessLicense: Active license numbers, expiration dates, conditions of operation.
  • Visit and RegulatoryCodeViolation: Scheduled inspection times, inspector contact details, recorded infractions, remediation deadlines.
  • BenefitAssignment and ProgramEnrollment: Active benefit schedules, disbursement allotments, household member eligibility.

2. Grounding with Salesforce Knowledge

Salesforce Knowledge articles serve as the authoritative truth for agency policies, standard operating procedures, and constituent FAQs. Using Retrieval-Augmented Generation (RAG), Atlas queries Knowledge articles semantically, extracting relevant paragraphs to compose accurate answers rather than improvising.

3. Data Cloud Unified Constituent Profiles & Vector Search

Through native integration with Salesforce Data Cloud, Agentforce accesses the Unified Individual record—resolving disparate identities across municipal tax systems, licensing boards, and public housing databases. Furthermore, Data Cloud's vector database ingests unstructured government documents (e.g., 500-page municipal codes, environmental impact reports, and agency policy manuals), chunking and embedding them for real-time semantic search.


Deterministic Guardrails: Human-in-the-Loop (HITL) Architecture

A critical domain on the AP-222 exam is designing guardrails for high-impact actions. Public agencies are governed by administrative law (such as the Administrative Procedure Act), which establishes that governmental deprivations of liberty, property, or public benefits require due process and authorized official adjudication.

Action Risk Classification Matrix

Action Risk CategoryAutonomous Execution Permitted?Architectural Implementation Pattern
Low Risk (Read / Query)YES (Fully Autonomous)Invocable Flow or IP queries record status, available inspection slots, or Knowledge articles and returns information directly to constituent.
Moderate Risk (Benign State Change)YES (With User Confirmation)Agent verifies intent with constituent before executing (e.g., "You are asking to reschedule your inspection from Monday to Wednesday. Should I confirm this change?"). Triggers Flow upon explicit 'Yes'.
High Risk (Constitutional / Legal Impact)STRICTLY PROHIBITED (HITL Mandated)Benefit Denial / Termination: Denying Medicaid or SNAP.
License Revocation / Suspension: Revoking a commercial contractor license.
Financial Disbursement: Releasing $10,000+ public grant funds.
Enforcement Citation: Issuing a formal fine or violation notice.

Designing the HITL Guardrail Pattern

When an agent handles a workflow involving high-risk actions, the architect must never expose a direct database-commit action (e.g., RevokeLicenseApex) to the agent. Instead, the architect implements a Staged Approval Pattern:

  1. The agent invokes an action named StageLicenseRevocationRequest.
  2. The action creates a pending ApprovalRequest or Case record assigned to a senior compliance officer.
  3. The agent utilizes a Prompt Template to draft an AI-generated Recommendation Dossier summarizing the facts, violated regulatory codes, and inspection evidence.
  4. The agent informs the constituent: "Your request/case has been staged and forwarded to the Senior Adjudication Board for formal human review. You will receive an official written determination within 5 business days."
  5. The human officer reviews the dossier in the Service Console, validates the evidence, and explicitly clicks Approve or Reject, ensuring compliance with legal due process.

💡 Real-World Exam Scenarios & Case Analysis

Scenario 1: Preventing Premature Benefit Denial

A state child welfare agency implements an Agentforce Service Agent to assist applicants inquiring about emergency childcare assistance vouchers. State policy mandates that only a certified human caseworker can formally reject an application for failure to meet income thresholds.

How must the Lead Architect configure the agent's actions and instructions?

  • Configuration: In the Childcare_Eligibility topic instructions, specify: "If an applicant's self-reported income exceeds statutory limits, explain the general threshold criteria, but NEVER state that the application is denied. Instead, invoke the CreateIntakeReviewTask action to assign the file to a caseworker for official means-testing verification."
  • Architectural Safeguard: Ensure no invocable action exists that allows the agent to update IndividualApplication.Status to 'Rejected' or 'Denied'.

Scenario 2: Connecting External Mainframes via OmniStudio Integration Procedures

A county health department needs an Agentforce agent to verify whether an applicant is currently receiving state-level unemployment compensation before determining eligibility for municipal food vouchers. The unemployment system is a legacy mainframe with a REST API secured by mutual TLS (mTLS).

Which action technology must the architect deploy to empower the agent?

  • Architectural Solution: Deploy an OmniStudio Integration Procedure (IP) configured with an HTTP Action pointing to a Named Credential that manages the mTLS certificate handshake.
  • Action Binding: In Agent Builder, register the Integration Procedure as a custom action within the Food_Assistance_Eligibility topic. Atlas autonomously passes the constituent's encrypted identifier to the IP, receives the structured JSON response, and continues its reasoning loop.
Loading diagram...
Topic Classification, Action Dispatching & Data Cloud Grounding Architecture
Test Your Knowledge

A county public assistance department is configuring an Agentforce Service Agent to assist constituents with Temporary Assistance for Needy Families (TANF). State administrative law mandates that no constituent may have their cash benefits terminated without formal notice and an administrative hearing. How must the Lead Architect configure the agent's actions to ensure compliance?

A
B
C
D
Test Your Knowledge

When configuring an Invocable Flow or OmniStudio Integration Procedure as a custom action in Agent Builder, what is the most critical element that enables the Atlas Reasoning Engine to correctly determine WHEN and HOW to execute that action?

A
B
C
D
Test Your Knowledge

A municipal building authority wants its Agentforce agent to accurately answer citizen questions about complex, 400-page local building codes and zoning ordinances without hallucinating. Which architectural pattern should the consultant implement?

A
B
C
D