{"id":29555,"date":"2021-08-11T18:08:33","date_gmt":"2021-08-11T17:08:33","guid":{"rendered":"https:\/\/multisite.korebots.com\/?p=29555"},"modified":"2021-08-24T11:57:20","modified_gmt":"2021-08-24T10:57:20","slug":"script-task","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/process-apps\/flow\/tasks\/script-task\/","title":{"rendered":"Script Task"},"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><span style=\"font-weight: 400\">The Script Task allows you to add or modify the data to use during the execution of a flow. In the Script Task, you can use JavaScript to access the required data. It also allows you to add or modify variables.\u00a0<\/span><\/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=\"Configure_Script_Task\"><b>Configure Script Task<\/b><\/span><\/h2>\n<p><span style=\"font-weight: 400\">To configure a Script Task in the process flow, follow the below steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the left pane, you can find the <\/span><b>Tasks <\/b><span style=\"font-weight: 400\">section. Drag and drop the <\/span><b>Script Task <\/b><span style=\"font-weight: 400\">stencil from this section to the builder.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><b>Script Task <\/b><span style=\"font-weight: 400\">stencil to open the Script Task<\/span> <span style=\"font-weight: 400\">window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Script Task window, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><b>Name <\/b><span style=\"font-weight: 400\">&#8211; Enter a name for the script task.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Define Script<\/b><span style=\"font-weight: 400\"> &#8211; In the JavaScript editor, enter the script to access the required data.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the Script Task window.<\/span><\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210816155516\/script-task-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210816155516\/script-task-2.jpg\" alt=\"\" width=\"456\" height=\"504\" class=\"alignnone size-full wp-image-31459\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210816155516\/script-task-2.jpg 456w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210816155516\/script-task-2-271x300.jpg 271w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The Script Task allows you to add or modify the data to use during the execution of a flow. In the Script Task, you can use JavaScript to access the required data. It also allows you to add or modify variables.\u00a0 Configure Script Task To configure a Script Task in the process flow, follow the...","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[],"class_list":["post-29555","post","type-post","status-publish","format-standard","hentry","category-tasks"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/29555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=29555"}],"version-history":[{"count":5,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/29555\/revisions"}],"predecessor-version":[{"id":31703,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/29555\/revisions\/31703"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=29555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=29555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=29555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}