What is Soft and Hard Rule Mapping in Agentforce architecture?

In Agentforce architecture, classify every business rule as soft (instruction-level) or hard-enforced, and name the exact enforcement point for each hard rule. This guide explains the design decisions, controls, and implementation checks needed to apply the pattern in production.

Not every rule an agent follows carries the same weight. Soft rules live in instructions: tone guidelines, preferred phrasing, suggested escalation paths. The model reads them, but a determined user or an edge-case prompt can talk around them. Hard rules are enforced by the platform itself - validation logic, action filters, permissions, flows - and the model cannot bypass them no matter how the conversation goes.

The failure mode is treating everything as soft. When a refund limit, eligibility check, or compliance restriction exists only in the agent's instructions, enforcement depends on the model's compliance in every single turn. Mapping rules to their enforcement layer makes control explicit and auditable.

Prompt design recipe combining objective, context, constraints, and format

Separate instruction from enforcement

  • Soft rules shape behavior through instructions and are appropriate for style, tone, and preference-level guidance.
  • Hard rules constrain what is possible and belong in platform mechanisms the model cannot override.
  • Every hard rule names exactly one enforcement point, such as an action filter, variable guard, Apex validation, or permission check.
  • Anything with financial, legal, or safety impact defaults to hard enforcement, with instructions used only to explain the rule to the user.

Build the rule map

  1. List every business rule the agent is expected to follow and tag each one as soft or hard.
  2. For each hard rule, record the enforcing component: action filter on the agent action, conditional variable logic, flow decision, or org permission.
  3. Use action filters and input validation so ineligible requests fail deterministically before the action runs, regardless of what the model decided.
  4. Probe the mapping in testing by attempting prompt-level bypasses of each hard rule and confirming the platform still blocks the action.
Further reading

Resources

This Tucario article is based on the following Salesforce learning and product documentation.

Continue the architecture path
ControlVariables and Action Filters

Hide actions from the model when deterministic business conditions are not satisfied.

ControlConditional Logic for Agent Context

Route prompts and action paths from explicit variables and evaluated conditions.

ControlFlows, Actions, and Permissions

Combine deterministic automation and platform access controls.