VoiceTranscriptObject - Scoped
-
- UpdatedJan 30, 2025
- 8 minutes to read
- Yokohama
- API reference
The VoiceTranscriptObject scriptable API provides methods to save third-party voice conversation transcript data to a table within a ServiceNow instance.
When calling the VoiceTranscriptObject
class, use the
sn_cs
namespace identifier.

Availability
This API is available in the base ServiceNow system. Access is restricted by the ACLs imposed on the Interaction [interaction] and Conversation [sys_cs_conversation] tables.
VoiceTranscriptObject - addVoiceInteractionMessage(String interactionId, String Json)
Adds the specified messages to the specified voice transaction record.
You can call this endpoint multiple times during real-time transcribing of the call or pass all messages in a single call if you are transcribing the call for historical purposes. If you are processing a real-time conversation, you should call this endpoint frequently, so that the messages appear in Agent Workspace in a timely manner. Messages are ordered based on their start and end times in relation to the start of the call.
Type | Description |
---|---|
String | Message that describes the results of the call. |
String | If successful, sys_id of the voice interaction message record that was created. If an error occurred, an error message describing the reason for the failure. Table: Voice Transcript Conversation Message [sys_cs_message_voice_transcript] |
Example
The following example shows how to add messages to an existing voice interaction record.
Output:
VoiceTranscriptObject - createConversation(String interactionId, String Json)
Creates a conversation record within the Conversation [sys_cs_conversation] table for the specified interaction.
Type | Description |
---|---|
String | If successful, returns the sys_id of the newly created conversation record. If an error occurs, returns a detailed error message. Table: Conversation [sys_cs_conversation] |
Example
The following code example shows how to create a new conversation record using this method.
Output:
VoiceTranscriptObject - endVoiceInteraction(String interactionId, String Json)
Terminates the specified voice interaction. Once called, no additional voice messages are translated and stored for the phone conversation.
Name | Type | Description |
---|---|---|
interactionId | String | Sys_id of the interaction record whose voice interaction to terminate. Located in the Interaction [interaction] table. |
<json_string> | JSON String | Optional. Parameters that contain additional information about the voice interactions. |
<json_string>.recordingURL | String | Optional. URL where the original voice recording is located. If configured to do so, this URL appears in Agent Workspace. Default: None |
Type | Description |
---|---|
String | If successful, returns Success. If an error occurs, returns a detailed error message. |
Example
The following code example shows how to end an active voice interaction and pass in the original voice recording URL.
Output:
VoiceTranscriptObject - saveVoiceConversationTranscript(String voiceConversationJson)
Saves third-party voice conversation transcript data to tables within a ServiceNow instance that is then accessible through Customer Service Management (CSM).
These voice conversations are typically generated using third-party vendor software. This method parses the passed JSON and saves the data into the Conversation [sys_cs_conversation], Conversation Message [sys_cs_message], and Voice Transcript Conversation Message [sys_cs_message_voice_transcript] tables within the ServiceNow instance. CSM accesses the information in these tables to display the voice conversation transcripts.
Name | Type | Description |
---|---|---|
voiceConversationJson | String | JSON that represents the voice conversation to store. This JSON is sent by
another ServiceNow plugin, such as OpenFrame. Third-party
vendors, such as Amazon, send the JSON to the plugin. The associated plugin parses
out the voice conversation and sends the JSON in the required format to Virtual Agent. For example, the following is an example of an Amazon Connect conversation: |
Type | Description |
---|---|
String | Results of the method call. Possible return results:
|
Example
This example shows how to call the saveVoiceConversationTranscript() method to save an Amazon Connect transcript.
Output:
VoiceTranscriptObject - startVoiceInteraction(String Json)
Creates a voice interaction record within the Interaction [interaction] table.
You must create this record before trying to save any transcribed voice messages. You can also use this method to assign a call to a specific agent by passing in their specific user ID.
Type | Description |
---|---|
String | Results of the method call. Possible return results:
|
Example
The following code example shows how to create a voice interaction record.
Output:
On this page
- Availability
- VoiceTranscriptObject - addVoiceInteractionMessage(String interactionId, String
Json)
- VoiceTranscriptObject - createConversation(String interactionId, String Json)
- VoiceTranscriptObject - endVoiceInteraction(String interactionId, String Json)
- VoiceTranscriptObject - saveVoiceConversationTranscript(String
voiceConversationJson)
- VoiceTranscriptObject - startVoiceInteraction(String Json)