{"id":1554,"date":"2022-05-04T14:51:56","date_gmt":"2022-05-04T14:51:56","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1554"},"modified":"2022-05-04T14:51:56","modified_gmt":"2022-05-04T14:51:56","slug":"lb-services-2","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/lb-services-2\/","title":{"rendered":"LB Services"},"content":{"rendered":"\n<p>LB Services is a Logic Builder extension that allows calling flowcharts through the Sugar REST API, from SugarBPM, and from another flowchart.<\/p>\n\n\n\n<p>LB Services extension is needed when you need to call a flowchart from:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>external system<\/li><li>program code (for example, a developer has added a new button to the interface, but the logic that will be executed when the button is clicked needs to be controlled or when an external system sends information to Sugar, but how this information is processed after retrieve can be implemented via Logic Builder)<\/li><li>SugarBPM, when part of the process can be a flowchart<\/li><li>another flowchart. Let\u2019s say there are a bunch of flowcharts with the same steps to perform an action. Instead of repeating the same steps in each flowchart, it is possible to create a separate flowchart and then call it from other flowcharts.<\/li><\/ul>\n\n\n\n<p><b>How to create a new service?<\/b><\/p>\n\n\n\n<p>To add new service:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Register it in Sugar<\/li><li>Configure its logic in Logic Builder<\/li><li>Use it!<\/li><\/ol>\n\n\n\n<p><b>Register New Service in Sugar<\/b><\/p>\n\n\n\n<p>After deploying LB service extension, the new module LB Services is added to Sugar. To register a service, create a new record in this Module:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"222\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-c44a765d6315476ca177a7d634fb167a.png\" alt=\"\" class=\"wp-image-1550\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Name \u2013 specify the user-friendly name of the service<\/li><li>System Name \u2013 specify unique name of the service (can contain only symbols [a-z], [0-9], [_], [-])<\/li><li>Arguments \u2013 specify all arguments that are going to be input to the service (e.g. by an external system or another flowchart) or will be returned as a result of service execution (e.g. to return the result to an external system). In Label part specify a user-friendly argument name, and in part Name \u2013 system name, which can contain only symbols [a-z], [0-9], [_], [-]<\/li><li>Description \u2013 optionally add some words which explain what is this service for.<\/li><\/ul>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-d7917c70f5bc46e6adc23153f3ce7696.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-d7917c70f5bc46e6adc23153f3ce7696-1024x317.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><b>How to configure service logic in Logic Builder?<\/b><\/p>\n\n\n\n<p>The start operator of service logic is <strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong>:<\/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-202-8017dd45f6f441b09b287bec0cfa5bf4.png\" alt=\"\" class=\"wp-image-1545\" width=\"414\" height=\"121\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8017dd45f6f441b09b287bec0cfa5bf4.png 662w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8017dd45f6f441b09b287bec0cfa5bf4-300x87.png 300w\" sizes=\"auto, (max-width: 414px) 100vw, 414px\" \/><\/figure>\n\n\n\n<p>In <em><span style=\"color:#9ed267;\">service name<\/span><\/em>&nbsp;dropdown select the service which logic is described in this flowchart. This dropdown is composed of records in LB Services module from Sugar which metadata is loaded in the Project.<\/p>\n\n\n\n<p>To read service parameters&nbsp;that were input by an external system or other flowcharts use the operator <strong><span style=\"color:#ec8f45;\">Get Service Parameters<\/span><\/strong>. Once service is linked into the input port, select needed parameters from the dropdowns.<\/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-202-255c1f70654b4fd8b3bf2d70ddb002e4-1024x322.png\" alt=\"\" class=\"wp-image-1544\" width=\"755\" height=\"237\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-255c1f70654b4fd8b3bf2d70ddb002e4-1024x322.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-255c1f70654b4fd8b3bf2d70ddb002e4-300x94.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-255c1f70654b4fd8b3bf2d70ddb002e4-768x242.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-255c1f70654b4fd8b3bf2d70ddb002e4.png 1083w\" sizes=\"auto, (max-width: 755px) 100vw, 755px\" \/><\/figure>\n\n\n\n<p>To set values for service parameters to be used as a response to a call from an external system or SugarBPM use <strong><span style=\"color:#ec8f45;\">Set Service Parameters<\/span><\/strong>. Input service and then select service arguments which values you would like to set. To set the value simple link it with the appropriate service argument:<\/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-202-131f145b2e144113aadca17e508f6a3d.png\" alt=\"\" class=\"wp-image-1543\" width=\"568\" height=\"237\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-131f145b2e144113aadca17e508f6a3d.png 802w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-131f145b2e144113aadca17e508f6a3d-300x125.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-131f145b2e144113aadca17e508f6a3d-768x320.png 768w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/figure>\n\n\n\n<p>To set the result to be used in other flowcharts use <strong><span style=\"color:#ec8f45;\">Set Service Result<\/span><\/strong>. Input service and value that should be in the result port and can be used in other flowcharts:<\/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-202-287464d1264b49b58edc3fea7cfd6a8f-1024x296.png\" alt=\"\" class=\"wp-image-1546\" width=\"811\" height=\"234\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-287464d1264b49b58edc3fea7cfd6a8f-1024x296.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-287464d1264b49b58edc3fea7cfd6a8f-300x87.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-287464d1264b49b58edc3fea7cfd6a8f-768x222.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-287464d1264b49b58edc3fea7cfd6a8f.png 1520w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n\n\n\n<p>Combine dedicated to services operators with other others to configure logic.<\/p>\n\n\n\n<p><b>How to use services?<\/b><\/p>\n\n\n\n<p>There are several options for how to use services. Let\u2019s see the following examples.<\/p>\n\n\n\n<p><b>Example 1: How to use service to call flowchart from another flowchart<\/b><\/p>\n\n\n\n<p>Let\u2019s say that there is a step to get a number of related to Account Product Cases, that were registered this month. This number of Cases is used in several flowcharts, so instead of counting this number in each flowchart, let\u2019s create a service that will count this number and then just call this service from the other flowcharts.<\/p>\n\n\n\n<p>Step 1: Register service in Sugar.<\/p>\n\n\n\n<p>In LB Services module we are creating a new record. As an argument we need only one to have an Account ID:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-c6ce680df73242c69a8c3fca15775d70.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-c6ce680df73242c69a8c3fca15775d70-1024x271.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Step 2: Configure logic in Logic Builder<\/p>\n\n\n\n<p>Firstly, right after adding a new service, it is needed to update Sugar Metadata in the Project.<\/p>\n\n\n\n<p>The flowchart starts from <strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong>&nbsp;and in the very first step we are reading the service parameter value to get account_id and retrieve Account by this ID:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"189\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb-1024x189.png\" alt=\"\" class=\"wp-image-1537\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb-1024x189.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb-300x56.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb-768x142.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb-1536x284.png 1536w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-03f9c59dfd1c4bb9b85d95da1056b0bb.png 1854w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then count&nbsp;a number of cases in a loop:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-b75bb71b34004362aa60d534e7df916a.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-b75bb71b34004362aa60d534e7df916a-1024x432.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Finally, put the result (the number of such cases) using&nbsp;<strong><span style=\"color:#ec8f45;\">Set Service Result<\/span><\/strong>:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-7e839034038a4be493c5d154ef8f76dc.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-7e839034038a4be493c5d154ef8f76dc-1024x374.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>The flowchart that implements service is ready, deploy it in Sugar instance.<\/p>\n\n\n\n<p>Step 3: Call the flowchart from another flowchart<\/p>\n\n\n\n<p>Now let\u2019s assume that after a Case is linked to an Account it\u2019s needed to evaluate the number of Product Cases registered this month. So instead of building logic to count such Cases, just use <strong><span style=\"color:#ec8f45;\">Call Service<\/span><\/strong>&nbsp;operator to call the corresponding service. In service name dropdown select service and then provide argument values \u2013 Account ID in our case. As result there is a number of such Cases:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-a143d5fdc4ea47dcaba38d6a9c2f777a.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-a143d5fdc4ea47dcaba38d6a9c2f777a-1024x218.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><b>Example 2: How to use service from an external system or custom code<\/b><\/p>\n\n\n\n<p>Let\u2019s say that Lead Status is updated from an external system. But it is needed to evaluate whether the status can be updated prior to actually changing it.<\/p>\n\n\n\n<p>Step 1. Again, register service in Sugar. As service arguments, we have&nbsp;<em>lead_id<\/em>&nbsp;that should be an input argument and&nbsp;<em>message<\/em>, that will be filled by the service and returned to the external system.<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-3fd8f07a420b4340b06a9c7c657bda88.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-3fd8f07a420b4340b06a9c7c657bda88-1024x253.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>Step 2. Create a flowchart that implements the service logic. As usual, such flowchart starts from&nbsp;<strong><span style=\"color:#ec8f45;\">On Service Call<\/span><\/strong>. Then read parameters values from the service with&nbsp;<strong><span style=\"color:#ec8f45;\">Get Service Parameters<\/span><\/strong>:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-49dcaaca9b10415a9ba9837bd6c8cbe3.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-49dcaaca9b10415a9ba9837bd6c8cbe3-1024x198.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p>After configuring the logic of whether Lead status can be updated, to return value to the external system use&nbsp;<strong><span style=\"color:#ec8f45;\">Set Service Parameters<\/span><\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"336\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-1024x336.png\" alt=\"\" class=\"wp-image-1553\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-1024x336.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-300x98.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-768x252.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-1536x504.png 1536w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e07c6ea82e924736af80641789d0c4e5-2048x671.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And deploy flowchart into Sugar instance.<\/p>\n\n\n\n<p>Right after deployment the new REST endpoint will be created in Sugar:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Endpoint<\/strong><\/td><td><strong>Method<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Exceptions<\/strong><\/td><\/tr><tr><td>POST&nbsp;\/lb\/services\/:serviceName<\/td><td>lbServiceCall<\/td><td>Call specific LB Flowchart Service.<\/td><td>Not Found,&nbsp;No Service Implementation<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Request Arguments<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Required<\/strong><\/td><\/tr><\/thead><tbody><tr><td>arguments<\/td><td>Map<\/td><td>Input service parameters passed to the flowchart as key-value pairs, where key is a name of service parameter, and value is a value of service parameter.<\/td><td>false<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Response Arguments<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>arguments<\/td><td>Map<\/td><td>Output service parameters returned from the flowchart as key-value pairs.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Endpoint can be used just like the standard Sugar REST API. Documentation is available at: sugarurl\/rest\/v11_4\/help<\/p>\n\n\n\n<p>Example of usage the service to update lead status:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>url<\/td><td>https:\/\/{\u200b\u200b\u200b\u200b\u200bsite_url}\u200b\u200b\u200b\u200b\u200b\/rest\/v11_15\/lb\/services\/update_lead_status<\/td><\/tr><tr><td>method<\/td><td>POST<\/td><\/tr><tr><td>request<\/td><td>{\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>&nbsp;&nbsp;&nbsp;&nbsp;&#8220;arguments&#8221; : {\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>&nbsp; &nbsp; &nbsp; &nbsp;&#8220;lead_id&#8221; : &#8220;798cdde8-ff5e-11e7-ab44-000c29996212&#8221;<br>&nbsp;&nbsp;&nbsp;&nbsp;}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<\/td><\/tr><tr><td>response<\/td><td>{\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;arguments&#8221; : {\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8220;lead_id &#8220;: &#8220;798cdde8-ff5e-11e7-ab44-000c29996212&#8221;,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#8220;message&#8221;: &#8220;success!&#8221;<br>&nbsp;&nbsp;&nbsp;&nbsp;}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<br>}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><b>Manually calling service<\/b><\/p>\n\n\n\n<p>It\u2019s possible to call Service from the Sugar interface.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Please note that this is a real call and service execution, not an emulation.<\/p>\n<\/div>\n\n\n<p>To manually call the service, open the LB Services record and click the Call Service button:<\/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-202-14e0809342e9435a92ed49aec562998b-1024x346.png\" alt=\"\" class=\"wp-image-1541\" width=\"861\" height=\"291\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-14e0809342e9435a92ed49aec562998b-1024x346.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-14e0809342e9435a92ed49aec562998b-300x101.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-14e0809342e9435a92ed49aec562998b-768x260.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-14e0809342e9435a92ed49aec562998b.png 1145w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/figure>\n\n\n\n<p>Then provide input arguments (e.g. Lead ID) and click Execute:<\/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-202-8abd7f66aa3f401585696e8da076a3ff-1024x271.png\" alt=\"\" class=\"wp-image-1540\" width=\"863\" height=\"228\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8abd7f66aa3f401585696e8da076a3ff-1024x271.png 1024w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8abd7f66aa3f401585696e8da076a3ff-300x80.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8abd7f66aa3f401585696e8da076a3ff-768x204.png 768w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-8abd7f66aa3f401585696e8da076a3ff.png 1143w\" sizes=\"auto, (max-width: 863px) 100vw, 863px\" \/><\/figure>\n\n\n\n<p>On the right side there are results of service execution:<\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e71f5591ceed4dfa938cadaea1ad90e7.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e71f5591ceed4dfa938cadaea1ad90e7-1024x246.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Note: you can open Developers Console in Browser (commonly F12 button) and then click Execute. That will reveal how service is called:<\/p>\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e0e9a52b6c064250b3d34c751e09d490.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/05\/img-202-e0e9a52b6c064250b3d34c751e09d490-1024x316.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n<p>&nbsp;Also, services are used to extend SugarBPM processes. Please refer to the documentation for SugarBPM extension.&nbsp;<\/p>\n<\/div>\n\n\n<p><b>Can I Export and Import LB Services records?<\/b><\/p>\n\n\n\n<p>Yes, you can migrate LB Services from one Sugar instance to another using the standard Sugar export and import (for example, if you would like to deploy changes from sandbox to production).<\/p>\n\n\n\n<p>&nbsp;The following fields must be imported:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Name<\/li><li>System Name &#8211; this field is used to map the LB Services record and the flowchart that describes the logic of this service.<\/li><li>Arguments &#8211; if they were specified for the service<\/li><\/ul>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Note: When importing LB Services records between Sugar instances, only the LB Services records are migrated. The logic described in Logic Builder is not migrated. To transfer the logic generated in the Logic Builder, you need to install the appropriate packages on the instance.<\/p>\n<\/div>\n\n\n<p><b>Can I apply to LB Services records Role restrictions?<\/b><\/p>\n\n\n\n<p>Yes, standard Roles Configuration can be applied to the module LB Services.<\/p>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1554' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1554\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-46069d3a68e41' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-46069d3a68e41'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1554' \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-46069d3a68e41\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1554\" \n                               id=\"yasr-stats-dashicon-46069d3a68e41\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-46069d3a68e41\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-46069d3a68e41\">0<\/span>  Average: <span id=\"yasr-vv-average-container-46069d3a68e41\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-46069d3a68e41' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-46069d3a68e41' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>LB Services is a Logic Builder extension that allows calling flowcharts through the Sugar REST API, from SugarBPM, and from another flowchart. LB Services extension is needed when you need to call a flowchart from: external system program code (for example, a developer has added a new button to the interface, but the logic that &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/lb-services-2\/\"> <span class=\"screen-reader-text\">LB Services<\/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-1554","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\/1554","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=1554"}],"version-history":[{"count":6,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1554\/revisions"}],"predecessor-version":[{"id":1578,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1554\/revisions\/1578"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1554"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}