Adding external messages to transcript
Hi, I am looking to develop a handoff feature for my chatbot. At some point, my workflow will stop processing user messages and they will be redirected to a human agent. When this is done, the workflow will continue as usual. What I want to accomplish: I want to append the messages that are exchanged between the user and the human agent so that they appear in the Voiceflow Transcript. From what I have seen, the API uses state (it's not RESTful) and it saves transcripts by looking at the session, so one can't specify the contents to be stored. Is there a way for me to accomplish this? I would appreciate any ideas đ
1 Reply
At the moment the Transcripts feature only stores the Dialog Manager (DM) traces that Voiceflow itself generates during a session.
⢠When you call the DM API (or use the Web Chat widget, which calls it for you) every request/response pair is written to an internal log. Creating a transcript with the PUT /transcripts endpoint just creates a record that points to that log via the same sessionID; the actual âchat bubblesâ are pulled from the DM log when you open the transcript.
⢠There is no endpoint for adding, updating or appending individual dialog turns. The only write-operations that the Transcripts API exposes today are:
â PUT /transcripts ⌠create a new transcript record for a given sessionID
â PATCH /transcripts/{projectID}/{transcriptID} ⌠update high-level metadata (tags, unread, etc.)
â DELETE /transcripts/{projectID}/{transcriptID} ⌠delete a transcript
None of these let you post custom user/agent messages.
Because the hand-off conversation happens outside the DM pipeline, those messages never hit the DM log, and therefore they canât be shown inside Voiceflowâs transcript UI. If you need to keep a full record that includes the live-agent portion youâll have to store it in your own database or CRM/chat system and surface it separately.
Docs for reference:
â Transcripts API overview & âCreate Transcriptâ endpoint: https://developer.voiceflow.com/v2.0/reference/put_transcripts
â âSaving in Productionâ note: https://docs.voiceflow.com/reference/legacy-transcripts#saving-in-production
⢠When you call the DM API (or use the Web Chat widget, which calls it for you) every request/response pair is written to an internal log. Creating a transcript with the PUT /transcripts endpoint just creates a record that points to that log via the same sessionID; the actual âchat bubblesâ are pulled from the DM log when you open the transcript.
⢠There is no endpoint for adding, updating or appending individual dialog turns. The only write-operations that the Transcripts API exposes today are:
â PUT /transcripts ⌠create a new transcript record for a given sessionID
â PATCH /transcripts/{projectID}/{transcriptID} ⌠update high-level metadata (tags, unread, etc.)
â DELETE /transcripts/{projectID}/{transcriptID} ⌠delete a transcript
None of these let you post custom user/agent messages.
Because the hand-off conversation happens outside the DM pipeline, those messages never hit the DM log, and therefore they canât be shown inside Voiceflowâs transcript UI. If you need to keep a full record that includes the live-agent portion youâll have to store it in your own database or CRM/chat system and surface it separately.
Docs for reference:
â Transcripts API overview & âCreate Transcriptâ endpoint: https://developer.voiceflow.com/v2.0/reference/put_transcripts
â âSaving in Productionâ note: https://docs.voiceflow.com/reference/legacy-transcripts#saving-in-production