{"id":17685,"date":"2016-06-02T20:21:09","date_gmt":"2016-06-02T20:21:09","guid":{"rendered":"http:\/\/apidocs.kore.com\/?post_type=docs&#038;p=1820"},"modified":"2021-03-30T12:53:04","modified_gmt":"2021-03-30T11:53:04","slug":"creatingflows","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-1\/docs\/bots\/bot-builder-tool\/action-info-task\/creatingflows\/","title":{"rendered":"Flows"},"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>Bot Builder Platform offers the unique ability to map bot tasks to other bot tasks within the same or different bot.<br \/>\nFor example, you can match an <em>Add a Comment<\/em> or <em>Assign a Ticket<\/em> task to an alert that occurs when a new service ticket is created. The event data detailed within alert tasks can be used to auto-populate the input field of Action tasks in the same or different system. Bots also can suggest actions to the user based on the content found within an alert and support the automatic execution of actions based on event data.<br \/>\nFlow tasks link a message response from one task to another related task of the same, or different bot. You can create flows between different Bots from action tasks to action tasks, alert tasks to action tasks, and alert tasks to dialog tasks.<br \/>\nTo map dialog tasks to other dialog tasks, or to sub-intents within the dialog task, you must use conditional transitions. For more information, see <a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/develop\/dialog-task\/working-with-the-user-intent-dialog-node\/#Working_with_the_Dialog_Node\">Creating Dialog Task Flows<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium 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 id=\"flows\"><span class=\"ez-toc-section\" id=\"How_Flows_Work\">How Flows Work<\/span><\/h2>\n<p>When a bot sends a message to a user, they can click the task icon located to the right of the message\u00a0to display the tasks mapped to the task as a flow\u00a0as shown in the following image. The user can use the <em>Tweet<\/em> task to tweet the message, or post to their <em>Linked In<\/em> account using the <em>Share Post<\/em> task.<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/DIYBotBuilderTwitterTasks.png\"><br \/>\n<\/a><br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/DIYFlowsActionTasksInClient.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8920\" src=\"\/wp-content\/uploads\/sites\/12\/DIYFlowsActionTasksInClient.png\" alt=\"Flows with Actions in Kore.ai Messenger\" width=\"651\" height=\"644\" \/><\/a><br \/>\nTo view the mapped tasks, the user can click the\u00a0<strong>Task<\/strong> icon, selects a task, and then define the parameters for the task.<br \/>\nYou can use parameters from the first task&#8217;s payload to pre-populate fields in the following tasks. For example, in a\u00a0<em>Twitter<\/em>\u00a0task payload response, the <strong>New Follower Name<\/strong>\u00a0can be\u00a0pre-populated in the <em>Salesforce Create Contact<\/em> task.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium 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=\"Creating_a_Flow\">Creating a Flow<\/span><\/h2>\n<p>To create a new flow, you need an existing bot as well as at least one published task. For more information, see <a href=\"\/v7-1\/docs\/bots\/bot-builder\/defining-bot-tasks\/\">Defining Bot Tasks<\/a>.<br \/>\nFollow these steps to create a Flow:<\/p>\n<ol>\n<li>Open the bot in which you want to create a Flow.<\/li>\n<li>Hover over the left-side navigation panel, and click <strong>Bot Tasks<\/strong>.<\/li>\n<li>On the Bot Tasks page, hover over the\u00a0<strong>Flows<\/strong> tab and click the plus icon<strong>.\u00a0<\/strong><\/li>\n<li>The\u00a0<strong>Create Flow<\/strong>\u00a0page opens.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Create-Flows.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14497\" src=\"\/wp-content\/uploads\/sites\/12\/Create-Flows.png\" alt=\"\" width=\"1358\" height=\"309\" \/><\/a><\/li>\n<li>In the <strong>When this Task is triggered\/executed<\/strong> column on the left, click <strong>Click to select a Task<\/strong> to display the tasks available.\n<div class=\"alert alert-info\"><strong>Note:<\/strong> Only tasks that are published and approved by the Bots Admin are displayed as options to create a flow.<\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Select-tasks.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14498\" src=\"\/wp-content\/uploads\/sites\/12\/Select-tasks.png\" alt=\"\" width=\"357\" height=\"300\" \/><\/a><\/li>\n<li>Select the task that you want to add a\u00a0flow to, for example, <b>Schedule Weather Report<\/b>. A list of fields is displayed for mapping.<\/li>\n<li>In the <strong>Execute this Task<\/strong> column on the right, click <strong>Click to select a Bot<\/strong> and choose a Bot for the task that you will map to, for example,\u00a0<strong>Flight Management<\/strong>.<\/li>\n<li>For the second bot, select\u00a0<strong>Click to select a Task<\/strong> to map the bot tasks and display the field mapping dialog.<\/li>\n<li>Drag-and-drop fields in the <strong>When this Task is triggered\/executed<\/strong> column on the left to the Field section on the right for the following fields:\n<ul>\n<li><strong>Label Mapping<\/strong> &#8211; The field label displayed to the end-user.<\/li>\n<li><strong>Value Mapping<\/strong> &#8211; The value displayed in the field for the end-user.<\/li>\n<\/ul>\n<\/li>\n<li>Click the expand text area icon to display the mapping fields in a full-size editor.<\/li>\n<li>After you map a parameter from one\u00a0task to the next task, select one of the following options shown in the previous illustration for each <strong style=\"line-height: 1.42857;\">Field<\/strong><span style=\"line-height: 1.42857;\"> displayed:<\/span>\n<ul>\n<li><strong>Editable<\/strong> &#8211; The mapped value is displayed and editable by the end-user.<\/li>\n<li><strong>Hidden<\/strong> &#8211; The <strong>Field<\/strong> is not displayed to the end-user. For example, you may need to pass a <span class=\"wysiwyg-color-blue\">User ID<\/span> to the Bot, but only display the <span class=\"wysiwyg-color-blue\">User Name<\/span> drop-down to the end-user.<\/li>\n<li><strong>Read Only<\/strong> &#8211; The <strong>Field<\/strong> and mapped value is displayed, but not editable by the end-user. For example, for the <em>Assign Task<\/em>\u00a0task for <em>Asana<\/em>, you need the <em>Task Id<\/em> and <em>Workspace<\/em>, which can be mapped from the <em>Asana<\/em> <em>Task Updates<\/em> alert task, but are read-only because the end-user only needs to select which user to assign the task to.<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Next Step<\/strong> to display the <strong>Mapping Name<\/strong> section.<\/li>\n<li>Enter the name of the mapping used in Bot\u00a0Builder in the <strong>Mapping Name<\/strong> field to identify this mapping for the flow. Optionally, select <strong>Mark this Task\u00a0as Suggested Task<\/strong>\u00a0to show the task\u00a0on the <strong>Suggested Tasks<\/strong>\u00a0tab.<\/li>\n<li>If all mandatory fields for the task are defined, the\u00a0<strong>Allow flow automation<\/strong> option is displayed.<br \/>\nWhen selected, the end-user can enable this task to run automatically. For example, when an alert message for <em>Crashlytics<\/em> indicates a server is down, using the predefined mapped fields, a <em>JIRA<\/em> ticket can be automatically created without additional end-user input provided all required fields are mapped.<\/li>\n<li>Click <strong>Save &amp; Exit<\/strong> to save the flow and close the <strong>Create Flow<\/strong> page.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium 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=\"Publishing_a_Flow\">Publishing a Flow<\/span><\/h2>\n<p>After you configure your flow, you must publish the flow to make the mapping from one task to another available for end-users.<br \/>\n<strong>To publish a flow<\/strong><\/p>\n<ol>\n<li>Open the bot that contains the Flow.\n<div class=\"alert alert-info\"><strong>Note:<\/strong> Only flows with status set to <strong>Configured<\/strong> can be published.<\/div>\n<\/li>\n<li>Hover over the left-side navigation panel and click <strong>Publish<\/strong>.<\/li>\n<li>Click the <strong>Settings<\/strong> <img loading=\"lazy\" decoding=\"async\" class=\"icon alignnone wp-image-6240 size-full\" src=\"\/wp-content\/uploads\/sites\/12\/DIYSettingsIcon-2.png\" width=\"18\" height=\"18\" \/>\u00a0icon for the flow you want to publish, and then click <strong>Publish<\/strong>.<\/li>\n<\/ol>\n<p>The Flow published successfully message is displayed and the flow is immediately available for any users that add the task to their account when the flow\u00a0is saved. You can edit the flow at any time and changes are applied immediately for end-users when the flow is saved for any published task approved and deployed by the Bots Admin.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium 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":"Bot Builder Platform offers the unique ability to map bot tasks to other bot tasks within the same or different bot. For example, you can match an Add a Comment or Assign a Ticket task to an alert that occurs when a new service ticket is created. The event data detailed within alert tasks can...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-17685","post","type-post","status-publish","format-standard","hentry","category-action-info-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/17685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/comments?post=17685"}],"version-history":[{"count":3,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/17685\/revisions"}],"predecessor-version":[{"id":20701,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/17685\/revisions\/20701"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/media?parent=17685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/categories?post=17685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/tags?post=17685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}