{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/JS_API/built_in_services/jsapi/stopSession/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"816f849e-9e80-56b8-a010-a80ae7f71bb0","excerpt":"The  method ends the session. The contents of the  are cleared immediately when you call up the method. The new question of the user and the bot’s response go…","html":"<h1><code class=\"language-text\">function stopSession()</code></h1>\n<hr>\n<p>The <code class=\"language-text\">$jsapi.stopSession()</code> method ends the session.</p>\n<p>The contents of the <a href=\"/1.10.3/docs/en/JS_API/variables/session\"><code class=\"language-text\">$session</code></a> are cleared immediately when you call up the method. The new question of the user and the bot’s response go to the previous session. Subsequent queries are recorded to the new session.</p>\n</br>\n<h4>How to use</h4>\n<div class=\"gatsby-highlight\" data-language=\"sc\"><pre class=\"language-sc\"><code class=\"language-sc\"><span class=\"token keyword\">theme:</span> /\n\n    <span class=\"token keyword\">state:</span> Greeting\n        <span class=\"token storageType\">q!:</span> * *start\n        <span class=\"token storageType\">q!:</span> (hello|hello) *\n        <span class=\"token variableParameter\">script:</span>\n            $jsapi.startSession();\n        <span class=\"token variableParameter\">a:</span> Hello! How can I help you?\n\n    <span class=\"token keyword\">state:</span> Goodbye\n        <span class=\"token storageType\">q!:</span> (bye|goodbye|bye) *\n        <span class=\"token variableParameter\">script:</span>\n            $jsapi.stopSession();\n        <span class=\"token variableParameter\">random:</span>\n            <span class=\"token variableParameter\">a:</span> Have a good day.\n            <span class=\"token variableParameter\">a:</span> Goodbye!</code></pre></div>","frontmatter":{"title":"","description":null},"headings":[{"value":"<code class=\"language-text\">function stopSession()</code>"}]}},"pageContext":{"slug":"/docs/en/JS_API/built_in_services/jsapi/stopSession/","previous":{"fields":{"slug":"/docs/en/JS_API/built_in_services/jsapi/timeForZone/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/JS_API/built_in_services/jsapi/startSession/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}