VA Sync

Prev Next

Integration node for Virtual Agent (VA) Sync in-parts API.

Parameters

name
description
default
Address Address of the VA Orchestrator Service http://cai-magpie-api.sestek-cai/magpie/ext-api/messages/synchronized
Project Name The name of the project defined in the VA interface. None
Credential OAuth 2.0 credential used to authenticate with the service. [Default]
Ignore SSL Errors Ignore any certificate errors if Address contains "https". This is useful for testing purposes. false
Channel ID The channel identifier reported to VA. ivr-external
Data Flow External Address The externally reachable address of this Data Flow instance. This needs to be changed in testing environments only. http://{InClusterManagementAddress}.sestek-core:{InClusterManagementPort}/
Send Empty Start Message Decides if the node should send an empty "VA Sync Empty Start" text message to VA as soon as the node loads, before any other input arrives. true
Tenant Name The tenant name for the VA environment. None

Inputs

Audio

 none

Events

name description possible nodes this event may be received from
Any event that has Data.Text Any text based event, such as SR Milestone, SR Partial etc., is forwarded to VA as a "message". SR Http, SR Websocket, Translate etc.
SR Milestone Same as above, additionally allows Fallback flows depending on confidence, and SR Playback on VA/Conversations page. SR Http, SR Websocket
Merged Dtmf Forwarded to VA as a "message", same as any other text event. Dtmf Merger
VA Activity Object If the user wants to send structural information that does not quite fit the "Text" field. Entry, External Relay, Custom Nodes
VA Silence Detected Reports a detected silence segment to VA, and the detected silence type. VA Silence Controller
Interruptive Barge In Flags the next outgoing request as a barge-in and clears any queued or in-flight requests. Also reports which message was interrupted. Barge In Announcer

Once an endOfConversation response has been received from VA, the node ignores any further events.

Outputs

Audio

 PCM audio extracted from prerecorded audio attachments (audio/minio, WAV or Opus) returned by VA. The audio is downmixed to mono and resampled to the operation's audio format if needed, and is bracketed by "Start Of Segment" / "End Of Segment" events.

Events

name description
VA External Contains an ActivityObject field, and a Text field for compatibility with all other nodes. Also includes a Context.VaId field when VA supplies a message id.
Start Of Segment / End Of Segment Emitted around each audio attachment played out by this node. Data.Context.VaId is included when available.

Remarks

Requirements

"StartMessage" requirements

"StartMessage" can contain

  • "CallProperties.ExternalId": If this is provided, data flow will send this value as X-Knovvu-Conversation-Id for the external conversation id to VA. If it is missing or empty, the session id is used instead.
  • "CallProperties.CustomerPhoneNumber": If this is provided and no EndUser.Phone runtime parameter has been set yet, it is merged into EndUser.Phone before being sent to VA.
{
    "CallProperties": 
    {
      "ExternalId":"ConversationId",
      "CustomerPhoneNumber":"+10000000000"
    },
}

Runtime Parameters

VA Sync accepts a VARuntimeParameters object that overrides some of the node's config at runtime. It can be supplied in two ways:

  • In StartMessage.Settings.VARuntimeParameters (as a json object), evaluated once when the node loads.
  • As a VARuntimeParameters session/runtime parameter (as a json object, or a stringified json object), re-evaluated on every incoming event.

Supported fields:

field description
ProjectName Overrides the "Project Name" config parameter.
ChannelId Overrides the "Channel ID" config parameter.
EndUser A json object merged into the request's channelData.EndUser.
CustomActionData Any json value forwarded (stringified) as channelData.CustomActionData.
SipInfo A json object forwarded as channelData.SipInfo.

Barge-In

When an "Interruptive Barge In" event is received, the node clears its pending/in-flight requests and sends BargeInType: Voice or BargeInType: Digit (and, if known, BargedInMessageId) on the next request sent to VA.

VA's response can also toggle barge-in behavior for the rest of the operation via channelData.CustomProperties:

response field runtime parameters updated
DigitBargeInEnabled VaDigitBargeInEnabled, VaDigitInputEnabled
VoiceBargeInEnabled VaVoiceBargeInEnabled, VaVoiceInputEnabled

End Of Conversation

When this node is flushed (and an end of conversation has not already been received), it sends an endOfConversation message to VA before completing the flush. If VA responds with response type endOfConversation at any point, the node emits a final VA External event and stops processing any further input for the remainder of the operation.

Project Structure

A simple VA Project that takes audio user input, and returns the responses can be built as such:
Image

After this, any node that manipulates or uses the Data.Text field can be utilized freely.

Image

Supported flow types

Batch, Stream

Release Notes

v4.16.0
  • Fixed VA Sync node not sending Traceparent to VA.
v4.15.0
  • Added Digit-Voice Barge In support to VA.
  • VA Sync now sends "Barged In Message Id" to VA for conversation history.
v4.13.0
  • Added End Of Conversation Event Output support to VA Sync.
  • Accept and send sip headers from VA Sync node.
v4.12.2
  • Fixed VA Sync lost connection handling.
  • Added Barge-In support to VA Sync.
  • Fixed config values for audio logger, VA Sync and VA TTS Reporter.
v4.12.1
  • Fixed VA Sync parsing stringified Json parameters.
v4.12.0
  • Changed VA Sync engine from js to native.
  • VA Sync now supports audio output.
  • VA Sync now supports listening to SR Results in VA Interface.
v4.9.0
  • Added option to update project name, channel id and endUser with StartMessage or Update for node VA Sync.
v4.6.0
  • Introduced Node.
  • Added EndOfConversation message to VA Async.