Let self-service read the verified account
The account agent's one Salesforce tool, getMyAccount, runs the
stack's Read the verified account module. The module reads the account in the
contact's accountId attribute, with no input from the model, and
refuses an accountId that isn't a Salesforce account ID, such as an
account number, so the AI agent then has no account data. Your inbound flow sets
accountId after it verifies the customer, so your flow decides whose
account the account agent reads.
The AI agent receives these fields:
-
From the account:
Id,Name,Phone,AccountNumber,CreatedDate,BillingCity,Typeand the owner's name (Owner.Name). -
From each of up to six of its most recent cases, open cases first:
Id,CaseNumber,Subject,Status,IsClosed,Priority,CreatedDate, the owner's name (Owner.Name),Origin,Type,ReasonandLastModifiedDate.
It receives no contacts. You control what the AI agent says to the customer in two places: the self-service prompt, which tells it what to share, and the integration user's field access, which your Salesforce administrator sets. Salesforce returns only the fields the integration user can read.
Make the account agent the Self service default when every
self-service flow on the assistant sets accountId from verified data,
or to -, before its Connect assistant block:
-
Set
accountIdafter you authenticate the customer, such as with your IVR's PIN check or your signed-in website callingStartChatContact. A value the customer types is not verification. -
The guide also writes
accountIdwhen an agent finds an account by search, so a contact an agent has worked carries the account that agent picked. Route contacts to the AI self-service flow from your inbound flow, before an agent works them.
To add another tool to a self-service AI agent safely, give it a flow module of
your own that reads the record IDs it acts on from verified contact attributes, as
Read the verified account does, and that takes no record ID, query or search text
from the model. Build it as in Extend the guide with flow modules, and add it to the AI
agent and its security profile. A gateway tool added directly, such as
queryAccounts or composite, takes its record IDs from the
model, and so reads whichever account the conversation names.
To make it the default, run the console steps script with
set and enter account; to go back,
enter knowledge.