Variables let you personalize your agent’s prompt with dynamic data. itellicoAI uses Jinja2 for templating — see the official docs for the full language reference.
All other data must come from your Dynamic Context connection (set up by your development team) as variables you can use directly. See Dynamic Context API.You can return any fields you want. For example:
{% if language == "de" %}Guten Tag! Sie arbeiten für {{ company_name }}.{% endif %}{% if account_tier == "premium" %}Priority support available.{% endif %}
You are speaking with {{ contact.first_name }} {{ contact.last_name }}.Their email is {{ contact.email | default("not provided") }}.Their phone number is {{ contact.phone_number }}.
Custom fields are NOT nested under contact. — they’re variables you can use directly like {{ language }} or {{ account_tier }}. You must provide these through your Dynamic Context connection (set up by your development team). See Dynamic Context API.
Any custom data you provide through your Dynamic Context connection (set up by your development team) becomes available as variables you can use directly:
{{ account_tier }}{{ language }}{{ company_name }}{{ preferred_contact_method }}
Example with custom variables:
{% if account_tier == "premium" %}As a premium customer, you have priority support.{% endif %}{% if language == "de" %}Sprechen Sie Deutsch.{% endif %}Company: {{ company_name | default("valued customer") }}
Set up a Dynamic Context connection (requires developer setup) to provide custom variables. Any JSON fields you return become variables you can use directly (e.g., {"language": "de"} → {{ language }}).
Use current_datetime to build advanced time-based logic like business hours routing, time-of-day greetings, or scheduling constraints without needing external data sources.
Use the datetime filter for formatting. Direct date formatting methods are not available. Use the datetime filter shown above instead.
{% if language == "es" %}Respond in Spanish. Use formal addressing (usted).{% elif language == "fr" %}Respond in French. Use formal addressing (vous).{% elif language == "de" %}Respond in German. Use formal addressing (Sie).{% else %}Respond in English. Use friendly, conversational tone.{% endif %}
{% if contact.first_name %}Hello {{ contact.first_name }}, great to hear from you!{% else %}Hello! Thanks for calling!{% endif %}{% if contact.email %}I have your contact information on file, so I can send you a confirmation after our call.{% endif %}
Example 2: Custom Business Logic (Requires Dynamic Context API)
{% if contact.first_name %}Hello {{ contact.first_name }}, thanks for calling {{ company_name }}!{% else %}Hello! Thanks for calling {{ company_name }}!{% endif %}{% if account_tier == "premium" %}As a premium customer, you have priority support. How can I help you today?{% else %}How can I help you today?{% endif %}
Variables like company_name and account_tier must be provided by your Dynamic Context connection (set up by your development team). See Dynamic Context API.
Current time: {{ current_datetime | datetime("%H:%M") }}{% if current_datetime.hour >= 17 or current_datetime.hour < 9 %}Outside normal business hours. If customer needs immediate assistance:"Our regular support hours are 9 AM to 5 PM. For urgent issues, I can take your information and have someone call you first thing in the morning, or you can reach our emergency line at [number]."{% else %}Within business hours. Full support available.{% endif %}