Logic+ Subroutine
The “Logic + Subroutine” panel enables the execution of a selected Logic and returns its output to your flow, allowing one Logic to run within another to complete a task seamlessly.
This panel can execute any Logic accessible in your company’s Sharpen account, including those created by you or other users.
Using this panel
The Subroutine panel streamlines building and maintaining your Logics. Being able to call an existing Logic to complete a task means not needing to build a solution by hand every time. This panel allows you to create and use Logics like reusable building blocks to enhance other Logic flows or assemble more complex ones.
For example, you could create standalone Logics for common, core tasks—for example, returning a customer's account number based on input—and simply use the Subroutine panel to call them when needed within another Logic.
TIP: Test any target Logic on its own first.
The Subroutine panel does not check whether its targeted Logic actually works as intended. You are responsible for testing a Logic first to ensure that it does work before selecting it with this panel.
Configuration
The Subroutine panel has the following settings as shown in Figure 2:
Set as Flow Initiator: By selecting "Set as Flow Initiator," this panel will serve as the starting point of the IVR flow, before proceeding to subsequent panels within the Logic+ flow.
Panel Name: It is recommended that you choose a name and keep it consistent. You will also need to specify the variable name to update. If the variable does not exist, it will be created.
Panel Description: It is recommended to provide a clear description of the panel, detailing its purpose and functionality. This is akin to documentation, making it easier for others to understand and identify its intended use when they encounter it.
LogicId: The Logic+ flow or mechanism that you would like to utilize with this panel.
Use Dropdown: Select an option from the dropdown menu.
Use Variable: Enter a variable. This field accepts either a unique ID string assigned to each Logic or a user-defined variable containing such a string. See the Logic+ ID section for details on finding a Logic’s ID.
Exit Paths: Use the dropdown menu to select another panel in your flow. Any output from this panel will advance to the linked panel.
Figure 2: Configuring the Subroutine panel.
Logic+ ID:
Finding a Logic’s ID string. First, open the desired Logic in the editor. From here, the current Logic’s ID can be found in one place:
The URL bar: Look at the following section of the URL, as shown in Figure 3. Copy the ID string for later use with the Subroutine panel.