Best practices for writing generative procedures for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">Generative proceduresare flexible conversation flows that useagentic AIto guide an AI agent's responses and actions during a conversation with a customer.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>

<div class="body">

<p class="p"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10473649691418" target="_blank">Generative procedures</a> are flexible conversation flows that
use <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8966284087066" target="_blank">agentic AI</a> to guide an AI agent's responses
and actions during a conversation with a customer. </p>
<p class="p">This article provides some best practices for writing and optimizing procedures. When
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610" target="_blank">creating a generative procedure</a>, keep these
best practices in mind. Adhering to these guidelines helps you write more effective
procedures.</p>
<p class="p">This article contains the following topics: </p>
<ul class="ul" id="procedures_best_practices__ul_s2y_4q2_wfc">
<li class="li"><a class="xref" href="#topic_zkl_kw2_wfc">Use clear, specific language</a></li>
<li class="li"><a class="xref" href="#topic_gz4_lw2_wfc">Break down complex tasks</a></li>
<li class="li"><a class="xref" href="#topic_clh_mw2_wfc">Present steps in logical, sequential order</a></li>
<li class="li"><a class="xref" href="#topic_l2w_mw2_wfc">Define clear conditions and actions</a></li>
<li class="li"><a class="xref" href="#topic_g4m_nw2_wfc">Maintain consistent terminology</a></li>
<li class="li"><a class="xref" href="#topic_sgb_4w2_wfc">Avoid combining multiple actions in one step</a></li>
<li class="li"><a class="xref" href="#topic_ubh_nxg_zfc">Include requests for feedback before executing conditional steps</a></li>
<li class="li"><a class="xref" href="#topic_v2s_4w2_wfc">Provide examples when helpful</a></li>
<li class="li"><a class="xref" href="#topic_or2_qw2_wfc">Anticipate and handle errors</a></li>
<li class="li"><a class="xref" href="#topic_u2b_rw2_wfc">Highlight critical steps</a></li>
<li class="li"><a class="xref" href="#topic_b2v_rw2_wfc">Use an imperative, direct writing style</a></li>
<li class="li"><a class="xref" href="#topic_jw4_sw2_wfc">Test, iterate, and update regularly</a></li>
</ul>
<p class="p">Related articles: </p>
<ul class="ul" id="procedures_best_practices__ul_rts_rq2_wfc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9424547984026" target="_blank">Examples of generative procedures for AI
agents</a>
</li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10040865503898" target="_blank">Managing generative procedures</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_zkl_kw2_wfc">
<h2 class="title topictitle2" id="ariaid-title2">Use clear, specific language</h2>
<div class="body">
<p class="p">Write each step using simple, direct words in natural language. Avoid vague terms,
jargon, source code, and complex sentences to ensure the AI interprets instructions
correctly. Specify exactly what information is needed to avoid misunderstandings. </p>
<p class="p">Additionally, writing in English helps optimize flows. However, performance is still
the same in all major languages.</p>
<ul class="ul" id="topic_zkl_kw2_wfc__ul_kcm_xx2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: "Ask the customer to provide their 10-digit account number."</li>
<li class="li">
<strong class="ph b">Bad</strong>: "Request account info from the user." (It’s ambiguous what “account
info” means without more context.)</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_gz4_lw2_wfc">
<h2 class="title topictitle2" id="ariaid-title3">Break down complex tasks</h2>
<div class="body">
<p class="p">Divide complicated processes into smaller, focused steps. Each step should represent
a single, manageable action, improving clarity and execution.</p>
<ul class="ul" id="topic_gz4_lw2_wfc__ul_q33_by2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: <ol class="ol" id="topic_gz4_lw2_wfc__ul_srp_ny2_wfc">
<li class="li">“Verify customer identity. </li>
<li class="li">Check account balance. </li>
<li class="li">Process payment.”</li>
</ol>
</li>
<li class="li">
<strong class="ph b">Bad</strong>: "Verify identity and check balance and process payment in one step."
</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_clh_mw2_wfc">
<h2 class="title topictitle2" id="ariaid-title4">Present steps in logical, sequential order</h2>
<div class="body">
<p class="p">Arrange instructions in the order the AI should execute them, reflecting the actual
workflow. Use numbered or clearly structured lists.</p>
<ul class="ul" id="topic_clh_mw2_wfc__ul_fj5_by2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: Steps follow the natural flow: Greet → Verify → Diagnose →
Resolve/Escalate</li>
<li class="li">
<strong class="ph b">Bad</strong>: "Verify identity after escalating the issue." </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_l2w_mw2_wfc">
<h2 class="title topictitle2" id="ariaid-title5">Define clear conditions and actions</h2>
<div class="body">
<p class="p">Use explicit “If… then…” statements with precise instructions for each condition and
the resulting action or next step. This reduces ambiguity and guides
decision-making.</p>
<ul class="ul" id="topic_l2w_mw2_wfc__ul_xvm_cy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: “If the payment can’t be processed, then tell the user there was a
problem with the payment and ask them for a different payment method.”</li>
<li class="li">
<strong class="ph b">Bad</strong>: "If there’s a problem with payment, handle it accordingly." </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_g4m_nw2_wfc">
<h2 class="title topictitle2" id="ariaid-title6">Maintain consistent terminology</h2>
<div class="body">
<p class="p">Always use the exact same names for entities (for example, plans, policies, or
billing types) throughout the procedure to prevent confusion or misinterpretation.
Consistent naming prevents the AI from mixing terms. To see the already-created
entities, type a forward slash (/) or click the plus icon (+) in the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610#topic_ult_rs2_52c" target="_blank">procedure editor</a>.</p>
<ul class="ul" id="topic_g4m_nw2_wfc__ul_rjc_dy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: Always refer to "Premium Plan" when discussing that service
level.</li>
<li class="li">
<strong class="ph b">Bad</strong>: Alternate between "Premium Plan," "Gold Plan," and "top-tier
subscription." </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_sgb_4w2_wfc">
<h2 class="title topictitle2" id="ariaid-title7">Avoid combining multiple actions in one step</h2>
<div class="body">
<p class="p">If a step involves more than one major task, split it into separate steps to keep
instructions clear and unambiguous. This prevents skipping or misunderstanding
tasks.</p>
<ul class="ul" id="topic_sgb_4w2_wfc__ul_sqq_dy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: <ul class="ul" id="topic_sgb_4w2_wfc__ul_hqs_py2_wfc">
<li class="li">Step 1: Confirm the issue reported by the customer. </li>
<li class="li">Step 2: Provide troubleshooting steps based on issue type.</li>
</ul>
</li>
<li class="li">
<strong class="ph b">Bad</strong>: "Confirm the customer’s issue and then provide troubleshooting and
escalate if unresolved." </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested1" id="topic_ubh_nxg_zfc">
<h2 class="title topictitle2" id="ariaid-title8">Include requests for feedback before executing conditional steps</h2>
<div class="body">
<p class="p">Whenever you include a conditional step in your procedure, the AI agent should first
ask the customer a clarifying question to ensure that the conditional is ready to be
evaluated. This helps prevent the AI agent from sending the same reply twice. </p>
<p class="p">In other words: Tell → Ask → Conditional, instead of Tell → Conditional. </p>
<ul class="ul" id="topic_ubh_nxg_zfc__ul_iyw_4xg_zfc">
<li class="li">
<strong class="ph b">Good</strong>: “Here’s the policy. Do you need anything else?” Or, "Did that
answer your question?" Or, "Let me know if you have any questions about this."
<p class="p">The conditional branch then triggers only after the user’s reply,
eliminating a potential duplicate response.</p>
</li>
<li class="li">
<strong class="ph b">Bad</strong>: <ul class="ul" id="topic_ubh_nxg_zfc__ul_upk_pxg_zfc">
<li class="li">Step 1: The AI agent tells the user something, but doesn’t ask a
clarifying question. </li>
<li class="li">Step 2: A conditional branch that should run only if the user later asks
a very specific follow-up. <p class="p">Because the AI agent isn’t told to wait
between step 1 and step 2, it immediately evaluates the vague
condition, finds nothing to match, and resends the last message.
</p>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested1" id="topic_v2s_4w2_wfc">
<h2 class="title topictitle2" id="ariaid-title9">Provide examples when helpful</h2>
<div class="body">
<p class="p">Include contextual examples for common scenarios to clarify expected outcomes and
reduce ambiguity. Examples guide the AI’s tone and content.</p>
<ul class="ul" id="topic_v2s_4w2_wfc__ul_cll_2y2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: "If the customer says ‘My bill is too high,’ respond with: ‘I see
your charges include extra data usage this month.’"</li>
<li class="li">
<strong class="ph b">Bad</strong>: No example given, leaving the AI unsure how to respond.</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested1" id="topic_or2_qw2_wfc">
<h2 class="title topictitle2" id="ariaid-title10">Anticipate and handle errors</h2>
<div class="body">
<p class="p">Include instructions for error handling, such as what to do if data is missing,
incomplete, or contradictory, to ensure robustness and reliability.</p>
<ul class="ul" id="topic_or2_qw2_wfc__ul_c2w_2y2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: "If API returns 'timeout', retry up to 2 times. If still failing,
escalate the request."</li>
<li class="li">
<strong class="ph b">Bad</strong>: "If the API call fails, try again." (No retry limit or fallback.)
</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title11" class="topic nested1" id="topic_u2b_rw2_wfc">
<h2 class="title topictitle2" id="ariaid-title11">Highlight critical steps</h2>
<div class="body">
<p class="p">Use capital letters or other formatting techniques to emphasize important or
mandatory steps within the procedure, reducing the risk of compliance or operational
errors.</p>
<ul class="ul" id="topic_u2b_rw2_wfc__ul_anj_fy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: "VERIFY CUSTOMER IDENTITY BEFORE DISCLOSING ACCOUNT
INFORMATION."</li>
<li class="li">
<strong class="ph b">Bad</strong>: No emphasis on identity verification step. </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title12" class="topic nested1" id="topic_b2v_rw2_wfc">
<h2 class="title topictitle2" id="ariaid-title12">Use an imperative, direct writing style</h2>
<div class="body">
<p class="p">Write steps as commands or instructions (for example, “Check if…”, “Ask the
customer…”, or “Escalate the request if…”) to avoid uncertainty and vagueness.</p>
<ul class="ul" id="topic_b2v_rw2_wfc__ul_jgg_gy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: "Ask for the customer’s last payment date."</li>
<li class="li">
<strong class="ph b">Bad</strong>: "You might want to ask when they last paid." </li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title13" class="topic nested1" id="topic_jw4_sw2_wfc">
<h2 class="title topictitle2" id="ariaid-title13">Test, iterate, and update regularly</h2>
<div class="body">
<p class="p">Continuously test the procedure with real interactions, gather feedback, and revise
the steps as policies or customer needs evolve to maintain accuracy and customer
satisfaction.</p>
<ul class="ul" id="topic_jw4_sw2_wfc__ul_ubq_gy2_wfc">
<li class="li">
<strong class="ph b">Good</strong>: Review procedures monthly and adjust steps based on customer
feedback or policy changes.</li>
<li class="li">
<strong class="ph b">Bad</strong>: Write once and never revise.</li>
</ul>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/9424547622298",
"url": "https://support.zendesk.com/hc/en-us/articles/9424547622298",
"headline": "Best practices for writing generative procedures for AI agents",
"description": "You get best practices for writing generative procedures that guide AI agents by using clear, ordered, imperative steps with conditions, examples, and error handling.",
"articleSection": "AI agent best practices",
"datePublished": "2025-06-27T14:10:53+00:00",
"dateModified": "2026-08-05T15:38:36.195532+00:00",
"inLanguage": "en",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/9424547622298"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com",
"softwareAddOn": {
"@type": "SoftwareApplication",
"name": "AI agents",
"@id": "https://support.zendesk.com/hc/en-us/sections/8988994355994"
}
}
}</script>
</body>