Skip to main content

<VirtualAgent> noun

Deprecated Notice

Dialogflow application creation and management through the SignalWire Compatibility API is deprecated. Only existing Dialog applications will continue to function; new Dialog applications can no longer be created.

<Connect> verb's <VirtualAgent> noun permits connecting the call to a Dialogflow agent. To learn more about integrating SignalWire with Dialogflow, see Integrating with Dialogflow Agents.

For example, one can connect to Dialogflow with:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Connect action="https://example.com/next-xml-instructions" >
<VirtualAgent connectorName="my-agent" />
</Connect>
</Response>

Noun Attributes

Attribute
connectorNameThe Google Project ID of the agent to use. Find a list of IDs in the Dialogflow page in the UI.

After a Dialogflow conversation is completed, SignalWire can make a request to the <Connect> verb's action attribute. In addition to the Standard Request Parameters, the following are parameters passed back to your application when SignalWire makes the request.

Parameter
VirtualAgentErrorCode stringAn error code, in case VirtualAgentStatus is "failed".
VirtualAgentError stringAn error message, in case VirtualAgentStatus is "failed".
VirtualAgentProvider stringThe provider of the VirtualAgent (e.g., Dialogflow)
VirtualAgentStatus stringE.g. failed or transfer
VirtualAgentProviderData stringA JSON object (serialized as a string) containing data about the Dialogflow interaction.