Dynamic Variables in SigmaMind allow you to inject personalized values into agent responses, email templates, and workflows.
They are written using double curly braces:
{{ variable_name }}
For example, if you want to include a customer’s name in a message:
Hello {{ customer_name }}, thanks for reaching out!

Where Dynamic Variables Are Supported

Dynamic variables can be used in any nodes inside SigmaMind:

  • Agent Responses – Personalize replies with customer details.
  • Email Templates – Insert variables like {{ customer_email }} or {{ order_id }}.
  • Campaigns – Pass variables from campaign uploads or APIs to customize conversations.
  • Webhooks and Integrations – Include context-specific variables in outbound data.
Dynamic variables make your AI agent feel more personal and context-aware without requiring manual customization for each interaction.

Sources of Dynamic Variables

Dynamic variables can come from multiple sources:

1. Create Call API

When creating a call via the API, you can pass custom variables in the variables object.
{
    "fromPhoneNumber": 14155552671,
    "toPhoneNumber": 14155552671,
    "agentId": "D5D0p7TUs66TTAEAx",
    "variables": {
        "customer_name": "Michael"
    }
}

2. Campaign Uploads

When uploading a CSV file for a campaign, include columns for any variables you want to use.
curl --request POST \
  --url https://api.sigmamind.ai/v1/campaigns \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form 'campaignName=<string>' \
  --form sipPhoneNumber=14155552671 \
  --form agentId=D5D0p7TUs66TTAEAx \
  --form isScheduled=true \
  --form scheduledDate=2023-11-07T05:31:56Z \
  --form scheduledTime=12:00:00 \
  --form scheduledTimezone=America/Los_Angeles \
  --form concurrentCalls=5 \
  --form 'variables={
  "customer_name": "Michael"
}' \
  --form file=@example-file
Phone Number,Customer Name,Order ID
+14155552671,Michael,12345
+14155552672,Sarah,67890
These values will be injected into your campaign messages automatically in lowercase with underscores.

3. Conversation Extracted Variables

Some variables are automatically captured from the conversation itself. For example:
  • If the agent asks for the customer’s email, it can be extracted and stored as {{ customer_email }}.
  • If the agent identifies an order number, it can be stored as {{ order_id }}.
Conversation variables are context-aware and evolve as the interaction progresses.

Example Usage

  • In an Agent Response
Hi {{ customer_name }}, your order {{ order_id }} is confirmed and will be delivered by {{ delivery_date }}.
  • In an Email Template
Subject: Order Confirmation for {{ customer_name }}

Dear {{ customer_name }},

Thank you for your purchase! Your order ID is {{ order_id }}.
We will notify you at {{ customerEmail }} once your order ships.

Best regards,  
Team SigmaMind

Best Practices

  • Always provide default values when possible to handle missing variables.
  • Keep variable names simple and descriptive (e.g., customerName, orderId).
  • Validate inputs when passing variables from external sources (CSV, API).
  • Use conversation-captured variables to reduce manual data entry.

Summary

  • Dynamic Variables use the {{ variable_name }} format.
  • They can be injected into any nodes in ai agents like send response, branch, app actions, analyze customer message etc.
  • Variables can be passed via API, CSV uploads, or extracted directly from conversations.
  • They make agent interactions personalized, contextual, and automated.
Dynamic variables empower your AI agent to adapt responses to each customer’s context, making conversations more natural and engaging.