WebHooks

Returns test slot values.

post

Currently available test slots are:

  • number: integer numbers between 1 and 10

  • letter: uppercase letters between A and Z

  • greek_letter: capitalized Greek letters between Alpha and Omega

Body

Specifications for a Slot Web Hook request.

slotNamestring · nullableOptional

Name of the slot.

requestIDinteger · int64Read-onlyOptional

Progressive number of the request. It is NOT a unique number, since it is reset each time the Server is restarted, but together with RequestDateTime (and optionally MemoriID) they form a reasonably unique identifier. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestID are considered identical.

requestDateTimestring · date-timeRead-onlyOptional

Timestamp of the request in UTC time zone. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestDateTime are considered identical.

requestValidityMinutesnumber · doubleRead-onlyOptional

Validity of the request, expressed in minutes, i.e. the time the response will be cached and considered valid. After this time the response will be automatically discarded. Two requests are considered identical (and the cached response of the first may be used for the second) if ALL of their parameters are identical EXCEPT RequestID, RequestDateTime and RequestValidityMinutes, and additionally SessionID for IntentWebHookRequest.

memoriIDstring · nullableOptional

ID of the Memori performing the request.

culturestring · nullableOptional

Culture of the request, expressed as a combination of an ISO-639 language code and an ISO-3166 country code. E.g. it-IT or en-US.

Responses
chevron-right
200

Success

application/json

Specifications for a Slot Web Hook response.

slotValuesstring[] · nullableOptional

Values of the request slot. If the intent slot has any preset value in its configuration, values returned by the hook are added to preset ones. Duplicated values are discarded.

requestIDinteger · int64Optional

Progressive number of the original request this response refers to. Required.

requestDateTimestring · date-timeOptional

Timestamp of the original request this response refers to, in UTC time zone. Required.

resultCodeinteger · int32Optional

Result code of the request. Must be set to 0 if the request succeeded. Any other value will be considered a failure, but the value will be logged for subsequent diagnosis. Required.

resultMessagestring · nullableOptional

Result message of the request. Must be set to Ok if the request succeeded. Any other value will be considered a failure, but the value will be logged for subsequent diagnosis. Required.

post
/memori/v2/TestSlot
200

Success

Returns test intent results.

post

Currently available test intents are:

  • ECHO: emits the intent utterance as-is.

  • TUNNELING_ECHO: emits the intent utterance as-is and sets the Tunneling flag to true until an utterance with "END" is received.

  • HISTORY_ECHO: emits the latest transition history line, the current utterance and a follow up greek letter, and sets the Tunneling flag to true until an utterance with "END" is received

  • COMBINE_LETTER_AND_NUMBER: requires a letter slot and a number slot, emits the content of the two slots in juxtaposition, e.g. "A10".

  • DATE_RANGE: requires a date slot, emits the date range indicated by the date slot in the format "yyyy/MM/dd - yyyy/MM/dd".

  • AUTOINCREMENT: returns a progressive number that increments by 1 each time the intent is called.

  • FIBONACCI: returns the next element of the Fibonacci series, using context variables to store the series progression.

Body

Specifications for an Intent Web Hook request.

intentNamestring · nullableOptional

Name of the intent.

utterancestring · nullableOptional

Intent utterance as received by the Dialog State Machine. If Null the Intent is being called on a Timeout event.

sessionIDstring · nullableOptional

ID of the session where the request is being performed. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different SessionID are considered identical.

currentTagstring · nullableOptional

Latest tag set with a Tag Changed event. May be Null if the Memori session is currently anonymous.

currentTagAuthenticatedbooleanOptional

True if the CurrentTag refers to a person and they have been authenticated through their PIN. False otherwise.

currentDateUTCstring · date-time · nullableOptional

Latest date/time set with a Date Changed event. May be Null if the Memori session has no date/time set.

timeZonestring · nullableOptional

Time zone of the request, expressed as a TZ database name. E.g. Europe/Rome or America/Los_Angeles. Should be considered when the request depends on a date/time, since they are always specified in the UTC time zone.

beginUTCstring · date-timeOptional

Beginning of the date/time range the request refers to. If the intent uses the date slot, this corresponds to the initial timestamp of the date range. E.g. for "today" it is set to the instant of midnight of the current day, in the UTC time zone. If the intent does not use the date slot, BeginUTC and EndUTC are set by default to the date range of today.

