{% if leads_config.favicon_url %} {% endif %}
{% if leads_config and leads_config.logo_url %}{% else %}SMX{% endif %} {{ leads_config.module_title }} Admin

Lead submission

Back to submissions

{% if error %} {% endif %} {% if submission %}

{{ submission.full_name }}

Email: {{ submission.email }}

Phone: {{ submission.phone }}

Company: {{ submission.company }}

Source: {{ submission.source }}

Status: {{ submission.status }}

Subject: {{ submission.subject }}

Message

{{ submission.message }}

Lead AI agent

{% if ai_insight %}

AI insight

Summary: {{ ai_insight.summary }}

Category: {{ ai_insight.category }}

Priority: {{ ai_insight.priority }}

Suggested status: {{ ai_insight.suggested_status }}

Spam risk: {{ ai_insight.spam_risk }}

{% set usage = ai_insight.raw.get("usage", {}) if ai_insight.raw else {} %} {% set usage_by_profile = ai_insight.raw.get("usage_by_profile", {}) if ai_insight.raw else {} %} {% if usage %} {% set hidden_tokens = usage.get("thinking_tokens", 0) + usage.get("other_tokens", 0) %}

AI usage

Token usage for this lead analysis.

{{ usage.get("provider", "") }}
Input {{ usage.get("input_tokens", 0) }}
Output {{ usage.get("output_tokens", 0) }}
Thinking/other {{ hidden_tokens }}
Total {{ usage.get("total_tokens", 0) }}
{% set main_usage = usage_by_profile.get("main", {}) %} {% if main_usage %} {% set main_hidden_tokens = main_usage.get("thinking_tokens", 0) + main_usage.get("other_tokens", 0) %}

Main profile

{{ main_usage.get("provider", "") }}

{{ main_usage.get("model", "") }}

Input
{{ main_usage.get("input_tokens", 0) }}
Output
{{ main_usage.get("output_tokens", 0) }}
Thinking/other
{{ main_hidden_tokens }}
Total
{{ main_usage.get("total_tokens", 0) }}
{% endif %} {% set assistant_usage = usage_by_profile.get("assistant", {}) %} {% if assistant_usage %} {% set assistant_hidden_tokens = assistant_usage.get("thinking_tokens", 0) + assistant_usage.get("other_tokens", 0) %}

Assistant profile

{{ assistant_usage.get("provider", "") }}

{{ assistant_usage.get("model", "") }}

Input
{{ assistant_usage.get("input_tokens", 0) }}
Output
{{ assistant_usage.get("output_tokens", 0) }}
Thinking/other
{{ assistant_hidden_tokens }}
Total
{{ assistant_usage.get("total_tokens", 0) }}
{% endif %}

Total includes input, visible output, and model thinking/other tokens.

{% endif %}

Recommended action

{{ ai_insight.recommended_action }}

Draft reply

{{ ai_insight.draft_reply }}

{% endif %}

Update status

{% endif %}