{"id":1600,"date":"2022-05-31T19:42:34","date_gmt":"2022-05-31T19:42:34","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1600"},"modified":"2022-05-31T19:45:16","modified_gmt":"2022-05-31T19:45:16","slug":"lb-sugarbpm-extension","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/lb-sugarbpm-extension\/","title":{"rendered":"LB SugarBPM Extension"},"content":{"rendered":"\n<p>Logic Builder Extension for SugarBPM allows calling a flowchart from Process Definition and getting back a result from a flowchart to update a value in a field or evaluate in a Gateway.<\/p>\n\n\n\n<p>LB Extension for SugarBPM empowers SugarBPM with Logic Builder with the following possibilities of:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>calling an external system from SugarBPM<\/li><li>sending Emails with PDF attachments<\/li><li>working with various unrelated records within Sugar<\/li><\/ul>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p><a href=\"https:\/\/teams.microsoft.com\/l\/entity\/com.microsoft.teamspace.tab.wiki\/tab::4d4d3869-05d6-4ca2-82f6-66feba7d2634?context=%7B%22subEntityId%22%3A%22%7B%5C%22pageId%5C%22%3A189%2C%5C%22sectionId%5C%22%3A202%2C%5C%22origin%5C%22%3A2%7D%22%2C%22channelId%22%3A%2219%3AGV9ENoo222eBigmZM5UOMu1ahG_codh5dcdV6Bl6gJU1%40thread.tacv2%22%7D&amp;tenantId=519e02e0-0228-4124-a564-a7023ebd5bf3\" rel=\"noreferrer noopener\" target=\"_blank\">LB Services<\/a>&nbsp;Extension is required to use LB Extension for SugarBPM<\/p>\n<\/div>\n\n\n<p><\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Once LB Extension for SugarBPM is successfully deployed, please clean the browser cache to see newly added Actions.<\/p>\n<\/div>\n\n\n<p>LB Extension for SugarBPM adds two new Actions:<\/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\/05\/img-205-3a13930e23134543b753848c6edfb26f.png\" alt=\"\" class=\"wp-image-1605\" width=\"612\" height=\"399\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3a13930e23134543b753848c6edfb26f.png 735w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3a13930e23134543b753848c6edfb26f-300x196.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/figure>\n\n\n\n<p><strong>LB: Service Call<\/strong>&nbsp;allows calling a flowchart from Process Definition, passing parameters from Process Definition to a flowchart, and getting parameters back from a flowchart to Process Definition to update values in fields and\/or further evaluation in Gateways.<\/p>\n\n\n\n<p><strong>LB: Change field<\/strong>&nbsp;works in the same way as the standard Action&nbsp;<a href=\"https:\/\/support.sugarcrm.com\/Documentation\/Sugar_Versions\/12.0\/Ent\/Administration_Guide\/SugarBPM\/Process_Definitions\/#Change_Field\" rel=\"noreferrer noopener\" target=\"_blank\">Change Field<\/a>, but the value for a field can be selected from a previously called flowchart(s).<\/p>\n\n\n\n<p>To use Flowchart in Process Definition:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a Service record in LB Services Module, specify input and output arguments.<\/li><li>Configure and deploy a flowchart that will be called from Process Definition.<\/li><li>Configure Process Definition to call the flowchart, use results from the flowchart in Exclusive and Inclusive Gateways for evaluation, and use values from the flowchart to update values in the record\u2019s fields.<\/li><\/ol>\n\n\n\n<p><b>Create a Flowchart that will be called from SugarBPM<\/b><\/p>\n\n\n\n<p>The start operator for the flowchart that can be called from Process Definition is&nbsp;<strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong>. So, to create such flowchart, create a Service in LB Service Module in Sugar first.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Please follow&nbsp;<a href=\"https:\/\/teams.microsoft.com\/l\/entity\/com.microsoft.teamspace.tab.wiki\/tab::4d4d3869-05d6-4ca2-82f6-66feba7d2634?context=%7B%22subEntityId%22%3A%22%7B%5C%22pageId%5C%22%3A189%2C%5C%22sectionId%5C%22%3A202%2C%5C%22origin%5C%22%3A2%7D%22%2C%22channelId%22%3A%2219%3AGV9ENoo222eBigmZM5UOMu1ahG_codh5dcdV6Bl6gJU1%40thread.tacv2%22%7D&amp;tenantId=519e02e0-0228-4124-a564-a7023ebd5bf3\" rel=\"noreferrer noopener\" target=\"_blank\">LB Services<\/a>&nbsp;Documentation to find out more about LB Services Extension.<\/p>\n<\/div>\n\n\n<p>Please note that arguments in the Service do not have input or output direction. It is up to you which arguments\u2019 values you are going to input in a Process Definition and then use in the flowchart, or which are going to be set in the flowchart and then are used to set values with&nbsp;<strong>LB: Service Call<\/strong>&nbsp;or&nbsp;<strong>LB: Change Field Actions<\/strong>.<\/p>\n\n\n\n<p>If a value from the flowchart is going to be a part of the evaluation criteria in Exclusive or Inclusive Gateway, create an argument&nbsp;<em>return<\/em>&nbsp;for it. The value of this reserved argument can be evaluated in Gateways.<\/p>\n\n\n\n<p>Let&#8217;s say that we need to create a flowchart that counts the number of Leads in work assigned to a Sales Rep. In the example below, we are using the argument&nbsp;<em>user_id<\/em>&nbsp;which value is going to be set in Process Definition and the argument&nbsp;<em>return<\/em>&nbsp;which is going to be set in the flowchart and then evaluated in Gateway.<\/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\/05\/img-205-73312f46a83e41ce89feeb29e616aa4c.png\" alt=\"\" class=\"wp-image-1616\" width=\"838\" height=\"193\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-73312f46a83e41ce89feeb29e616aa4c.png 993w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-73312f46a83e41ce89feeb29e616aa4c-300x69.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-73312f46a83e41ce89feeb29e616aa4c-768x177.png 768w\" sizes=\"auto, (max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p>The flowchart that implements mentioned above may be like this:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-f40b2cd1e97745f5b7932628f1816398.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-f40b2cd1e97745f5b7932628f1816398-1024x414.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Please keep in mind the following notes when configuring the flowchart that will be called from Process Definition:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Dropdown\/multiselect field value usage<\/li><\/ul>\n\n\n\n<p>If you pass dropdown\/multiselect from Process Definition to the flowchart, it will pass the&nbsp;<em>Display Label<\/em>&nbsp;of the value, not the&nbsp;<em>Item Name<\/em>&nbsp;(key). Consider this when building evaluation criteria in the flowchart, for example, use&nbsp;<strong><span style=\"color:#ec8f45;\">Get Dropdown Display Label<\/span><\/strong>:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c82cc39ca2bd4998be0fa9e19e2a21c1.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c82cc39ca2bd4998be0fa9e19e2a21c1-1024x334.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<ul class=\"wp-block-list\"><li>Checkbox field value usage<\/li><\/ul>\n\n\n\n<p>If you pass a checkbox value from Process Definition to a flowchart, it will pass the value&nbsp;<em>Yes<\/em>&nbsp;or&nbsp;<em>No<\/em>. Consider this when building evaluation criteria in the flowchart, for example, compare the value with&nbsp;<strong><span style=\"color:#ec8f45;\">String<\/span><\/strong>:<\/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\/05\/img-205-5b476362793441b9ab1ccf8d1b3b699d-1024x359.png\" alt=\"\" class=\"wp-image-1606\" width=\"873\" height=\"306\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5b476362793441b9ab1ccf8d1b3b699d-1024x359.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5b476362793441b9ab1ccf8d1b3b699d-300x105.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5b476362793441b9ab1ccf8d1b3b699d-768x269.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5b476362793441b9ab1ccf8d1b3b699d.png 1280w\" sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Target Module Record usage<\/li><\/ul>\n\n\n\n<p>Since the Target Module Record is processing by Running Process itself you should avoid:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Using&nbsp;<strong><span style=\"color:#ec8f45;\">Retrieve Entity<\/span><\/strong>&nbsp;to get the record or&nbsp;<strong><span style=\"color:#ec8f45;\">Get Entity Attributes<\/span><\/strong>&nbsp;to get field values. During SugarBPM process execution the record may be changed, while the flowchart gets the record as it was prior to any changes made by Process.&nbsp;Pass needed values from the record directly through the service arguments instead.<\/li><li>Applying any changes to the Target Module Record with <strong><span style=\"color:#ec8f45;\">Set Entity Attributes<\/span><\/strong> or <strong><span style=\"color:#ec8f45;\">Save Entity<\/span><\/strong>. Use <strong>LB: Service Call<\/strong> or <strong>LB: Change field<\/strong> elements to update the record.<\/li><\/ul>\n\n\n\n<p><b>Calling a flowchart from Process Definition<\/b><\/p>\n\n\n\n<p>To call a flowchart add Action&nbsp;<strong>LB: Service Call<\/strong>&nbsp;to the Process Definition.<\/p>\n\n\n\n<p>This action:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>calls the flowchart<\/li><li>allows passing parameters from Process Definition to the flowchart<\/li><li>enables updating fields in target or related records with the result from the flowchart<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"391\" height=\"312\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3762de3c833a4e47a7199f4bb98b1273.png\" alt=\"\" class=\"wp-image-1615\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3762de3c833a4e47a7199f4bb98b1273.png 391w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3762de3c833a4e47a7199f4bb98b1273-300x239.png 300w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/figure>\n\n\n\n<p>Once Action is added to the Process Definition, it must be configured:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"224\" height=\"139\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9e90b693158d4463a6676d7beaf89067.png\" alt=\"\" class=\"wp-image-1610\"\/><\/figure>\n\n\n\n<p><strong>Service Name&nbsp;<\/strong>&#8211; select from the list of Services registered in the current Sugar.<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-cc1a0d3b60c443fca198a32644d7d5d1.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-cc1a0d3b60c443fca198a32644d7d5d1-1024x243.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><strong>Parameters&nbsp;<\/strong>&#8211; set values for the service arguments that must be passed to the flowchart.<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-e368eccd46294ca5845417b78802e7f3.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-e368eccd46294ca5845417b78802e7f3-1024x219.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>As for the values for the parameters, it is possible to use:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>a value from the Target Module Record fields<\/li><\/ul>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-93c3298a46bf425098db51a0b7d602f4.png\" rel=\"prettyPhoto\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-378\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-93c3298a46bf425098db51a0b7d602f4.png\" alt=\"\" width=\"776\" height=\"451\"><\/a><\/p>\n\n\n<ul class=\"wp-block-list\"><li>a value from the Services parameter that was previously called from this Process Definition<\/li><\/ul>\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\/05\/img-205-80e50a39e42a4df6be60e6c87611275f-1024x461.png\" alt=\"\" class=\"wp-image-1612\" width=\"802\" height=\"361\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-80e50a39e42a4df6be60e6c87611275f-1024x461.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-80e50a39e42a4df6be60e6c87611275f-300x135.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-80e50a39e42a4df6be60e6c87611275f-768x346.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-80e50a39e42a4df6be60e6c87611275f.png 1399w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>a manually entered value<\/li><\/ul>\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\/05\/img-205-a2c96294f8564c98acd761fa2b04e7c9.png\" alt=\"\" class=\"wp-image-1619\" width=\"718\" height=\"420\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-a2c96294f8564c98acd761fa2b04e7c9.png 866w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-a2c96294f8564c98acd761fa2b04e7c9-300x175.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-a2c96294f8564c98acd761fa2b04e7c9-768x449.png 768w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Combination of all three options above<\/li><\/ul>\n\n\n\n<p><strong>Module<\/strong>&nbsp;and&nbsp;<strong>Fields<\/strong>&nbsp;work in a similar way as in standard Action&nbsp;<a href=\"https:\/\/support.sugarcrm.com\/Documentation\/Sugar_Versions\/12.0\/Sell\/Administration_Guide\/SugarBPM\/Process_Definitions\/#Change_Field\" rel=\"noreferrer noopener\" target=\"_blank\">Change Field<\/a>&nbsp;with the difference that the value of a field can be set with one of the argument\u2019s values from the flowchart selected in&nbsp;<strong>Service Name<\/strong>. This means that if you calculate or define some value within the flowchart, which is called by this&nbsp;<strong>LB: Service Call<\/strong>&nbsp;Action, you can put the result of this calculation as a value for the field of Target Module Record or related as many-to-one to the Target Module Record.<\/p>\n\n\n\n<p><em>Example of calling the flowchart from Process Definition<\/em><\/p>\n\n\n\n<p>Let\u2019s consider the following example:<\/p>\n\n\n\n<p>When a user clicks&nbsp;<em>Send Quote<\/em>&nbsp;button, Sugar should send an email to the Billing Contact with PDF Quote attached.<\/p>\n\n\n\n<p><em>Send Quote<\/em>&nbsp;button is implemented using ActionButton type of field and once clicked, it sets a custom checkbox \u2018Send Quote Email\u2019. This in turn initiates the following Process:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"361\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3170929948204d71aa1d954b6d6b81be.png\" alt=\"\" class=\"wp-image-1618\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3170929948204d71aa1d954b6d6b81be.png 675w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-3170929948204d71aa1d954b6d6b81be-300x160.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<p>Whenever the checkbox is&nbsp;<em>true<\/em>, Process Definition generates Doc via the element Doc Merge and waits 3 minutes so the document is generated by Sugar and linked to the Quote.<\/p>\n\n\n\n<p>Then element&nbsp;<strong>LB: Service Call<\/strong>&nbsp;calls the flowchart that composes and sends the Email.<\/p>\n\n\n\n<p>The following Service is registered in Sugar for this 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\/05\/img-205-1550a8abf56c46e1bb663425c43fc485-1024x129.png\" alt=\"\" class=\"wp-image-1614\" width=\"843\" height=\"106\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1550a8abf56c46e1bb663425c43fc485-1024x129.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1550a8abf56c46e1bb663425c43fc485-300x38.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1550a8abf56c46e1bb663425c43fc485-768x97.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1550a8abf56c46e1bb663425c43fc485.png 1262w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<p>Billing Contact ID and Quote ID is going to be passed from Process Definition to the flowchart.<\/p>\n\n\n\n<p>There are the following settings of&nbsp;<strong>LB: Service Call<\/strong>&nbsp;element in this Process:<\/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\/05\/img-205-91704c264eb54799a3a0854d4a09f7c2.png\" alt=\"\" class=\"wp-image-1617\" width=\"598\" height=\"347\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-91704c264eb54799a3a0854d4a09f7c2.png 688w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-91704c264eb54799a3a0854d4a09f7c2-300x174.png 300w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/figure>\n\n\n\n<p>Also in the very same element, we want to erase the value from the custom field \u2018Send Quote Email\u2019 so that this Process can run several times for the Quote:<\/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\/05\/img-205-2a5337025b114627b5c68b2bc4aa0a9a.png\" alt=\"\" class=\"wp-image-1604\" width=\"606\" height=\"353\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-2a5337025b114627b5c68b2bc4aa0a9a.png 685w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-2a5337025b114627b5c68b2bc4aa0a9a-300x175.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/figure>\n\n\n\n<p>Finally, the flowchart that implements email composing and sending may look like this:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5fcabfca0c964716bde8e3ce902e59d9.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-5fcabfca0c964716bde8e3ce902e59d9-1024x387.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><b>Using results from a flowchart in Gateways<\/b><\/p>\n\n\n\n<p>Results from a flowchart, e.g. calculation, can be used for evaluation in Exclusive and Inclusive Gateways.<\/p>\n\n\n\n<p>A value that can be evaluated must be placed in the argument&nbsp;<strong>return<\/strong>&nbsp;in the flowchart through&nbsp;<strong><span style=\"color:#ec8f45;\">Set Service Parameters<\/span><\/strong>.<\/p>\n\n\n\n<p>In the Gateway Settings in the Evaluations section, there is an option LB: Service Call Evaluation:<\/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\/05\/img-205-1b69429a36a54fe1b7f303a63166f053.png\" alt=\"\" class=\"wp-image-1603\" width=\"684\" height=\"347\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1b69429a36a54fe1b7f303a63166f053.png 949w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1b69429a36a54fe1b7f303a63166f053-300x152.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-1b69429a36a54fe1b7f303a63166f053-768x390.png 768w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/figure>\n\n\n\n<p>In the following settings, select a flowchart (that was called in this Process Definition) that sets a value in&nbsp;<strong>return<\/strong>&nbsp;argument and is needed to be evaluated and build a criterion:<\/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\/05\/img-205-9c4ef6eb13fb4579a4b28b90e1a9292e.png\" alt=\"\" class=\"wp-image-1609\" width=\"695\" height=\"450\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c4ef6eb13fb4579a4b28b90e1a9292e.png 957w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c4ef6eb13fb4579a4b28b90e1a9292e-300x194.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c4ef6eb13fb4579a4b28b90e1a9292e-768x497.png 768w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/figure>\n\n\n\n<p><em>Example of usage result from a flowchart in Process Definition<\/em><\/p>\n\n\n\n<p>Let\u2019s extend the standard Process \u2018<a href=\"https:\/\/support.sugarcrm.com\/Documentation\/Sugar_Versions\/12.0\/Sell\/Administration_Guide\/SugarBPM\/Stock_SugarBPM_Templates\/#Route_Lead_and_Create_Follow-Up_Task\" rel=\"noreferrer noopener\" target=\"_blank\">Route Lead and Create Follow-Up Task\u2019<\/a>&nbsp;with an additional step that when there are more than 100 Leads on a Sales Rep, then Lead should be Routed by the Sales Manager.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a record in LB Services first. Add argument \u2018return\u2019 which we are going to use in the Gateway:<\/li><\/ol>\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\/05\/img-205-68ee8a5a873a455094800dc6bd592484.png\" alt=\"\" class=\"wp-image-1611\" width=\"841\" height=\"128\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-68ee8a5a873a455094800dc6bd592484.png 1005w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-68ee8a5a873a455094800dc6bd592484-300x46.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-68ee8a5a873a455094800dc6bd592484-768x117.png 768w\" sizes=\"auto, (max-width: 841px) 100vw, 841px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Then create a flowchart that counts the number of Leads for a particular user:<\/li><\/ol>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-cc84e4a560274fda901b0f5645f92109.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-cc84e4a560274fda901b0f5645f92109-1024x246.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Proceed to Process Definition \u2018Route Lead and Create Follow-Up Task\u2019 and add the element to call a flowchart, exclusive Gateway, and an alternative path:<\/li><\/ol>\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\/05\/img-205-c5ad439261424441a9ecaf91db2904d6-1024x459.png\" alt=\"\" class=\"wp-image-1621\" width=\"1008\" height=\"452\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c5ad439261424441a9ecaf91db2904d6-1024x459.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c5ad439261424441a9ecaf91db2904d6-300x134.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c5ad439261424441a9ecaf91db2904d6-768x344.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-c5ad439261424441a9ecaf91db2904d6.png 1484w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>Apply settings for LB: Service Call Element to call a flowchart and pass Assigned User ID into flowchart:<\/li><\/ol>\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\/05\/img-205-0a8c8b0ffcd04b44868f68663d5ed512.png\" alt=\"\" class=\"wp-image-1602\" width=\"666\" height=\"390\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-0a8c8b0ffcd04b44868f68663d5ed512.png 853w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-0a8c8b0ffcd04b44868f68663d5ed512-300x175.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-0a8c8b0ffcd04b44868f68663d5ed512-768x449.png 768w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Finally configure Exclusive Gateway by setting the default path and an evaluation criterion:<\/li><\/ol>\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\/05\/img-205-df7e812513dc439cb12cb56d93510749.png\" alt=\"\" class=\"wp-image-1625\" width=\"676\" height=\"439\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-df7e812513dc439cb12cb56d93510749.png 957w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-df7e812513dc439cb12cb56d93510749-300x195.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-df7e812513dc439cb12cb56d93510749-768x499.png 768w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/figure>\n\n\n\n<p><b>Using results from a flowchart to set a value in a field<\/b><\/p>\n\n\n\n<p>It is possible to set value in Target Module Record or related Record with&nbsp;<strong>LB: Service Call<\/strong>&nbsp;and&nbsp;<strong>LB: Change Field<\/strong>.<\/p>\n\n\n\n<p>With&nbsp;<strong>LB: Service Call<\/strong>&nbsp;value for the field of Target Module Record or related to the Target Module Record as many-to-one can be set with the result from a flowchart right away after the flowchart was executed.<\/p>\n\n\n\n<p>With&nbsp;<strong>LB: Change Field<\/strong>&nbsp;value for the field of Target Module Record or related to it (in the same way as for standard element Change Field) can be set with the result from a flowchart anywhere in the Process Definition.<\/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\/05\/img-205-b457c1b67fd743419d207b0abb4895c8-1024x475.png\" alt=\"\" class=\"wp-image-1620\" width=\"832\" height=\"386\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-b457c1b67fd743419d207b0abb4895c8-1024x475.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-b457c1b67fd743419d207b0abb4895c8-300x139.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-b457c1b67fd743419d207b0abb4895c8-768x356.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-b457c1b67fd743419d207b0abb4895c8.png 1412w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<p>As the value for the field in&nbsp;<strong>LB: Service Call<\/strong>&nbsp;and&nbsp;<strong>LB: Change Field<\/strong>&nbsp;you can:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>use value of the argument from the flowchart (or flowcharts for LB: Change Field), that was(were) called in this Process Definition<\/li><\/ul>\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\/05\/img-205-9c2d7fe1f8884fdc94cc93f44ae0f498-1024x536.png\" alt=\"\" class=\"wp-image-1608\" width=\"791\" height=\"414\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c2d7fe1f8884fdc94cc93f44ae0f498-1024x536.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c2d7fe1f8884fdc94cc93f44ae0f498-300x157.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c2d7fe1f8884fdc94cc93f44ae0f498-768x402.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-205-9c2d7fe1f8884fdc94cc93f44ae0f498.png 1216w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>manually enter the value<\/li><\/ul>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Please note that neither LB: Service Call nor LB: Change Field controls the correspondence between the field type and the type of the value being set.<\/p>\n<\/div><div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1600' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1600\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-99f9f6e53e106' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-99f9f6e53e106'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1600' \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-99f9f6e53e106\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1600\" \n                               id=\"yasr-stats-dashicon-99f9f6e53e106\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-99f9f6e53e106\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-99f9f6e53e106\">0<\/span>  Average: <span id=\"yasr-vv-average-container-99f9f6e53e106\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-99f9f6e53e106' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-99f9f6e53e106' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>Logic Builder Extension for SugarBPM allows calling a flowchart from Process Definition and getting back a result from a flowchart to update a value in a field or evaluate in a Gateway. LB Extension for SugarBPM empowers SugarBPM with Logic Builder with the following possibilities of: calling an external system from SugarBPM sending Emails with &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/lb-sugarbpm-extension\/\"> <span class=\"screen-reader-text\">LB SugarBPM Extension<\/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-1600","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\/1600","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=1600"}],"version-history":[{"count":8,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1600\/revisions"}],"predecessor-version":[{"id":1635,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1600\/revisions\/1635"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1600"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}