Input Object

Description

Every time a user or system says something to Cognigy, a new Input object is created and passed into the Flow.

If text was sent to the system, the Input object will contain the text, plus all the information we can get from it.

๐Ÿ‘

Everything starts with the Start Node

The Start Node of a Flow takes the Input object and passes it to the next Node in line. This Node has full access to the Input, can read it and edit it, before it is handed to the next Node in the Flow.

Inspect the current Input Object from the *INFO* tab of the Interaction PanelInspect the current Input Object from the *INFO* tab of the Interaction Panel

Inspect the current Input Object from the INFO tab of the Interaction Panel

Input Properties

The Input object contains the following properties (for text input).

Key

Description

text

The text the user said/wrote.

intent

The detected Intent, can be null.

type

The type of sentence (Statement, Command, Greeting, BGreeting, whQuestion, howQuestion, ynQuestion, pAnswer, nAnswer)

currentTime

The timestamp when the message arrived within our system.

question

Information on if the input was a question and what kind of question it was.

mode

The input mode, which can be one of: TextOnly, DataOnly, TextData, Empty

slots

Detected slots

intentMapperResults

Detailed result of our Intent mapper.

state

The current state within the session. By default, it will contain the value "default". Other states can be defined. See States for more information.

channel

The channel, the input came through. We will set this value for most of the supported channels, e.g. a facebook endpoint has the value "facebook".

For our more generic endpoint types like "socket", "webhook" and "rest", you can define the channel on your own. This property will also be part of ODATA records and allow you to overwrite them and specify through e.g. which website certain chats arrived.

endpointType

The type of endpoint the input came through. The value can't be changed. This field will have one of the following values: alexa, dialogflow, facebook, webhook, google, intercom, line, microsoftBotFramework, microsoftTeams, socket, rest, ringCentralEngage, slack, smooch, twilioAutopilot, twilioSms, twilio, userlike

userId

The current user's ID. This is what our system uses to identify a user within the system. If a user with the same user ID re-appears within the system, we will e.g. reuse a contact-profile.

See Contact Profiles for more information.

inputId

A unique ID that will be generated per user input.

sessionId

The current session ID. This is either provided by a channel or generated by our system. Most endpoints allow defining an individual session expiration (ttl).

data

The data object which the user input contained if included. This object can contain a "request" property which always contains the original request from the external channel.

If a facebook endpoint is used, ci.data.request will e.g. contain the original HTTP request content from facebook.

understood

A boolean flag which determines whether our NLU system understood the users message. The flag is set to true when an intent/slot was found or if the type of sentence was pAnswer, nAnswer or Greeting - otherwise the flag will be false.

Input & Cognigy Script

In Flow Nodes, Input properties can be accessed via {{ci.property}} with property following dot-notation property.child.child.

Example: {{ci.text}} would return the text the user sent to the Flow.


Did this page help you?