Compose Customer Reply
replies_compose_replyFill template variables with real customer data, such as name, device model, and repair status, to generate a ready-to-send reply.
Instructions
Render a ready-to-send customer reply by filling a template's {{variables}} with real values.
Args:
template_id (string): id from replies_search_templates
variables (object): map of variable name -> value, e.g. { "customer_name": "أحمد", "device_model": "iPhone 13", "status": "بانتظار قطعة الشاشة", "eta": "غداً الساعة 5 مساءً" }
Returns: { text, missingVariables }. If missingVariables is non-empty the reply still contains raw {{placeholders}} — fill them and call again, or ask the user for the values.
Example: compose a status update in Arabic for customer أحمد about his iPhone 13.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"template_id": "<template_id>"
},
"name": "replies_compose_reply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variables | No | Variable name -> value map. Values are inserted verbatim. | |
| template_id | Yes | Template id |