How do I actually send a canned response during a live chat interaction using the Conversations API? I’ve got the SDK wired up and can send plain text messages fine, but I need the rich formatting that canned responses provide.
I tried POSTing to /api/v2/conversations/messaging/{conversationId}/events with this payload:
{
"type": "message",
"subType": "OUTBOUND",
"from": {
"id": "agent-id-here",
"name": "Agent Name"
},
"text": "{{canned:12345}}"
}
The API returns a 200 OK, but the customer just sees the raw string {{canned:12345}} in their chat window. It doesn’t resolve to the actual content. I assumed the API would handle the substitution on the server side, similar to how the agent desktop works.
Is there a specific endpoint or header I’m missing to trigger the expansion? Or do I have to fetch the canned response content separately via the Canned Response API and inject the HTML manually into the message body? The docs are vague on whether the messaging API supports canned reference syntax at all.