endUTCstring · date-timeOptional

Ending of the date/time range the request refers to. If the intent uses the date slot, this corresponds to the final timestamp of the date range. E.g. for "today" it is set to the instant of midnight of the next day, in the UTC time zone. If the intent does not use the date slot, BeginUTC and EndUTC are set by default to the date range of today.

userEmailstring · nullableOptional

E-mail address of the current user, if available.

requestIDinteger · int64Read-onlyOptional

Progressive number of the request. It is NOT a unique number, since it is reset each time the Server is restarted, but together with RequestDateTime (and optionally MemoriID) they form a reasonably unique identifier. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestID are considered identical.

requestDateTimestring · date-timeRead-onlyOptional

Timestamp of the request in UTC time zone. This property is not used to match a request with cached responses of the same request, i.e.: two requests with identical properties but different RequestDateTime are considered identical.

requestValidityMinutesnumber · doubleRead-onlyOptional

Validity of the request, expressed in minutes, i.e. the time the response will be cached and considered valid. After this time the response will be automatically discarded. Two requests are considered identical (and the cached response of the first may be used for the second) if ALL of their parameters are identical EXCEPT RequestID, RequestDateTime and RequestValidityMinutes, and additionally SessionID for IntentWebHookRequest.

memoriIDstring · nullableOptional

ID of the Memori performing the request.

culturestring · nullableOptional

Culture of the request, expressed as a combination of an ISO-639 language code and an ISO-3166 country code. E.g. it-IT or en-US.

Responses
chevron-right
200

Success

application/json

Specifications for an Intent Web Hook response.

emissionstring · nullableOptional

Text to be used as the Emission of the Dialog State Machine. If Null the Dialog State Machine will try to provide an answer by other means. This also applies during tunneling in T2 state (see Tunneling).

preformattedbooleanOptional

If True, when this response is emitted no reformatting is applied.

conclusivebooleanOptional

If True, when this response is emitted it is NOT followed by a continuation prompt, such as "Is there anything else you want to know?".

hintsstring[] · nullableOptional

List of hints to be suggested together with the Emission.

minTimeoutnumber · double · nullableOptional

Minimum idle timeout, in seconds. If not specified, by default it is set to 20 seconds. The idle timeout is the time after which the client sends a Timeout event and, typically, a random question or story is picked up and proposed to the user, or a timeout intent is invoked. The actual idle timeout is computed as a random number between MinTimeout and MaxTimeout plus the reading time, where the reading time is in turn computed as the time it would take to read the Emission at 150 words per minute.

maxTimeoutnumber · double · nullableOptional

Maximum idle timeout, in seconds. If not specified, by default it is set to 40 seconds. The idle timeout is the time after which the client sends a TimedOut event and, typically, a random question or story is picked up and proposed to the user, or a timeout intent is invoked. The actual idle timeout is computed as a random number between MinTimeout and MaxTimeout plus the reading time, where the reading time is in turn computed as the time it would take to read the Emission at 150 words per minute.

memoryTagsstring[] · nullableOptional

Optional list of memory tags to be associated with this response.

tunnelingbooleanOptional

If True the Dialog State Machine enters the special T2 state and will send any subsequent entered text to the Intent Web Hook. When set to False the Dialog State Machine will return to the R1 state.

requestIDinteger · int64Optional

Progressive number of the original request this response refers to. Required.

requestDateTimestring · date-timeOptional

Timestamp of the original request this response refers to, in UTC time zone. Required.

resultCodeinteger · int32Optional

Result code of the request. Must be set to 0 if the request succeeded. Any other value will be considered a failure, but the value will be logged for subsequent diagnosis. Required.

resultMessagestring · nullableOptional

Result message of the request. Must be set to Ok if the request succeeded. Any other value will be considered a failure, but the value will be logged for subsequent diagnosis. Required.

post
/memori/v2/TestIntent
200

Success

Test function: returns a random number between 0 and 999999.

get
Responses
chevron-right
200

Success

application/json
stringOptional
get
/memori/v2/TestFunctions/RandomNumber
200

Success

Test function: echoes back the received headers, query string, and body for testing parameter substitution.

post
Responses
chevron-right
200

Success

No content

post
/memori/v2/TestFunctions/EchoHeaders
200

Success

No content

Last updated