---
schema_version: "1"
id: 0fd08e87615c087e15b124086127777fd8bbaba055a9f9c01b1c3fba13906704
title: Write Effective Instructions for AI Agent in Agentforce Operations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/automate_afsc_write_effective_ai_agent_prompts.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.automate_afsc_write_effective_ai_agent_prompts.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 200985e0b201b35c8225119f43133964cf097168540d8ae1004b788f6f68e86e
description: 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.
products:
  - Cross Cloud
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col>
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="colgroup" class="slds-cell-wrap" colspan="1" style="text-align:left;vertical-align:top;" id="d9160e37">License Required</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="License Required" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e37 ">
            <p>This feature is a workspace that’s external to your Salesforce org and requires
              an Agentforce Operations license. </p>
            <p style="margin-bottom:0;">To purchase an Agentforce Operations license, contact your Salesforce account
              executive.</p>
          </td>

        </tr>
      </tbody>
    </table>

## 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](https://help.salesforce.com/s/articleView?id=platform.automate_afsc_tasks_configuring.htm&release=264.0.0&type=5 "Choose the task type that matches the work you want to accomplish. Learn how to create standard tasks, approval tasks, and email notification 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d9160e124">Use Case</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d9160e126">Good Example</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d9160e128">Needs Improvement</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Use Case" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e124 ">Triage</td>

            <td data-label="Good Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e126 ">
              <p>Review the Invoice Amount field and classify the invoice by using these rules:</p>
              <ul>
                <li>High priority: Invoice Amount is greater than $50,000</li>

                <li>Medium priority: Invoice Amount is between $10,000 and $50,000</li>

                <li>Low priority: Invoice Amount is less than $10,000</li>

              </ul>
              <p style="margin-bottom:0;">Enter the result in the Priority field.</p>
            </td>

            <td data-label="Needs Improvement" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e128 ">Prioritize the invoice based on importance.</td>

          </tr>
          <tr class="">
            <td data-label="Use Case" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e124 ">Fill .docx Template</td>

            <td data-label="Good Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e126 ">
              <p>Use the shared fields to populate the contract template. Variable placeholders must
                match exactly:</p>
              <ul>
                <li>{{ supplier_name }} — use the value from Supplier Name</li>

                <li>{{ contract_start_date }} — use the value from Contract Start Date</li>

                <li>{{ total_value }} — use the value from Contract Value</li>

              </ul>
            </td>

            <td data-label="Needs Improvement" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e128 ">Fill in the template with the supplier info.</td>

          </tr>
          <tr class="">
            <td data-label="Use Case" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e124 ">Audit</td>

            <td data-label="Good Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e126 ">
              <p>Review the purchase order by using these steps:</p>
              <p>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. </p>
              <p>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.</p>
              <p style="margin-bottom:0;">3. If all checks pass, enter "Approved" in the
                Audit Result field.</p>
            </td>

            <td data-label="Needs Improvement" class="slds-cell-wrap" style="vertical-align:top;" headers="d9160e128 ">Check the purchase order and make sure that everything looks right.</td>

          </tr>
        </tbody>
      </table>

#### See Also

- [AI Agent Limits and Considerations in Agentforce Operations](https://help.salesforce.com/s/articleView?id=platform.automate_afsc_ai_agent_limits.htm&release=264.0.0&type=5 "Review AI agent limitations and considerations before assigning a task to an agent.")
- [Task Types in Agentforce Operations](https://help.salesforce.com/s/articleView?id=platform.automate_afsc_tasks_configuring.htm&release=264.0.0&type=5 "Choose the task type that matches the work you want to accomplish. Learn how to create standard tasks, approval tasks, and email notification tasks.")
- [Troubleshoot AI Agent Tasks in Agentforce Operations](https://help.salesforce.com/s/articleView?id=platform.automate_afsc_ai_agent_troubleshooting.htm&release=264.0.0&type=5 "Use this guide to diagnose and fix common AI agent issues in Agentforce Operations.")