Best practices for creating and using generative procedures for AI agents with agentic AI

<body>

<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="addon_ai-agents-adv">
<table>
<tbody>
<tr>
<td>
<strong>Add-on</strong>
</td>
<td>AI agents - Advanced</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body">
<p class="p">Generative procedures are AI-generated procedures that help power the decision-making
capabilities of <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8966284087066" target="_blank">AI agents with agentic AI</a>. Instead of building
scripted conversation flows in the dialogue builder, you can enter your business
policies and let the AI agent generate a procedure to map out the best path to
resolution. </p>
<p class="p">This article provides best practices about when to use generative procedures, as well as
how to write and optimize them. </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_rml_mq2_wfc">When to use a generative procedure or a dialogue</a></li>
<li class="li"><a class="xref" href="#topic_z4k_nq2_wfc">Tips for writing generative procedures</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
with agentic AI</a>
</li>
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610" target="_blank">Creating generative procedures for AI agents with
agentic AI</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_rml_mq2_wfc">
<h2 class="title topictitle2" id="ariaid-title2">When to use a generative procedure or a dialogue</h2>
<div class="body">
<p class="p">When determining whether to use a generative procedure or a dialogue to guide your AI
agent’s conversation flow, consider the following guidance. Then see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9041911005850#topic_elk_mcf_52c" target="_blank">Configure whether a use case uses a dialogue or
generative procedure</a>.</p>
<div class="p">
<div class="tablenoborder">
<table border="1" cellpadding="4" cellspacing="0" class="table" frame="border" id="topic_rml_mq2_wfc__table_l4x_vq2_wfc" rules="all" summary="">
<colgroup>
<col>
<col>
</colgroup>
<thead class="thead" style="text-align:left;">
<tr class="row">
<th class="entry nocellnorowborder" dir="ltr" id="d87e95" style="vertical-align:top;"><strong class="ph b">Use a generative procedure when…</strong></th>
<th class="entry cell-norowborder" dir="ltr" id="d87e99" style="vertical-align:top;"><strong class="ph b">Use a dialogue when…</strong></th>
</tr>
</thead>
<tbody class="tbody">
<tr class="row">
<td class="entry row-nocellborder" headers="d87e95" style="vertical-align:top;">
<ul class="ul" id="topic_rml_mq2_wfc__ul_amf_5q4_xfc">
<li class="li">A process is easy to break into clear and logical
steps.</li>
<li class="li">Your API use cases are straightforward and don’t require
multiple conditions.</li>
<li class="li">You want to use generative AI reasoning on top of a
response from your APIs.</li>
<li class="li">You want the AI agent to answer based on information
already contained in your knowledge source.</li>
</ul>
</td>
<td class="entry cellrowborder" headers="d87e99" style="vertical-align:top;">
<ul class="ul" id="topic_rml_mq2_wfc__ul_jyr_vq4_xfc">
<li class="li">A process is long and complex, with multiple branching
scenarios.</li>
<li class="li">You need to include multiple APIs calls and complex
conditions.</li>
<li class="li">You want to include rich-message formatting, such as
buttons, cards, and carousels.</li>
<li class="li">You don’t want the AI agent to deviate from a script,
especially for legal or financial use cases.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_z4k_nq2_wfc">
<h2 class="title topictitle2" id="ariaid-title3">Tips for writing generative procedures</h2>
<div class="body">
<p class="p">When <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610" target="_blank">creating a generative procedure</a>, keep the
following tips in mind. Adhering to these guidelines helps you write more effective
procedures.</p>
<ul class="ul" id="topic_z4k_nq2_wfc__ul_vrz_tt2_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>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_zkl_kw2_wfc">
<h3 class="title topictitle3" id="ariaid-title4">Use clear, specific language</h3>
<div class="body">
<p class="p">Write each step using simple, direct words. Avoid vague terms, jargon, 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-title5" class="topic nested2" id="topic_gz4_lw2_wfc">
<h3 class="title topictitle3" id="ariaid-title5">Break down complex tasks</h3>
<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-title6" class="topic nested2" id="topic_clh_mw2_wfc">
<h3 class="title topictitle3" id="ariaid-title6">Present steps in logical, sequential order</h3>
<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-title7" class="topic nested2" id="topic_l2w_mw2_wfc">
<h3 class="title topictitle3" id="ariaid-title7">Define clear conditions and actions</h3>
<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-title8" class="topic nested2" id="topic_g4m_nw2_wfc">
<h3 class="title topictitle3" id="ariaid-title8">Maintain consistent terminology</h3>
<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-title9" class="topic nested2" id="topic_sgb_4w2_wfc">
<h3 class="title topictitle3" id="ariaid-title9">Avoid combining multiple actions in one step</h3>
<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-title10" class="topic nested2" id="topic_ubh_nxg_zfc">
<h3 class="title topictitle3" id="ariaid-title10">Include requests for feedback before executing conditional steps</h3>
<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-title11" class="topic nested2" id="topic_v2s_4w2_wfc">
<h3 class="title topictitle3" id="ariaid-title11">Provide examples when helpful</h3>
<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-title12" class="topic nested2" id="topic_or2_qw2_wfc">
<h3 class="title topictitle3" id="ariaid-title12">Anticipate and handle errors</h3>
<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-title13" class="topic nested2" id="topic_u2b_rw2_wfc">
<h3 class="title topictitle3" id="ariaid-title13">Highlight critical steps</h3>
<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-title14" class="topic nested2" id="topic_b2v_rw2_wfc">
<h3 class="title topictitle3" id="ariaid-title14">Use an imperative, direct writing style</h3>
<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-title15" class="topic nested2" id="topic_jw4_sw2_wfc">
<h3 class="title topictitle3" id="ariaid-title15">Test, iterate, and update regularly</h3>
<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>
</div>
</body>