{
    "componentChunkName": "component---src-templates-doc-page-js",
    "path": "/docs/en/JS_API/built_in_services/jsapi/startSession/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Gatsby-doc-engine"}},"markdownRemark":{"id":"44f71cf0-d7bc-5175-83e2-7ac91a6f68d1","excerpt":"The  method starts a new 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…","html":"<h1><code class=\"language-text\">function startSession()</code></h1>\n<hr>\n<p>The <code class=\"language-text\">$jsapi.startSession()</code> method starts a new 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 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 startSession()</code>"}]}},"pageContext":{"slug":"/docs/en/JS_API/built_in_services/jsapi/startSession/","previous":{"fields":{"slug":"/docs/en/JS_API/built_in_services/jsapi/stopSession/"},"frontmatter":{"title":"","description":null}},"next":{"fields":{"slug":"/docs/en/JS_API/built_in_services/jsapi/resolvePath/"},"frontmatter":{"title":"","description":null}}}},
    "staticQueryHashes": ["1209419333"]}