All articles

Agentforce

Agentforce customer verification: protect private actions

Connect verified customer identity to Agentforce action authorization. Check legacy-builder variables, record ownership and negative tests before rollout.

Knowing a customer’s email address does not authorize someone to read their cases. Treat identity verification and record access as separate checks.

For a private Agentforce action, establish the verified identity through the supported authentication or verification path. Then use that identity in server-side authorization for the requested record and operation. A prompt instruction to “only show your own records” cannot replace that check.

Match the setup to your builder

Salesforce’s standard verification subagent guide explicitly covers the legacy builder. It describes mapping verification outputs to variables, restricting private actions and passing the Verified Customer ID into action inputs. Leave the documented API-settable and LLM-use settings disabled for verification variables.

Those screen names are not instructions for every builder or agent type. Check the guide for your actual template and builder before changing an existing verification flow. Keep the application-side authorization tests even when you migrate the agent configuration.

Salesforce also introduced secure replacements for several service actions, using a verified customer ID. Inspect the actions attached to an older agent; changing topic instructions alone does not replace an old action.

Bind the request to the verified customer

A user can provide a case number, an email address or a record ID in conversation. Treat those values as search inputs. They should not override the authenticated identity carried into the action.

For example, consider an action that retrieves a case. It must establish that the verified customer is authorized for that case under your business rules before returning its details. The relationship might be a direct contact relationship, an approved account relationship or another explicit entitlement. Define it in code or a controlled workflow, not in the model’s interpretation of the conversation.

The agent’s Salesforce execution user can have broader access than the person chatting with it. Review both layers. A query that succeeds for the execution user does not, by itself, establish the customer’s right to receive the result.

Return only the fields needed for the approved task. A verification success should not turn a narrow case-status action into unrestricted record search. Use a generic denial when a more detailed explanation would disclose the existence of another customer’s record.

Try the requests you intend to reject

Use synthetic customers and records for a negative test set. Keep these cases separate from the normal verified-customer example:

  • An unverified person asks for private case details.
  • Customer A is verified and requests Customer B’s case number.
  • A verified session includes a different customer ID in the message.
  • A verification attempt fails or the session is restarted.
  • The execution user has access to a record that the customer should not see.
  • A permitted action is asked to return extra private fields.

For each case, capture which action ran, the identity it received, the authorization decision and the fields returned. Inspect the response as well as the query result. A refusal followed by a revealing explanation can still expose information.

Check every private action before release

An agent may have separate actions for case lookup, contact changes and password-related tasks. Map the verification requirement for each one. Also inspect any alternate action that can retrieve the same underlying information.

Use the pilot worksheet to record the expected refusal and observed result. The worksheet is a starting point for testing, not a certification that your agent is secure. Keep the test evidence with the released agent configuration so a later action change triggers a new review.

Keep reading

All articles