Prompt Templates Guide¶
Prompt Templates are pre-written task shortcuts that appear as clickable cards inside your AI conversations. Instead of typing the same instructions over and over, your team clicks a card and the AI gets to work immediately.
🎯 Overview¶
Every team has recurring AI tasks: qualifying a lead, drafting a follow-up email, summarizing a record before a meeting. Without templates, every user has to remember what to type and how to phrase it. That inconsistency leads to wildly different results from the same assistant.
Prompt Templates solve this. You write the task instruction once, give it a name, and it shows up as a card wherever that assistant is active. Anyone on the team can click it and get a consistent, well-structured result with no typing, no guessing, no variation.
Templates also lower the barrier for users who are new to AI. Instead of a blank message box, they see a list of things the assistant can do. Clicking is easier than writing, and easier means more people actually use the tool.
🧠 How Prompt Templates Work¶
When a user clicks a template card, the assistant immediately receives your pre-written instruction combined with the context of the current situation: the record being viewed, the conversation history, or the visitor's session. The user sees the assistant start working. The underlying instruction is never shown; it just works.
Templates can be triggered in three places depending on where the assistant is active:
| Where | How to trigger | What happens |
|---|---|---|
| Discuss | Cards appear in a new empty chat; or type % at any point in an AI chat to open a searchable dropdown |
Input fills with %code; add optional extra text, then Send |
| Ask AI (form views) | Click the Ask AI button on any Odoo record; cards appear in the panel | Click a card, optionally add notes, then Send |
| Livechat | Cards appear when a visitor opens the chat widget for the first time | The selected task fills the message box; visitor presses Send |
Templates only appear when the specific assistant they are assigned to is active. A visitor talking to your support bot sees only that bot's templates; a sales rep using the CRM assistant sees only the CRM templates.
🛠️ Creating Prompt Templates¶
Basic Setup¶
- Go to Settings → Technical → AI → Prompt Templates
- Click Create
- Fill in the fields (see below)
- Click Save
Template Fields¶
Name
The label shown on the card. Keep it short; two to four words work best. Users scan cards quickly, so the name should make the task immediately obvious.
Examples: Qualify Lead, Draft Follow-up, Summarize Record, Proofread
Code
A short identifier used internally to trigger the template. Users never see this, but it must be unique across all templates. Use lowercase letters and hyphens or underscores.
Examples: qualify, draft_followup, summarize, proofread
Template Content
The full instruction written in plain language. This is what the AI actually reads and follows. Write it the way you would brief a capable colleague: tell them what to look at, what to do with it, and what you want as output.
See Writing Effective Templates for examples and guidance.
Sequence
A number that controls the display order. Lower numbers appear first. Use gaps between numbers (10, 20, 30) so you can insert cards later without renumbering everything.
🔗 Assigning Templates to Assistants¶
Templates must be assigned to a specific assistant before they appear anywhere.
- Go to Settings → Technical → AI → Assistants
- Open the assistant you want to configure
- Click the Prompt Templates tab
- Add the templates you want this assistant to show
- Click Save
A template assigned to your Sales Assistant will only appear when a user is interacting with the Sales Assistant. If the same user switches to the Support Assistant, they see that assistant's cards instead.
You can assign the same template to multiple assistants if the task makes sense for all of them.
✍️ Writing Effective Templates¶
Key Principles¶
Be specific about what to look at first. The AI has access to the current record's data, but it helps to direct its attention. Instead of "analyze this lead," say "start by reading the lead's name, company, source, and any notes in the conversation history."
Describe the output format. Tell the AI what you want back: a numbered list, a short paragraph, a draft email, a score from 1 to 10. When the format is clear, the result is immediately usable.
Write step-by-step instructions for complex tasks. If the task has a natural order (read first, then analyze, then write), spell that out. The AI follows instructions sequentially and produces more reliable results when the steps are explicit.
Keep each template focused on one task. A template that tries to qualify the lead, draft the email, and update the record all at once will produce inconsistent results. Split it into three templates.
Write for the AI, not for the user. The user sees the card name. The AI reads the content. You can be precise and detailed in the content without worrying about it being too technical for your team.
Template Examples¶
Qualify Lead
- Name:
Qualify Lead - Code:
qualify - Template Content:
Read this lead record carefully. Start with the company name, lead source, contact name, and any notes or messages in the conversation history.
Then evaluate the lead using these criteria:
1. Budget fit: does the company size or industry suggest they can afford our product?
2. Need: do the notes or conversation suggest a clear problem we can solve?
3. Timeline: is there any indication of urgency or a purchase timeline?
4. Decision-maker: is the contact likely to have purchasing authority?
Give each criterion a score from 1 to 3 (1 = weak, 2 = possible, 3 = strong).
Output:
- A total score out of 12
- A one-sentence summary of the lead's quality
- The single most important thing to address in the next conversation
Draft Follow-up Email
- Name:
Draft Follow-up - Code:
draft_followup - Template Content:
Read the lead record and the full conversation history in the chatter.
Write a professional follow-up email from our sales team to the contact. The email should:
- Reference something specific from the previous conversation or the lead details (not generic)
- Briefly remind them of the value we can offer based on what we know about their situation
- Include a clear call to action (schedule a call, reply with questions, or confirm interest)
- Be concise, no more than 150 words in the body
Format the output as a ready-to-send email with Subject line, greeting, body, and sign-off.
Summarize Record
- Name:
Summarize Record - Code:
summarize - Template Content:
Read all the fields on this record and the full conversation history in the chatter.
Produce a concise summary that covers:
1. What this record is about (2-3 sentences)
2. Current status and any recent activity
3. Key people involved
4. Any open issues, pending actions, or deadlines mentioned in the conversation
Keep the summary to one short paragraph per section. Use plain language, as this summary may be read by someone who is not familiar with this record.
Proofread & Improve
- Name:
Proofread & Improve - Code:
proofread - Template Content:
Read the main text content on this record (description, notes, or body field).
Review it for:
1. Spelling and grammar errors
2. Unclear or ambiguous sentences
3. Tone: is it appropriate for the intended audience?
4. Missing information that would make it more complete or useful
Output:
- A list of specific corrections with the original text and suggested replacement
- A revised version of the full text with all corrections applied
- A one-line note on the overall quality and the biggest improvement made
What to Avoid¶
- Vague instructions: "Analyze this" or "Help with this record" give the AI no direction. The results will be generic and inconsistent.
- Assuming specific field names: Write "the contact's email" rather than "the
email_fromfield." If a field doesn't exist on a particular record, the AI will handle it better when the instruction uses natural language. - Doing too many things at once: Templates that try to read, analyze, write, and update a record in one pass are hard to get right. Break complex workflows into multiple focused templates.
- Very long templates: If the template content runs to more than 300 words, it is probably trying to do too much. Consider splitting it.
⚙️ How Templates Work in Each Context¶
Ask AI on Form Views¶
The Ask AI button appears on any Odoo record form. When a user clicks it, a side panel opens showing the AI assistants available to them. Once they select an assistant, its Prompt Templates appear as cards in the panel.
The user clicks a card, optionally types extra details in the message box (for example, "focus on the pricing objection"), then clicks Send. The AI receives the template instruction combined with the current record's data and any extra notes the user added, and starts working immediately.
This is the most common way teams use templates for internal workflows. A sales rep can qualify a lead, draft a follow-up, and summarize the record all from the same panel without leaving the form.
Templates in Discuss¶
There are two ways to use templates in a private AI chat in Discuss.
Template cards (empty conversation). When a user opens a new private chat with an AI assistant and the conversation is empty, the assistant's Prompt Templates appear as cards in the chat window. The user clicks a card and the input box fills with the template shortcut; they can optionally add extra instructions, then press Send. Once the conversation has messages, the cards are hidden.
The % shortcut (any point in the conversation). In any private AI chat, the user can type % in the message box at any time to open a suggestion dropdown. The list shows all templates assigned to that assistant, and the user can keep typing to filter by name or code. For example, typing %qual narrows the list to templates whose name or code contains "qual". Selecting a template fills the input with %code and the cursor moves to the end so the user can add any optional extra instructions before sending.
Both paths produce the same result: the AI receives the template instruction combined with the extra text the user typed.
Templates in Livechat¶
When a website visitor opens the livechat widget and the chat is new, they see the assistant's template cards. Clicking a card fills the message input box with the template name (so the visitor can see what they are about to send). The visitor then presses Send and the AI begins helping them.
This removes the hesitation many visitors feel when faced with a blank chat box. Instead of wondering what to type, they see clear options. The result is more visitors engaging and fewer abandoned chats.
📋 Best Practices¶
- Keep each template focused on one task. A template that tries to do five things at once is harder to write, harder to improve, and produces less reliable results.
- Write templates for your most common workflows first. Look at what your team asks the AI most often and turn those into templates. You will get the fastest return on investment.
- Test every template before assigning it to a production assistant. Click the card yourself, review the result, and refine the template content until the output is consistently useful.
- Use the Sequence field to put the most-used templates first. Users scan cards from left to right or top to bottom, so the most valuable actions should appear first.
- Review templates when your workflows change. A template written for one version of your sales process may produce the wrong output after a process change. Treat templates as living documents.
- Give templates names that describe the output, not the action. "Qualification Score" is clearer than "Analyze Lead" because it tells the user exactly what they will get.
🔧 Troubleshooting¶
Templates Not Appearing¶
The template is not assigned to the active assistant. Each template must be added to the assistant's Prompt Templates tab. Check that the template appears in the list for the assistant you are currently using.
The assistant has no templates configured for this context. If a template is assigned to the Sales Assistant but the user is talking to the Support Assistant, the template will not appear. Check which assistant is active in the current chat or Ask AI panel.
The conversation already has messages in it (Discuss only). In Discuss, template cards only appear when opening a new, empty conversation. Once a conversation has messages, the cards are hidden. Start a new private chat to see the cards.
The livechat channel is not using the right assistant. In Livechat, check that the channel is configured with an assistant that has templates assigned.
AI Not Following the Template Correctly¶
The template content is too vague. Add specific instructions. Tell the AI what fields to read, what to do with the information, and what format to use for the output.
The template is trying to do too many things. Split it into smaller, focused templates. Each template should have one clear goal.
The AI skips steps in a multi-step instruction. Make the steps explicit and numbered. The AI follows numbered steps more reliably than instructions written as paragraphs.
Test by clicking the card yourself. Run the template on a real record, read the output carefully, and identify where it goes wrong. Then update the template content to address the gap and test again.