Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class ResponseMessage.
Represents a response message that can be returned by a conversational agent.
Response messages are also used for output audio synthesis. The approach is
as follows:
If at least one OutputAudioText response is present, then all
OutputAudioText responses are linearly concatenated, and the result is used
for output audio synthesis.
If the OutputAudioText responses are a mixture of text and SSML, then the
concatenated result is treated as SSML; otherwise, the result is treated as
either text or SSML as appropriate. The agent designer should ideally use
either text or SSML consistently throughout the bot design.
Otherwise, all Text responses are linearly concatenated, and the result is
used for output audio synthesis.
This approach allows for more sophisticated user experience scenarios, where
the text displayed to the user may differ from what is heard.
Generated from protobuf messagegoogle.cloud.dialogflow.cx.v3.ResponseMessage
Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reachesEND_SESSIONpage. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.
Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to constructmixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.
Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined viaplay_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger.
↳ response_type
int
Response type.
↳ channel
string
The channel which the response is associated with. Clients can specify the channel viaQueryParameters.channel, and only associated channel response will be returned.
Output only. A signal that indicates the interaction with the Dialogflow
agent has ended. This message is generated by Dialogflow only when the
conversation reachesEND_SESSIONpage. It is not supposed to be defined
by the user.
It's guaranteed that there is at most one such message in each response.
Output only. A signal that indicates the interaction with the Dialogflow
agent has ended. This message is generated by Dialogflow only when the
conversation reachesEND_SESSIONpage. It is not supposed to be defined
by the user.
It's guaranteed that there is at most one such message in each response.
The channel which the response is associated with. Clients can specify the
channel viaQueryParameters.channel,
and only associated channel response will be returned.
Returns
Type
Description
string
setChannel
The channel which the response is associated with. Clients can specify the
channel viaQueryParameters.channel,
and only associated channel response will be returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dialogflow Cx V3 Client - Class ResponseMessage (0.8.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.1 (latest)](/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage)\n- [0.8.0](/php/docs/reference/cloud-dialogflow-cx/0.8.0/V3.ResponseMessage)\n- [0.7.2](/php/docs/reference/cloud-dialogflow-cx/0.7.2/V3.ResponseMessage)\n- [0.6.0](/php/docs/reference/cloud-dialogflow-cx/0.6.0/V3.ResponseMessage)\n- [0.5.2](/php/docs/reference/cloud-dialogflow-cx/0.5.2/V3.ResponseMessage)\n- [0.4.1](/php/docs/reference/cloud-dialogflow-cx/0.4.1/V3.ResponseMessage)\n- [0.3.4](/php/docs/reference/cloud-dialogflow-cx/0.3.4/V3.ResponseMessage)\n- [0.2.1](/php/docs/reference/cloud-dialogflow-cx/0.2.1/V3.ResponseMessage)\n- [0.1.1](/php/docs/reference/cloud-dialogflow-cx/0.1.1/V3.ResponseMessage) \nReference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class ResponseMessage.\n\nRepresents a response message that can be returned by a conversational agent.\n\nResponse messages are also used for output audio synthesis. The approach is\nas follows:\n\n- If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis.\n- If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design.\n- Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.\n\nGenerated from protobuf message `google.cloud.dialogflow.cx.v3.ResponseMessage`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dialogflow \\\\ Cx \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getText\n\nReturns a text response.\n\n### hasText\n\n### setText\n\nReturns a text response.\n\n### getPayload\n\nReturns a response containing a custom, platform-specific payload.\n\n### hasPayload\n\n### setPayload\n\nReturns a response containing a custom, platform-specific payload.\n\n### getConversationSuccess\n\nIndicates that the conversation succeeded.\n\n### hasConversationSuccess\n\n### setConversationSuccess\n\nIndicates that the conversation succeeded.\n\n### getOutputAudioText\n\nA text or ssml response that is preferentially used for TTS output audio\nsynthesis, as described in the comment on the ResponseMessage message.\n\n### hasOutputAudioText\n\n### setOutputAudioText\n\nA text or ssml response that is preferentially used for TTS output audio\nsynthesis, as described in the comment on the ResponseMessage message.\n\n### getLiveAgentHandoff\n\nHands off conversation to a human agent.\n\n### hasLiveAgentHandoff\n\n### setLiveAgentHandoff\n\nHands off conversation to a human agent.\n\n### getEndInteraction\n\nOutput only. A signal that indicates the interaction with the Dialogflow\nagent has ended. This message is generated by Dialogflow only when the\nconversation reaches `END_SESSION` page. It is not supposed to be defined\nby the user.\n\nIt's guaranteed that there is at most one such message in each response.\n\n### hasEndInteraction\n\n### setEndInteraction\n\nOutput only. A signal that indicates the interaction with the Dialogflow\nagent has ended. This message is generated by Dialogflow only when the\nconversation reaches `END_SESSION` page. It is not supposed to be defined\nby the user.\n\nIt's guaranteed that there is at most one such message in each response.\n\n### getPlayAudio\n\nSignal that the client should play an audio clip hosted at a\nclient-specific URI. Dialogflow uses this to construct\n[mixed_audio](/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage#_Google_Cloud_Dialogflow_Cx_V3_ResponseMessage__getMixedAudio__).\n\nHowever, Dialogflow itself does not try to read or process the URI in any\nway.\n\n### hasPlayAudio\n\n### setPlayAudio\n\nSignal that the client should play an audio clip hosted at a\nclient-specific URI. Dialogflow uses this to construct\n[mixed_audio](/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage#_Google_Cloud_Dialogflow_Cx_V3_ResponseMessage__getMixedAudio__).\n\nHowever, Dialogflow itself does not try to read or process the URI in any\nway.\n\n### getMixedAudio\n\nOutput only. An audio response message composed of both the synthesized\nDialogflow agent responses and responses defined via\n[play_audio](/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage#_Google_Cloud_Dialogflow_Cx_V3_ResponseMessage__getPlayAudio__).\n\nThis message is generated by Dialogflow only and not supposed to be\ndefined by the user.\n\n### hasMixedAudio\n\n### setMixedAudio\n\nOutput only. An audio response message composed of both the synthesized\nDialogflow agent responses and responses defined via\n[play_audio](/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage#_Google_Cloud_Dialogflow_Cx_V3_ResponseMessage__getPlayAudio__).\n\nThis message is generated by Dialogflow only and not supposed to be\ndefined by the user.\n\n### getTelephonyTransferCall\n\nA signal that the client should transfer the phone call connected to\nthis agent to a third-party endpoint.\n\n### hasTelephonyTransferCall\n\n### setTelephonyTransferCall\n\nA signal that the client should transfer the phone call connected to\nthis agent to a third-party endpoint.\n\n### getKnowledgeInfoCard\n\nRepresents info card for knowledge answers, to be better rendered in\nDialogflow Messenger.\n\n### hasKnowledgeInfoCard\n\n### setKnowledgeInfoCard\n\nRepresents info card for knowledge answers, to be better rendered in\nDialogflow Messenger.\n\n### getResponseType\n\nResponse type.\n\n### setResponseType\n\nResponse type.\n\n### getChannel\n\nThe channel which the response is associated with. Clients can specify the\nchannel via\n[QueryParameters.channel](/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryParameters#_Google_Cloud_Dialogflow_Cx_V3_QueryParameters__getChannel__),\nand only associated channel response will be returned.\n\n### setChannel\n\nThe channel which the response is associated with. Clients can specify the\nchannel via\n[QueryParameters.channel](/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryParameters#_Google_Cloud_Dialogflow_Cx_V3_QueryParameters__getChannel__),\nand only associated channel response will be returned.\n\n### getMessage"]]