Summary
Add support for a new {{agentName}} template variable so admins can include the responding agent's display name in Telegram agent response messages.
Problem
The current template builder for agent_response does not expose sender information. Admins can customize the message layout, but they cannot show who sent the response from the Unthread dashboard.
Current Behavior
- Agent response templates support variables like
{{ticketNumber}} and {{response}}.
- Sender information is not exposed as a template variable.
- The webhook/template rendering path would need to pass a stable display name from the webhook payload into the template renderer.
Desired Behavior
- Support a new variable:
{{agentName}}
- Expose it in the template builder documentation/variable list.
- Populate it from the webhook payload when available.
- Fall back safely when the sender name is unavailable or empty.
Suggested Scope
- Add
agentName to the available template variables for agent responses.
- Update the webhook message formatting path to pass
agentName into template rendering.
- Decide fallback behavior when sender info is missing.
- Optionally update the default
agent_response template to use {{agentName}} once the data path is stable.
Acceptance Criteria
- Admins can include
{{agentName}} in the agent_response template.
- Rendered Telegram messages include the sender name when available.
- Missing sender names do not break template rendering.
- Tests cover both present and missing sender-name cases.
Summary
Add support for a new
{{agentName}}template variable so admins can include the responding agent's display name in Telegram agent response messages.Problem
The current template builder for
agent_responsedoes not expose sender information. Admins can customize the message layout, but they cannot show who sent the response from the Unthread dashboard.Current Behavior
{{ticketNumber}}and{{response}}.Desired Behavior
{{agentName}}Suggested Scope
agentNameto the available template variables for agent responses.agentNameinto template rendering.agent_responsetemplate to use{{agentName}}once the data path is stable.Acceptance Criteria
{{agentName}}in theagent_responsetemplate.