Skip to main content

$reactions.newSession

Deprecated

This method creates a new session and passes parameters to it.

caution
This method is deprecated. Use $jsapi.startSession or $jsapi.stopSession instead.

Syntax

The method accepts an object with the following properties:

PropertyTypeDescriptionDefault value
clientObjectThe data that will be available in the new session via the $client object.The current value of $client
dataObjectArbitrary data to be passed into the new session. It will be available as $request.data.Empty object
messageStringThe message to be sent to the script after the new session is started. This property is required.
requestObjectThe data that will be available in the new session via the $request object.The current value of $request
sessionObjectThe data that will be available in the new session via the $session object.Empty object

How to use

state: Reset
q!: $regex</reset>
script:
$reactions.newSession({message: "/start", data: $request.data});