Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Orbita introduces a Free Text input field in a Chatbot. You can type any text in this input field, which will not be processed by the natural language processor (NLP).

As an admin user, you might want to take feedback or suggestion from the chatbot user. These responses from the user should skip the NLP and handled separately.

Sample flow:

Function node

Place the following code in the function node as shown in the previous image.

if(msg.payload.originalDetectIntentRequest && msg.payload.originalDetectIntentRequest.payload && msg.payload.originalDetectIntentRequest.payload.orbitaFreeText) {
 msg.payload.request.intent.slots = {freeText: {value: msg.payload.originalDetectIntentRequest.payload && msg.payload.originalDetectIntentRequest.payload.orbitaFreeText}};
}
return msg;

Textbox Directive

The Free Text input option is available in the Single Input control of Flow studio.

  1. Open the Directive tab in Single Input control.

  2. Select Textbox in the Input Type dropdown.

  3. Click Save.

The Free Text input will not work in voice-based bots. It only works in Chatbots. The same is displayed in the warning text.

Changes in Dialogflow

The following event should be present in the OrbitaFlowMessages intent in Dialogflow.

FlowMessageFreeTextEvent

Changes in Orbita Intent

OrbitaFlowMessages intent in Orbita should also contain the same event.

In the Chatbot, you can view the Free Text input box as shown in the following image.

If you want to hide the Free Text input box and let users type in the text input area.

Place the following code in Bot out parser in the Bot provider V2 node.

if(msg.payload.orbitaPayload.payload && msg.payload.orbitaPayload.payload.flowInfo && msg.payload.orbitaPayload.payload.directive && msg.payload.orbitaPayload.payload.directive[0].type ==='textbox') 
{ 
 msg.payload.orbitaPayload.payload.directive[0].hidden = true
}

The Free Text Input box will not appear in the chatbot. You can type your free text directly in the text input area.

Related Articles

  • No labels