Write Effective Instructions for AI Agent in Agentforce Operations

When configuring a task assigned to an AI agent, use these guidelines to write effective instructions in the Description field in Agentforce Operations. Clear instructions lead to more reliable results.

Required Editions

License Required

This feature is a workspace that’s external to your Salesforce org and requires an Agentforce Operations license.

To purchase an Agentforce Operations license, contact your Salesforce account executive.

Instruction Writing Guidelines

  • Include all required instructions in the Description field.
  • Keep instructions clear and concise.
  • For multi-step work, list the steps in order.
  • To use a field’s value in the instructions, add a merge field by @ mentioning the field, such as @Supplier Name or @Invoice Number. Learn more about @ mentioning fields in the Description field in Configuring Tasks.
  • For document extraction, instructions in the Description field are optional unless you want to explain an edge case.
  • For .docx templates, match variable placeholders exactly, such as {{ supplier_name }} and {{ invoice_number }}.
  • Test the AI agent task. If your instructions don't result in the output you want, revise the instructions and test again. Editing the task erases any saved plan, so run the test again to generate and save a new plan before publishing.

Instruction Examples

Use Case Good Example Needs Improvement
Triage

Review the Invoice Amount field and classify the invoice by using these rules:

  • High priority: Invoice Amount is greater than $50,000
  • Medium priority: Invoice Amount is between $10,000 and $50,000
  • Low priority: Invoice Amount is less than $10,000

Enter the result in the Priority field.

Prioritize the invoice based on importance.
Fill .docx Template

Use the shared fields to populate the contract template. Variable placeholders must match exactly:

  • {{ supplier_name }} — use the value from Supplier Name
  • {{ contract_start_date }} — use the value from Contract Start Date
  • {{ total_value }} — use the value from Contract Value
Fill in the template with the supplier info.
Audit

Review the purchase order by using these steps:

1. Check the Vendor Name field against the Approved Vendor List field. If the vendor isn’t on the list, enter "Unapproved vendor" in the Audit Result field and stop.

2. Check the PO Amount field. If it exceeds the value in the Spending Limit field, enter "Exceeds spending limit" in the Audit Result field and stop.

3. If all checks pass, enter "Approved" in the Audit Result field.

Check the purchase order and make sure that everything looks right.