{"id":24824,"date":"2020-10-30T12:07:19","date_gmt":"2020-10-30T12:07:19","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-0\/?p=24824"},"modified":"2021-03-25T16:32:16","modified_gmt":"2021-03-25T16:32:16","slug":"managing-namespace","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/bot-admin\/bots-management\/managing-namespace\/","title":{"rendered":"Managing Namespace"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>(This feature was introduced in ver8.0)<\/p>\n<p>Chances are you have defined tens or hundreds of (Global or Content) variables and used them in the bot definitions. These variables could have been used in defining text prompts or messages, JavaScript, transitions, and service call definitions. Loading all these variables for every single task irrespective of their usage would lead to delays in bot response times impacting the user experience.<\/p>\n<p>Using\u00a0<strong>Namespaces<\/strong> you can categorize variables and map these namespaces to various components of the bot definition. Kore.ai platform would load the variables only from the mapped namespaces while executing specific components.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Enabling\">Enabling<\/span><\/h2>\n<p>You can opt to use the Namespaces for variable categorization by accessing from the left navigation menu <strong>Settings<\/strong> -&gt; <strong>Config Settings<\/strong> -&gt; <strong>General Settings<\/strong> page. You will find the option to <em>Enable<\/em> the <strong>Variable Namespaces<\/strong> here. By default it is disabled.<\/p>\n<p>&nbsp;<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021090002\/VM_settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24752\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021090002\/VM_settings.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021090002\/VM_settings.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021090002\/VM_settings-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021090002\/VM_settings-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Implementation\">Implementation<\/span><\/h2>\n<p>Once Variable Namespaces is enabled:<\/p>\n<ul>\n<li>A <strong>Default<\/strong> namespace is automatically created by the platform which cannot be deleted or modified;<\/li>\n<li>All tasks and variables, if any, are automatically associated with this default namespace;<\/li>\n<li>You can define and manage namespaces;<\/li>\n<li>You can add or remove the Global and Content variables to these namespaces. A variable can belong to one or more namespaces. You cannot remove the Global and Content variables from the default namespace.<\/li>\n<li>You can map namespaces to the various components of the bot definition like:\n<ul>\n<li>Tasks which include Dialog and Actions;<\/li>\n<li>Nodes in Dialog Task;<\/li>\n<li>Knowledge Graph Task;<\/li>\n<li>Small Talk Task;<\/li>\n<li>Standard Responses; and<\/li>\n<li>Event Handlers.<\/li>\n<\/ul>\n<\/li>\n<li>If you remove the namespace mapping for the components. But if you mapped components with any namespace, then the execution of these components may fail if you have included one or more variables in defining the component.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>Once Variable Namespaces are mapped, the following steps are implemented by the platform during the task execution :<\/p>\n<ul>\n<li>only the variables that belong to the namespace mapped to a component will be loaded;<\/li>\n<li>if the variable that is not mapped is referenced by the component, it will flag a &#8220;variable not found&#8221; error;<\/li>\n<li>the same logic applies to Bot functions used within the tasks.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Creation\">Creation<\/span><\/h2>\n<p>When creating a variable (global or content), you have an option to <strong>Add Namespace<\/strong>. Use this option to create a namespace.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021100949\/VM_create-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24758\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021100949\/VM_create-1.png\" alt=\"\" width=\"494\" height=\"487\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021100949\/VM_create-1.png 494w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021100949\/VM_create-1-300x296.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021100949\/VM_create-1-100x100.png 100w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Editing\">Editing<\/span><\/h2>\n<p>From the <strong>Variables<\/strong>\u00a0(Global or Content) page under <strong>Settings<\/strong> -&gt; <strong>Config Settings<\/strong>, you have the option to\u00a0<strong>Manage Namespaces.<\/strong><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101712\/VM_manage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24762\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101712\/VM_manage.png\" alt=\"\" width=\"253\" height=\"213\" \/><\/a><\/p>\n<p>Use this option to <strong>view, edit,<\/strong> or\u00a0<strong>delete<\/strong> namespaces. Deleting a namespace that is mapped to any component is restricted. You need to unmap the namespace from all associated components before deletion. As mentioned earlier, you cannot delete the default namespace.<\/p>\n<p>&nbsp;<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101804\/VM_manageNamespace.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24764\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101804\/VM_manageNamespace.png\" alt=\"\" width=\"775\" height=\"281\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101804\/VM_manageNamespace.png 775w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101804\/VM_manageNamespace-300x109.png 300w\" sizes=\"auto, (max-width: 775px) 100vw, 775px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Mapping\">Mapping<\/span><\/h2>\n<p>Once created, the namespace needs to be mapped to variables, tasks, and other bot components. This will ensure that only the variables that belong to the namespace mapped to a component would be loaded at the time of execution.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Variable_Mapping\">Variable Mapping<\/span><\/h3>\n<p>At the time of variable creation (global and content), you can map the namespace. By default, the variables would be assigned to the <strong>default<\/strong> namespace. A variable can be mapped to multiple namespaces. You can change the mapping later by editing the variable definition.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101322\/VM_varMapping-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24760\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101322\/VM_varMapping-1.png\" alt=\"\" width=\"495\" height=\"527\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101322\/VM_varMapping-1.png 495w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021101322\/VM_varMapping-1-282x300.png 282w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Components\">Components<\/span><\/h3>\n<p>All the components have a\u00a0<strong>Manage Variable Namespaces<\/strong> action item which can be used to map the component with a particular namespace.<\/p>\n<h4>Tasks &#8211; (Dialog, Alert, Action, Information)<\/h4>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021103217\/VM_manageNamespaceTask.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24766\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021103217\/VM_manageNamespaceTask.png\" alt=\"\" width=\"1365\" height=\"497\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021103217\/VM_manageNamespaceTask.png 1365w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021103217\/VM_manageNamespaceTask-300x109.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021103217\/VM_manageNamespaceTask-1024x373.png 1024w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/a><\/p>\n<h4>Nodes within Dialog Tasks<\/h4>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130411\/VM_manageNamespaceNode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24772\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130411\/VM_manageNamespaceNode.png\" alt=\"\" width=\"791\" height=\"509\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130411\/VM_manageNamespaceNode.png 791w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130411\/VM_manageNamespaceNode-300x193.png 300w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/a><\/p>\n<h4>Knowledge Graph<\/h4>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130309\/VM_manageNamespaceKG.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24770\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130309\/VM_manageNamespaceKG.png\" alt=\"\" width=\"1364\" height=\"404\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130309\/VM_manageNamespaceKG.png 1364w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130309\/VM_manageNamespaceKG-300x89.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130309\/VM_manageNamespaceKG-1024x303.png 1024w\" sizes=\"auto, (max-width: 1364px) 100vw, 1364px\" \/><\/a><\/p>\n<h4>Small Talk<\/h4>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130523\/VM_manageNamespaceST.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24776\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130523\/VM_manageNamespaceST.png\" alt=\"\" width=\"1353\" height=\"496\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130523\/VM_manageNamespaceST.png 1353w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130523\/VM_manageNamespaceST-300x110.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130523\/VM_manageNamespaceST-1024x375.png 1024w\" sizes=\"auto, (max-width: 1353px) 100vw, 1353px\" \/><\/a><\/p>\n<h4>Event Handlers<\/h4>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130443\/VM_manageNamespaceEvent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24774\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130443\/VM_manageNamespaceEvent.png\" alt=\"\" width=\"1347\" height=\"271\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130443\/VM_manageNamespaceEvent.png 1347w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130443\/VM_manageNamespaceEvent-300x60.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201021130443\/VM_manageNamespaceEvent-1024x206.png 1024w\" sizes=\"auto, (max-width: 1347px) 100vw, 1347px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"(This feature was introduced in ver8.0) Chances are you have defined tens or hundreds of (Global or Content) variables and used them in the bot definitions. These variables could have been used in defining text prompts or messages, JavaScript, transitions, and service call definitions. Loading all these variables for every single task irrespective of their...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-24824","post","type-post","status-publish","format-standard","hentry","category-bots-management"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/comments?post=24824"}],"version-history":[{"count":3,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24824\/revisions"}],"predecessor-version":[{"id":25967,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24824\/revisions\/25967"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/media?parent=24824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/categories?post=24824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/tags?post=24824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}