Creating and using templates in conversation flows for AI agents

<body>
<p id="docs-hc-snippet" style="display: none;">A template is a centralized reply that you can link to from multiplegenerative proceduresordialogues. Templates are useful for:</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 template is a centralized reply that you can link to from multiple <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10473649691418" target="_blank">generative procedures</a> or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749494810" target="_blank">dialogues</a>. Templates are useful for: </p>
<div class="p">
<ul class="ul" id="templates_draft_conversation_flows__ul_wrh_pcj_vjc">
<li class="li">Building reusable patterns, such as user authentication or data collection</li>
<li class="li">Creating copies of dialogues that are live in production to create backups, make edits
in draft form, save for later reuse </li>
<li class="li">Inserting scripted conversation flows in the middle of an otherwise flexible generative
procedure</li>
</ul>
<div class="note" id="templates_draft_conversation_flows__note_rpc_4cj_vjc">
<span class="notetitle">Note:</span> Templates are distinct from <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357757976474" target="_blank">structured message templates</a>, which are used to create forms,
webviews, and other custom templates. </div>
</div>
<div class="p">This article contains the following topics:<ul class="ul" id="templates_draft_conversation_flows__ul_hzc_z5f_wfc">
<li class="li"><a class="xref" href="#topic_ihy_kdj_vjc">About templates in AI agents</a></li>
<li class="li" dir="ltr"><a class="xref" href="#topic_lv5_dbj_l2c">Creating a new
template</a></li>
<li class="li"><a class="xref" href="#topic_hmq_ldj_vjc">Populating a template with content</a></li>
<li class="li"><a class="xref" href="#topic_qjg_mdj_vjc">Adding a standard template to a dialogue</a></li>
<li class="li"><a class="xref" href="#topic_nmz_mdj_vjc">Adding a standard or embedded template to a generative procedure</a></li>
</ul>
</div>
<p class="p">Related article:</p>
<ul class="ul" id="templates_draft_conversation_flows__ul_mjj_xgj_vjc">
<li class="li"><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10984581745050" target="_blank">Managing templates used in conversation flows for AI agents</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_ihy_kdj_vjc">
<h2 class="title topictitle2" id="ariaid-title2">About templates in AI agents</h2>
<div class="body">
<p class="p">Within the AI agents workspace, there are two types of templates: standard and embedded. </p>
<p class="p">Both types of templates are available for messaging AI agents only. </p>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested2" id="topic_s54_rdj_vjc">
<h3 class="title topictitle3" id="ariaid-title3">About standard templates</h3>
<div class="body">
<p class="p">Standard templates can be added to generative procedures or dialogues. </p>
<p class="p">Standard templates can be used to: </p>
<ul class="ul" id="topic_s54_rdj_vjc__ul_zkq_xdj_vjc">
<li class="li">Build reusable patterns, such as user authentication or data collection </li>
<li class="li">Create copies of dialogues that are live in production to create backups, make edits
in draft form, save for later reuse </li>
</ul>
<p class="p">A standard template must end on an AI agent message. </p>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_l1d_sdj_vjc">
<h3 class="title topictitle3" id="ariaid-title4">About embedded templates</h3>
<div class="body">
<p class="p">Embedded templates can be added to generative procedures only. </p>
<p class="p">Embedded templates let you include a scripted conversation flow within an otherwise
flexible generative procedure. The procedure temporarily hands control to the embedded
template, the template runs its exact flow, and then control returns to the procedure to
pick up where it left off, using whatever information the customer selected or entered
within the templated flow. </p>
<p class="p">Embedded templates are ideal for moments in a conversation that need to be exact and
predictable rather than non-deterministically AI-generated. For example: </p>
<ul class="ul" id="topic_l1d_sdj_vjc__ul_gxy_zdj_vjc">
<li class="li">
<strong class="ph b">Word-perfect messaging</strong>: Show a legal disclaimer with exact wording and a
confirmation button before continuing. </li>
<li class="li">
<strong class="ph b">Rich UI elements</strong>: Present buttons, carousels, or forms instead of plain
generated text. </li>
<li class="li">
<strong class="ph b">Structured data collection</strong>: Collect specific fields, such as shipping address
or order number, through a form. </li>
<li class="li">
<strong class="ph b">Guaranteed button flows</strong>: Offer a fixed set of options where the wording and
choices never vary. </li>
<li class="li">
<strong class="ph b">Dynamic selections</strong>: Show a carousel of the customer's recent orders and let
them pick one. </li>
</ul>
<p class="p">If an embedded template can't complete or the conversation is interrupted, the AI agent
resumes control and manages the situation conversationally rather than leaving the
customer stuck. </p>
<p class="p">Embedded templates have the following restrictions: </p>
<ul class="ul" id="topic_l1d_sdj_vjc__ul_rbd_b2j_vjc">
<li class="li">
<strong class="ph b">Can’t link to other dialogues or procedures.</strong> This keeps the conversation flow
contained and prevents endless chains. </li>
<li class="li">
<strong class="ph b">Can’t include an escalation step.</strong> The template must return the conversation to
the procedure it’s embedded in, not escalate away from it. </li>
</ul>
<p class="p">An embedded template can end on any of the following dialogue blocks: </p>
<ul class="ul" id="topic_l1d_sdj_vjc__ul_kbf_22j_vjc">
<li class="li">AI agent message (including buttons or forms) </li>
<li class="li">Customer message </li>
<li class="li">Carousel </li>
</ul>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested3" id="topic_dzb_tdj_vjc">
<h4 class="title topictitle4" id="ariaid-title5">Embedded template example: Legal disclaimer with confirmation</h4>
<div class="body">
<div class="p">
<ol class="ol" id="topic_dzb_tdj_vjc__ol_mc2_f2j_vjc">
<li class="li">A generative procedure greets the customer and gathers initial details. </li>
<li class="li">The conversation flow reaches a <strong class="ph b">Run template</strong> block that displays your exact
legal disclaimer text with an "I Agree" button. </li>
<li class="li">The customer clicks the button. </li>
<li class="li">Control returns to the procedure, which records the agreement and continues to the
next step. </li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested3" id="topic_shy_tdj_vjc">
<h4 class="title topictitle4" id="ariaid-title6">Embedded template example: Order carousel</h4>
<div class="body">
<div class="p">
<ol class="ol" id="topic_shy_tdj_vjc__ol_j5n_g2j_vjc">
<li class="li">A generative procedure looks up a customer's recent orders using an action or
integration. </li>
<li class="li">The conversation flow reaches a <strong class="ph b">Run template</strong> block that displays those
orders in a carousel. </li>
<li class="li">The customer selects an order. </li>
<li class="li">Control returns to the procedure with the selected order, and the AI agent
continues, for example, to process a return or check the status. </li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_lv5_dbj_l2c">
<h2 class="title topictitle2" id="ariaid-title7">Creating a template</h2>
<div class="body">
<p class="p">You can create a new template from scratch, or copy an existing reply to a new template.
You can also create templates in multiple languages. </p>
<p class="p">You can create a template even if the AI agent is live. Customers won’t be able to see the
template until you add it to a dialogue or generative procedure. </p>
<p class="p"><strong class="ph b">To create a template</strong></p>
<div class="p">
<ol class="ol" id="topic_lv5_dbj_l2c__ol_pll_hbj_l2c">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li"><span class="ph">Click <img class="image" id="topic_lv5_dbj_l2c__d8e140" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Templates</strong>.</span></li>
<li class="li">Click <strong class="ph b">Create your first template</strong> or <strong class="ph b">Add template</strong>, depending on whether
there are existing templates.<p class="p">The Add template dialog opens.</p>
<p class="p"><img class="image" id="topic_lv5_dbj_l2c__image_dvn_r2j_vjc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aia_add_template_dialog.png" width="400"></p>
</li>
<li class="li">In <strong class="ph b">Name</strong>, enter a descriptive name for the template. </li>
<li class="li">Under <strong class="ph b">Type</strong>, select one of the following options: <ul class="ul" id="topic_lv5_dbj_l2c__ol_uct_52j_vjc">
<li class="li">
<strong class="ph b">Standard template</strong>: The current generative procedure or dialogue ends when
the template ends. </li>
<li class="li">
<strong class="ph b">Embedded template</strong>: The template runs as an inline step within a generative
procedure and hands off to the next step in the procedure when the template ends.
</li>
</ul>
</li>
<li class="li">(Optional) In <strong class="ph b">Description</strong>, enter a description that helps other admins
understand what this template does. </li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
</div>
<p class="p">The new template is added to your <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10984581745050#topic_lg1_fbj_l2c" target="_blank">list of templates</a>.</p>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested1" id="topic_hmq_ldj_vjc">
<h2 class="title topictitle2" id="ariaid-title8">Populating a template with content</h2>
<div class="body">
<p class="p">After you create a template, you need to populate it with content in the dialogue builder.
You can build your scripted flow as needed using messages, buttons, carousels, or forms. </p>
<p class="p"><strong class="ph b">To populate a template with content</strong></p>
<div class="p">
<ol class="ol" id="topic_hmq_ldj_vjc__ol_gjz_z2j_vjc">
<li class="li"><span class="ph">In the AI agents workspace, <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357756913178#topic_t25_qvj_tdc" target="_blank">select the AI agent</a> you want to work
with.</span></li>
<li class="li"><span class="ph">Click <img class="image" id="topic_hmq_ldj_vjc__d8e140" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ai_agents_content_icon.png">
<strong class="ph b">Content</strong> in the sidebar, then select <strong class="ph b">Templates</strong>.</span></li>
<li class="li">In the Replies column, click the <strong class="ph b">Replies</strong> drop-down and select a
language.<p class="p"><img class="image" id="topic_hmq_ldj_vjc__image_qzc_mfj_vjc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aia_add_template_replies.png" width="600"></p>
<p class="p">The Confirm template dialogue creation
dialog opens.</p>
<p class="p"><img class="image" id="topic_hmq_ldj_vjc__image_ktq_kfj_vjc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aia_confirm_template_creation.png" width="500"></p>
</li>
<li class="li">Click <strong class="ph b">Next</strong>.<p class="p">The dialogue builder opens.</p>
</li>
<li class="li">Add content to the template’s dialogue.<p class="p">For help, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749494810" target="_blank">Creating dialogues to define scripted conversation flows for AI
agents</a>.</p>
<div class="note" id="topic_hmq_ldj_vjc__note_b4c_z2j_vjc">
<span class="notetitle">Note:</span> The <strong class="ph b">Link to</strong> and
<strong class="ph b">Escalation</strong> block types aren’t available for embedded templates. </div>
</li>
</ol>
</div>
<p class="p">You must then add a template to either a dialogue or a generative procedure before it can
be used in a conversation flow. </p>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested1" id="topic_qjg_mdj_vjc">
<h2 class="title topictitle2" id="ariaid-title9">Adding a standard template to a dialogue</h2>
<div class="body">
<p class="p">You can add a standard template to a dialogue. </p>
<p class="p"><strong class="ph b">To add a standard template to a dialogue</strong></p>
<div class="p">
<ol class="ol" id="topic_qjg_mdj_vjc__ol_cmv_pfj_vjc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8357749494810#topic_ygq_4ym_g2c" target="_blank">Create a new dialogue</a> or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/9066753203738#topic_nvb_tzl_52c" target="_blank">open the dialogue</a> you want to add a standard
template to. </li>
<li class="li">In the dialogue builder, add a <strong class="ph b">Link to</strong> block at the point in the conversation
where you want the template to take over. </li>
<li class="li">In the first field of the Link to block, select the template you want to link
to.<p class="p"><img class="image" id="topic_qjg_mdj_vjc__image_xzt_wfj_vjc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aia_link_to_template.png" width="300"></p>
</li>
<li class="li">Click <strong class="ph b">Save</strong> to save your changes, or click <strong class="ph b">Publish</strong> to make them live to
customers. </li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested1" id="topic_nmz_mdj_vjc">
<h2 class="title topictitle2" id="ariaid-title10">Adding a standard or embedded template to a generative procedure</h2>
<div class="body">
<p class="p">You can add a standard or embedded template to a generative procedure. </p>
<p class="p">The process for adding either type of template is the same, but the block that’s added to
the generated procedure map is different. Standard templates are added as a <a class="xref" href="adv_procedures_about.html#topic_zsm_51s_t3c__procedure_block_link_to">Link to</a>
block, while embedded templates are added as a <a class="xref" href="adv_procedures_about.html#topic_zsm_51s_t3c__procedure_block_run_template">Run
template</a> block. This means that standard templates don’t return conversational
control to the original procedure, but embedded templates do. </p>
<p class="p"><strong class="ph b">To add a standard or embedded template to a generative procedure</strong></p>
<div class="p">
<ol class="ol" id="topic_nmz_mdj_vjc__ol_jx1_zfj_vjc">
<li class="li">
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/8979864563610" target="_blank">Create a new procedure</a> or <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/10040865503898#topic_qcm_tcc_tgc" target="_blank">open the procedure</a> you want to add a standard
template to. </li>
<li class="li">In the free-text field in the bottom-left, enter natural language adjustments to the
procedure instructing the AI agent to link to the specified template at the appropriate
point in the procedure.<p class="p">Type a forward slash (/) or click the plus (+) icon and select
<strong class="ph b">Use cases and templates</strong>, then select the template you want to link
to.</p>
<p class="p"><img class="image" id="topic_nmz_mdj_vjc__image_bds_hgj_vjc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/aia_add_template_in_procedure.png" width="400"></p>
</li>
<li class="li">Click <strong class="ph b">Update procedure</strong>. </li>
<li class="li">To make your edits live to customers, click <strong class="ph b">Publish procedure</strong>. </li>
</ol>
</div>
</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/8357756562330",
"url": "https://support.zendesk.com/hc/en-us/articles/8357756562330",
"headline": "Creating and using templates in conversation flows for AI agents",
"description": "You learn how to create and use standard or embedded templates in conversation flows, then add them to dialogues or generative procedures to reuse scripted replies and control conversation steps.",
"articleSection": "Creating dialogues",
"datePublished": "2024-11-11T22:24:44+00:00",
"dateModified": "2026-07-07T14:37:29.142127+00:00",
"inLanguage": "en",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8357756562330"
},
"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>