{"id":26240,"date":"2021-01-27T11:37:58","date_gmt":"2021-01-27T11:37:58","guid":{"rendered":"https:\/\/multisite.korebots.com\/v9-0\/?p=26240"},"modified":"2021-02-18T04:42:10","modified_gmt":"2021-02-18T04:42:10","slug":"collections","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/v9-0\/docs\/bots\/bot-admin\/bots-management\/collections\/","title":{"rendered":"Collections"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>Collections enable you to store multiple value sets for Environment Variables so that you can select the appropriate variable set while promoting the bot definition to a different environment without manual intervention.<\/p>\n<p class=\"note\">Note: This feature was enabled in v8.1 of the platform and is available only for the <span style=\"text-decoration: underline;\">on-prem installation.<\/span><\/p>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>Environment variables are a primary type of bot variables where you define a key-value pair and use the variable across the bot. As the variables are declared globally, they can be used at any point in the bot configuration. These can be used to manage the bot variables with environment-specific values. For example, you might have\u00a0<em>authCode<\/em> for authenticating a service that your bot uses. This authCode may have different values in the\u00a0<em>test, uat,<\/em> and <em>prod<\/em> environments. The bot can be exported and imported based on the environment, and the values need to modified at one place in the variable configuration file. <a href=\"\/docs\/bots\/bot-settings\/bot-management\/using-bot-variables\/#Environment_Variables\" target=\"_blank\" rel=\"noopener noreferrer\">Refer here for more on Bot Variables<\/a>.<\/p>\n<p>Using collections, you can define multiple value sets for these variables and designate an active collection for the values to be used while bot execution. Instead of changing the values manually while moving the bot from one environment to another, you can define the values during bot development and set the active collection in different environments to use the appropriate values.<\/p>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Creation\"><\/span>Creation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Following are the steps in creating Collections<\/p>\n<ol>\n<li>From the left navigation menu, select\u00a0<strong>Settings -&gt; Config Settings<\/strong><\/li>\n<li>Click the\u00a0<strong>Environment Variables<\/strong> option<\/li>\n<li>On the top left click the more\/ellipses to access the\u00a0<strong>Manage Collections<\/strong><br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128035714\/collection-manage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26596\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128035714\/collection-manage.png\" alt=\"\" width=\"1365\" height=\"415\" \/><\/a><\/li>\n<li>This would open the Manage Collections page<\/li>\n<li>Click\u00a0<strong>Add New Collection<\/strong><\/li>\n<li>Enter the following details:\n<ol>\n<li><em>Collection Name<\/em>,<\/li>\n<li><em>Description,<\/em><\/li>\n<li>Select the Collection you want to <em>Clone From<\/em> &#8211; This would create the new collection with all the values from the selected clone, you can later edit the values as per requirement.<br \/>\nThe first time you create a collection, a\u00a0<strong>Default<\/strong> collection is created by the platform and is set as the Active Collection.<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128035826\/collection-creation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26598\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128035826\/collection-creation.png\" alt=\"\" width=\"799\" height=\"767\" \/><\/a><\/li>\n<li><strong>Save<\/strong> the collection<\/li>\n<\/ol>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Adding_Values\"><\/span>Adding Values<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Create Environment Variables and add collection-specific values using the following steps:<\/p>\n<ol>\n<li>From the left navigation menu, select\u00a0<strong>Settings -&gt; Config Settings<\/strong><\/li>\n<li>Click the\u00a0<strong>Environment Variables<\/strong> option<\/li>\n<li>Click\u00a0<strong>Add Environment Variable.<\/strong> You can also use the edit icon against an existing Environment Variable to add values.<\/li>\n<li>This would open the Add\/Edit Environment Variable page<\/li>\n<li>Enter the following details:\n<ol>\n<li><em>Variable Name<\/em>,<\/li>\n<li>Against the listed <em>Collection Name,<\/em> enter the appropriate <em>Value,<\/em><\/li>\n<li>Enter developer notes in the\u00a0<em>Notes <\/em>field. While this is an optional field, entering useful notes can help the developer working on the target bot to understand and provide relevant values.<\/li>\n<li><em>Group<\/em>\u00a0can be used to categorize the variable.<\/li>\n<li>Assign a <em>Namespace<\/em> if enabled (<a href=\"\/docs\/bots\/bot-settings\/bot-management\/managing-namespace\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here for more<\/a>).<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040206\/collection-values.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26600\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040206\/collection-values.png\" alt=\"\" width=\"499\" height=\"767\" \/><\/a><\/li>\n<li><strong>Save<\/strong> the Variable<\/li>\n<\/ol>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Active_Collection\"><\/span>Active Collection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li>Click <strong>Manage Collections<\/strong> to access the Collections listing window<\/li>\n<li><strong>Mark as Active<\/strong> any one of the Collections created. The values from the Active collection are while executing the bot definition.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040543\/collection-listing.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26604\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040543\/collection-listing.png\" alt=\"\" width=\"797\" height=\"285\" \/><\/a><\/li>\n<li>When exporting the bot definition, you can mark as Active the collection to be set for the target bot. The export file would contain the details of all the collections as well as the collection-specific values.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040826\/collection-export1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-26606\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210128040826\/collection-export1.png\" alt=\"\" width=\"1365\" height=\"549\" \/><\/a><\/li>\n<li>Bot Import\n<ul>\n<li>To a New bot &#8211; All the collections, collection-specific values, and the active collection information would be imported into the newly created bot<\/li>\n<li>Full Bot Import &#8211; All the details as available in the export file would be imported into the newly created bot. Any existing collections and the collection-specific values would be overwritten with the details present in the export file.If the file has multiple collections but the target bot has does not have any collections, then the collections from the file would be imported into the target bot.<br \/>\nIf the file does not have collections but the target bot has collections, then the collections would be removed from the target bot.<\/li>\n<li>Incremental Bot Import &#8211; The \u2018incremental import\u2019 will be allowed only when the collections from the file exactly match with the collections in the target botWhen the collections in the export file and bot are the same, the values from the file would override the values in the target bot, and any additional variables in the file will be imported into the target bot with the corresponding values. Any additional variables in the bot target bot would be retained as-is.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Import_Export\"><\/span>Import &amp; Export<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li>The <strong>Bot Export<\/strong> file would contain the details of all the collections as well as the collection-specific values. The setting of a collection as \u2018active\u2019 would be reflected in the export file<\/li>\n<li><strong>Bot Import<\/strong>\n<ul>\n<li>To a New bot &#8211; All the collections, collection-specific values, and the active collection information would be imported into the newly created bot<\/li>\n<li>Full Bot Import &#8211; All the details as available in the export file would be imported into the newly created bot. Any existing collections and the collection-specific values would be overwritten with the details present in the export file.If the file has multiple collections but the target bot has does not have any collections, then the collections from the file would be imported into the target bot.<br \/>\nIf the file does not have collections but the target bot has collections, then the collections would be removed from the target bot.<\/li>\n<li>Incremental Bot Import &#8211; The \u2018incremental import\u2019 will be allowed only when the collections from the file exactly match with the collections in the target botWhen the collections in the export file and bot are the same, the values from the file would override the values in the target bot, and any additional variables in the file will be imported into the target bot with the corresponding values. Any additional variables in the bot target bot would be retained as-is.<\/li>\n<\/ul>\n<\/li>\n<li>Variable Import &#8211; The &#8216;variables import\u2019 would be allowed only when the collections from the file exactly match with the collections in the target bot.When the collections in the export file and bot are the same the values from the file would override the values in the target bot. Any additional variables in the file will be imported into the target bot with the corresponding values. Any additional variables in the bot target bot will be retained as-is.<\/li>\n<li>Variable Export &#8211; The Variables export would include all the collections available in the bot and mapping of variables to collections. Note if the bot does not have any collections but the account has \u2018collections enabled\u2019, the export would be restricted.<\/li>\n<\/ol>\n<\/div><\/div><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><\/section>\n","protected":false},"excerpt":{"rendered":"Collections enable you to store multiple value sets for Environment Variables so that you can select the appropriate variable set while promoting the bot definition to a different environment without manual intervention. Note: This feature was enabled in v8.1 of the platform and is available only for the on-prem installation. Environment variables are a primary...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/26240"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/comments?post=26240"}],"version-history":[{"count":8,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/26240\/revisions"}],"predecessor-version":[{"id":26891,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/26240\/revisions\/26891"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/media?parent=26240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/categories?post=26240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/tags?post=26240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}