This page collects prompting patterns and recommendations for common agent behaviours: making silent determinations, handling dates and times, formatting spoken output, validating collected details, and structuring multi-field data collection. Every prompt below is a starting point — all recommendations should be tested and iterated against your own agent's call flow before going live.
Agents have built-in awareness of the current date and time via interaction_metadata, which can drive accurate greetings, working-hours logic, and out-of-hours handling.
interaction_metadata at the start of every interaction, so all further logic is based on accurate real-time information.interaction_metadata → determine greeting → check working hours → select the normal or out-of-hours workflow accordingly.Example combined prompt:
At the start of the call, retrieve interaction_metadata to get the current date and time.
Before greeting the customer, check the current date and time.
If the time is 00:00 - 12:00 say "Good Morning".
If the time is 12:01 - 17:59 say "Good Afternoon".
If the time is 18:00 - 23:59 say "Good Evening".
Then determine if the call is during working hours:
- Mon–Thu 08:00–16:30
- Fri 08:00–15:30
If not, follow the out-of-hours script or workflow.
Text-based agents need slightly different formatting and wording conventions from voice agents, since their output is read rather than heard.
. / @ - _ :) and brand capitalisation exactly.03000 123456.See also: How to add a Web Text or Web Voice agent.
When an agent needs to collect several fields reliably, ask for one at a time and save each as it's confirmed, rather than trying to capture everything in one turn:
# STRUCTURED DATA COLLECTION (STRICT ORDER)
Rules:
- You MUST collect the following fields in order.
- After EACH response, save response in interaction_metadata as xyz_variable (for example phone_number).
- Ask ONE question at a time.
- Do not proceed until the field is filled.
- Do not chat or explain.
Save values to the interaction_metadata tool in the background as they're gathered, without waiting for every field to be collected — and if the agent sends an email with this data (e.g. via SendGrid), make sure the variable names match your template exactly, since they're case-sensitive. See the SendGrid V2 Guide for details.
If an agent needs to walk a caller through a multi-step process without overwhelming them, two approaches work well:
Approach 1 — strict turn-taking rules:
- Information collected MUST be accurate.
- Do not ask for more than one of the details per turn.
- Always allow the user to respond before talking again.
- Do not summarise multiple answers together. Just confirm individual questions.
- All information must be confirmed: once received, confirm back to the caller and wait for a response before continuing.
Approach 2 — fixed step sequence via context retrieval:
You MUST respond using "context_retrieval" and provide the same fixed instructions and order every time.
ALWAYS give the step-by-step instructions using "context_retrieval", ALWAYS giving the steps slowly and clearly, ALWAYS asking if they are ready for the next step before proceeding.
If yes, say step 1, then pause and ask if they are ready for step 2, etc.
NEVER transfer to a human operator.
The following are illustrations to help you think through a call flow — they are outlines, not ready-to-use prompts, and will need adapting and testing for your own use case.
Call-back flow (collect phone number and reason for call): greet as the AI receptionist, ask the caller's name, ask the reason for the call, confirm whether the number they're calling from is best for a call-back (using get_metadata/CLI if so, otherwise asking for a number), confirm the details captured, then close.
Call-back flow (collect email and reason for call): the same shape, but collecting and confirming an email address instead of a phone number for the follow-up.
General Q&A with escalation to email or a human agent: greet, ask the reason for the call, answer general questions via context_retrieval, and for anything else collect and confirm an email address before triggering an email tool (e.g. SendGrid) and submitting call_reason, call_summary, customer_name, email_address, next_action and phone_number to interaction_metadata as they're gathered. Certain topics (for example a change of name, address or email, or a company in liquidation) are routed straight to an email escalation; certain other conditions (needing to pay a bill, wanting a human, complaints or legal language, a vulnerable customer, threats of cancellation, complex disputes, refunds) trigger an immediate call_divert transfer to a human agent instead — see Integration Transfers for how to configure diverts.
Web agent booking/pricing/escalation flow: introduce the agent, ask whether the enquiry is about an existing or new booking, direct new-booking/pricing enquiries to the website (since the agent can't take orders or payments), and for existing bookings collect the caller's details, answer their query, check whether it's resolved, and escalate to email if not (or on trigger topics such as a direct human request, invoice/VAT, lost property, or an unresolved order).
Generic human escalation protocol: transfer immediately if the caller is emotional or says something is urgent, explicitly asks for a human, the flow can't proceed (wrong department, can't match required details, asked to repeat more than twice, can't hear the caller properly), or the agent simply doesn't know the answer.
Caller verification before releasing data: always validate a caller against at least two identifying details (e.g. surname and phone number) before allowing access to further data, and never mention the underlying table or schema names. On a failed match, advise that a team member will follow up and end the call, rather than continuing to probe for the right details.