{"id":1920,"date":"2022-07-08T14:23:03","date_gmt":"2022-07-08T14:23:03","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1920"},"modified":"2022-07-14T08:57:09","modified_gmt":"2022-07-14T08:57:09","slug":"flowcharts-calls","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/flowcharts-calls\/","title":{"rendered":"Flowcharts&#8217; Calls"},"content":{"rendered":"\n<p><span style=\"font-size:17px;\">Release date: 2021-06-12<\/span><\/p>\n\n\n\n<p><span style=\"font-size:17px\"><b>Possibility to call a Flowchart from another Flowchart<\/b><\/span><\/p>\n\n\n\n<p>&nbsp;New operator <strong><span style=\"color:#ec8f45;\">Call Service<\/span><\/strong> allows calling a flowchart from the other flowchart:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-1-1024x332.png\" alt=\"\" class=\"wp-image-1923\" width=\"774\" height=\"251\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-1-1024x332.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-1-300x97.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-1-768x249.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-1.png 1482w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/figure>\n\n\n\n<p>Select Service from the dropdown and provide Service Parameters with data.&nbsp; The flowchart implementing this service will be called and provide the result which can be used further in this flowchart.<\/p>\n\n\n\n<p>Prior to calling the Service, please perform the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>LB Services<\/strong> Extension must be deployed on Sugar Instance. Find and download <a href=\"https:\/\/integroscrm.com\/lb-components\/\">here<\/a> LB Services Extension version that corresponds to your Sugar version.<\/li><li>Service must be registered in Sugar &#8211; it must be a record in LB Service module with specified <em>System Name<\/em> and service <em>Arguments<\/em>.<\/li><li>Flowchart that implements Service must be deployed.<\/li><\/ol>\n\n\n\n<p>Such a flowchart starts with <strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong> and describes what should happen when Service is called. When a result is expected (data in <em>result<\/em> port in Call Service operator), this result must be set with operator <strong><span style=\"color:#ec8f45;\">Set Service Result<\/span><\/strong> in the flowchart that implements Service:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-2.png\" alt=\"\" class=\"wp-image-1924\" width=\"495\" height=\"249\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-2.png 762w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-2-300x151.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/figure>\n\n\n\n<p><strong>Example of usage<\/strong><\/p>\n\n\n\n<p>Let\u2019s say there are a bunch of flowcharts with the same steps to create a Task. Instead of performing the same steps in each flowchart, it is possible to create the Service and then re-use it.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Register Service in Sugar.<\/li><\/ol>\n\n\n\n<p>&nbsp;For this, just create a record in LB Services module and provide arguments that are needed to be filled to create Task:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-3-1024x470.png\" alt=\"\" class=\"wp-image-1925\" width=\"939\" height=\"431\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-3-1024x470.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-3-300x138.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-3-768x352.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-3.png 1387w\" sizes=\"auto, (max-width: 939px) 100vw, 939px\" \/><\/figure>\n\n\n\n<p><em>N.B. Each time you add a new Service into Sugar it is needed to update the Metadata in the Logic Builder to work with the newly added Service.<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Create a Flowchart starting from <strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong> to create a Task using parameters that will be input in the Service. In a <em>result<\/em> input the Task ID.<\/li><\/ol>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-4.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-4-1024x297.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Deploy the flowchart into Sugar. Now you can use created Service in other flowcharts, e.g when Case with Type Product is added:<\/li><\/ol>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-5.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-5-1024x533.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Also, it is possible to link the Task to other entities using <em><span style=\"color:#ec8f45;\">result<\/span><\/em> output port from the <strong><span style=\"color:#ec8f45;\">Call Service<\/span><\/strong>:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-6.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-6-1024x348.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><span style=\"font-size:17px\"><b>New Validation Possibilities<\/b><\/span><\/p>\n\n\n\n<p>Operator <strong><span style=\"color:#ec8f45;\">Throw Exception<\/span><\/strong> allows addressing the challenges of data validation. For example, when data comes through API to Sugar from an external system \u2013 prior to applying changes or saving a record you could implement additional rules, and return an error when rules are violated.&nbsp;<\/p>\n\n\n\n<p>Throw Exception result is also seen in interface to users.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-7-1024x462.png\" alt=\"\" class=\"wp-image-1929\" width=\"698\" height=\"315\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-7-1024x462.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-7-300x135.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-7-768x347.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-7.png 1085w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/figure>\n\n\n\n<p><strong>N.B. <\/strong>For validation rules, use error code 422<\/p>\n\n\n\n<p><strong>Example of usage<\/strong><\/p>\n\n\n\n<p>Let\u2019s say that Quotes with \u201cDiscount Amount\u201d more than 20% must be approved by Manager. To implement this rule, a Quote must not be moved forward prior to the approval either by a user or by API request.<\/p>\n\n\n\n<p>&nbsp;So the flowchart which implements all sets of checks ends with Throw Exception when conditions aren\u2019t met:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-8.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-8-1024x453.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>&nbsp;As a result, when criteria of the rule is violated, a user sees the following error in the interface:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"245\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-9-1024x245.png\" alt=\"\" class=\"wp-image-1931\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-9-1024x245.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-9-300x72.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-9-768x184.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-9.png 1456w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>&nbsp;External Clients get the following error in the API response:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-10.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-10-1024x390.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><span style=\"font-size:17px\"><b>Possibility to round numbers<\/b><\/span><\/p>\n\n\n\n<p>Operator <strong><span style=\"color:#ec8f45;\">Round<\/span><\/strong> allows rounding a value to specified precision (number of digits after the decimal point):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-11-1024x401.png\" alt=\"\" class=\"wp-image-1933\" width=\"705\" height=\"276\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-11-1024x401.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-11-300x118.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-11-768x301.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/07\/flowcharts-calls-11.png 1294w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<p><strong>Precision<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the precision is positive, a value is rounded to defined in precision significant digits after the decimal point.<\/li><li>If the precision is negative, a value is rounded to defined in precision significant digits before the decimal point (e.g. for a precision of -1 value is rounded to tens, for a precision of -2 to hundreds, etc.)<\/li><\/ul>\n\n\n\n<p><strong>Round Type:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>Round Half Up<\/em> Rounds a value away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.<\/li><li><em>Round Half Down <\/em>Rounds a value towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.<\/li><li><em>Round Half Even<\/em> Rounds a value towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.<\/li><li><em>Round Half Odd<\/em> Rounds a value towards the nearest odd value when it is half way there, making 1.5 into 1 and 2.5 into 3.<\/li><li><em>Round Up<\/em> Rounds a value away from zero, making 1.5 into 2<\/li><li><em>Round Down<\/em> Rounds a value towards zero, making 1.5 into 1<\/li><\/ul>\n\n\n\n<p><span style=\"font-size:17px\"><b>Sugar 11.0.x Compatibility<\/b><\/span><\/p>\n\n\n\n<p>Packages generated from Logic Builder are fully compatible with Sugar 11.0.x (Q2 2021 release).<\/p>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1920' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1920\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-aed6b99a09c76' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-aed6b99a09c76'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1920' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-aed6b99a09c76\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1920\" \n                               id=\"yasr-stats-dashicon-aed6b99a09c76\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-aed6b99a09c76\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-aed6b99a09c76\">0<\/span>  Average: <span id=\"yasr-vv-average-container-aed6b99a09c76\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-aed6b99a09c76' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-aed6b99a09c76' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Release date: 2021-06-12 Possibility to call a Flowchart from another Flowchart &nbsp;New operator Call Service allows calling a flowchart from the other flowchart: Select Service from the dropdown and provide Service Parameters with data.&nbsp; The flowchart implementing this service will be called and provide the result which can be used further in this flowchart. Prior &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/flowcharts-calls\/\"> <span class=\"screen-reader-text\">Flowcharts&#8217; Calls<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-1920","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=1920"}],"version-history":[{"count":5,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1920\/revisions"}],"predecessor-version":[{"id":1973,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1920\/revisions\/1973"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1920"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}