When requestSource is null and one text message "bot fulfillment text" is found in multiple responseMessages, we should add fulfillmentText: "bot fulfillment text" property to json.
This fix could be useful when you are using fulfillment with Dialogflow ES. It allows to avoid confusion between real and default bot response in Dialogflow ES history.
The bot says: bot fulfillment text
In history, Dialogflow administrator could read: bot fulfillment text
Dialogflow administrator is happy :slightly_smiling_face:
Actual Behavior
Currently, a difference could exist between heard bot response and history bot reponse.
fulfillmentText property is not present in response because responseMessages contains two elements : one text message and one payload message.
Dialogflow ES history
Use case
The bot says: bot fulfillment text
In history, Dialogflow administrator could read: bot default text
A difference exists between what we could read in Dialogflow ES history and what user heard.
Dialogflow administrator is not happy :slightly_frowning_face:
Steps to Reproduce the Problem
Create a Dialogflow ES agent
Set default response "bot default response" for one intent (TestIntent)
Expected Behavior
When
requestSource
is null and one text message"bot fulfillment text"
is found in multiple responseMessages, we should addfulfillmentText: "bot fulfillment text"
property to json.This fix could be useful when you are using fulfillment with Dialogflow ES. It allows to avoid confusion between real and default bot response in Dialogflow ES history.
Example
Raw interaction log
Dialogflow ES history
Use case
The bot says:
bot fulfillment text
In history, Dialogflow administrator could read:bot fulfillment text
Dialogflow administrator is happy :slightly_smiling_face:Actual Behavior
Currently, a difference could exist between heard bot response and history bot reponse.
Example
Raw interaction log
fulfillmentText
property is not present in response becauseresponseMessages
contains two elements : one text message and one payload message.Dialogflow ES history
Use case
The bot says:
bot fulfillment text
In history, Dialogflow administrator could read:bot default text
A difference exists between what we could read in Dialogflow ES history and what user heard. Dialogflow administrator is not happy :slightly_frowning_face:Steps to Reproduce the Problem
"bot default response"
for one intent (TestIntent)agent.add(new Payload("PLATFORM_UNSPECIFIED", { "barge-in": false }, { rawPayload: true, sendAsMessage: true }))
agent.add("bot fulfillment response")
Specifications