OutSales Help

Template Variables

A complete reference of all template variables available in OutSales AI prompts for email generation, probability scoring, and activity planning.

Template Variables

When customizing your AI prompts in OutSales, you use template variables to inject real CRM data into the AI's context. Variables use Jinja2 syntax: {{ variable_name }}. Each AI prompt has its own set of available variables.

How Variables Work

Template variables are placeholders in the user template that get replaced with actual data when the AI processes an activity. For example, if your template includes {{ contact_name }}, it will be replaced with the prospect's actual name like "Sarah Johnson" at runtime.

The variables panel in the Settings tab shows which variables are available for each prompt.

Generate Follow-up Email Variables

This prompt has the most variables, giving the AI comprehensive context for writing personalized emails.

VariableDescription
{{ subject }}The original activity subject from Pipedrive
{{ activity_note }}Activity note from Pipedrive
{{ contact_name }}Prospect's full name
{{ contact_email }}Prospect's email address
{{ sender_name }}Your name (from your profile)
{{ sender_email }}Your email address
{{ follow_up_count }}Number of follow-ups sent to this prospect so far
{{ last_followup_date }}Date of the last follow-up sent
{{ days_since_last_followup }}Number of days since the last follow-up
{{ today_date }}Today's date in YYYY-MM-DD format
{{ notes_summary }}A summary of CRM notes from the deal and contact records
{{ probability_to_close }}The AI-calculated closing probability percentage
{{ probability_message }}The AI's explanation for the probability score
{{ email_thread }}The full previous email conversation with the prospect
{{ org_knowledge }}Relevant company knowledge retrieved from your Knowledge Base documents (RAG)
{{ deal_title }}The deal name from Pipedrive
{{ deal_value }}The deal value amount
{{ deal_currency }}The deal currency (EUR, USD, etc.)
{{ person_org_name }}The contact's company or organization name

Calculate Closing Probability Variables

This prompt receives engagement metrics and deal data to score the probability of closing.

VariableDescription
{{ contact_name }}Prospect's full name
{{ deal_title }}The deal name from Pipedrive
{{ deal_value }}The deal value amount
{{ deal_currency }}The deal currency
{{ deal_status }}The current deal status (open, won, lost, etc.)
{{ follow_up_count }}Number of follow-ups sent
{{ prospect_replied }}Whether the prospect has replied (true/false)
{{ total_reply_count }}Total number of replies from the prospect
{{ response_rate }}The prospect's response rate as a percentage
{{ notes_summary }}Summary of CRM notes
{{ email_thread }}Recent email messages in the conversation

Plan Next Activity Variables

This prompt receives the information needed to schedule and configure the next follow-up.

VariableDescription
{{ contact_name }}Prospect's full name
{{ contact_email }}Prospect's email address
{{ deal_title }}The deal name from Pipedrive
{{ follow_up_count }}Number of follow-ups sent so far
{{ followup_interval_days }}The default interval in days between follow-ups
{{ followup_interval_type }}The interval type: "fixed" or "dynamic"
{{ notes_summary }}Summary of CRM notes
{{ email_thread }}Recent email conversation summary

Using Variables in Templates

Basic Usage

Simply include the variable in double curly braces within your user template:

Write a follow-up email to {{ contact_name }} at {{ person_org_name }}.
This is follow-up number {{ follow_up_count }}.

Conditional Sections

Jinja2 supports conditional blocks, so you can include sections only when data is available:

{% if email_thread %}
Previous conversation:
{{ email_thread }}
{% endif %}

Accessing the Variables Panel

  1. Go to your agent's Settings tab.
  2. Expand any AI prompt card.
  3. When editing the user template, click Show Variables to see all available variables with descriptions.

Tips

  • Include all relevant variables -- The more context the AI has, the more personalized and relevant its output will be.
  • Order matters -- Place the most important variables near the top of your template, as AI models tend to pay more attention to information presented earlier.
  • Test with real data -- After modifying your template, regenerate a few activities with approval enabled to verify the output quality.
  • Use org_knowledge -- If you have uploaded documents to the Knowledge Base, make sure the {{ org_knowledge }} variable is included in your email generation template. This is what enables the AI to reference your company-specific information.

On this page