Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "orbitaPayload"       : {},
  "text"                : "",
  "reprompt"            : "",
  "sessionEnd"          : false, 
  "ssml"                : "",
  "waitTime"            : "",
  "ssmlReprompt"        : 250,
  "clearSession"        : true,
  "replaceWord"         : {}
  "waitTimeNoAnimation" : false,
  "micInput"            : true,
  "validRegexArray"     : {},
  "keyboardInput"       : true,
  "waitSettings"        : { mode: 'dynamic', wpm: 300},
  "audio"               : false,
  "keyboardInput"       : true
  
}

Property

Description

orbitaPayload

The following payload displays the contents from the Multi-Modal Content editor.

Code Block
msg.payload.orbitaPayload.payload.multiagent

text

The following payload displays the content from the Chat Text window in the Text tab from the Multi-Modal Content editor.

Code Block
msg.payload.text

reprompt

The following payload displays the content from the Reprompt window in the Text tab from the Multi-Modal Content editor.

Code Block
msg.payload.reprompt

sessionEnd

The following property gives a Boolean value, true or false. If the End Session checkbox is enabled, then the sessionEnd value is true.

Code Block
msg.payload.sessionEnd

ssml and ssmlReprompt

The voice tab text when converted to speech is in ssml format. In the Voice tab, the content and corresponding payloads are:

  • Say text window

    Code Block
    msg.payload.ssml
  • Reprompt window

    Code Block
    msg.payload.ssmlReprompt

waitTime

The time (in milliseconds), the bot must wait before displaying another chat bubble in a sequence. The default value for waitTime is set to 250.

Code Block
msg.payload.waitTime

To change the waitTime, use the following JSON code.

Code Block
msg.payload.waitTime = "1000"

clearSession

The clearSession gives you a Boolean output, true or false. If this value is true, then the current session details are erased. The default value for clearSession is false.

Code Block
msg.payload.clearSession

Use the following sample code to set clearSessionto true.

Code Block
msg.payload.clearSession = true

replaceWord

A homophone is a word that is pronounced the same as another word but differs in meaning and/or spelling (such as read, or wind). While giving voice commands to the bot, homophones can be misinterpreted. You can choose to replace such words with the actual words in the context using replaceWord.

Code Block
msg.payload.replaceWord

The following sample code is for a replaceWord array.

Code Block
msg.payload.replaceWord =  
  {
    "one"   : ["won"],
    "two"   : ["to", "too"],
    "four"  : ["for","fore"],
    "six"   : ["sex"],
    "eight" : ["ate"],
    "ten"   : ["tan", "tin"]
  }

waitTimeNoAnimation

The status of wait time animation is shown in the following payload. The default value for waitTimeNoAnimation is false.

Code Block
msg.payload.waitTimeNoAnimation

The following code sets waitTimeNoAnimation to true.

Code Block
msg.payload.waitTimeNoAnimation = true

micInput

The status of the microphone input setting is shown in the following payload. The default value for micInput is true.

micInput provided in this node will take priority over the Flow Studio Directive.

Code Block
msg.payload.micInput

The following code shows how to set micInput to false.

Code Block
msg.payload.micInput = false

validRegexArray

The status of the mic input setting is shown in the payload below. The default value for validRegexArray is set to true.

Code Block
msg.payload.validRegexArray

The following code sets the validRegexArray array.

Code Block
msg.payload.validRegexArray = 
  {
    "Q1":["\\b(q|cute|queue|cue|quarter|Q on|queue on|21|key wine|key one|you on|you one|into one)\\s+(one|fun|wine)\\b"],
  }

keyboardInput

The status of the text input field is shown in the following payload. The default value for keyboardInput is true.

Code Block
msg.payload.keyboardInput

If this value is set to false, the text input field will be hidden.

Code Block
msg.payload.keyboardInput = false;

audio

Audio output from the chatbot can be controlled using this property.

Code Block
msg.payload.audio

Setting the property value to true will enable the speaker and generate audio output even if the user has manually disabled the speaker using the speaker icon at the top right corner of the chatbot.

Setting the property value to false will hide the speaker icon and will not generate the audio output.

Sample Code:

Code Block
msg.payload.audio = false;

Example flow in Experience Designer

...