Logic Loop

Appearance

Parameter Description

  • Node Name: name of a node.
  • Description: details of a node.
  • Counter: flow variable that stores the number of elements in a list.
  • Loops: objects to be traversed. Generally, the object list is the value obtained by the previous node, for example, the customer list obtained by a stored procedure.
  • Loop Object: flow variable that stores the value of the object obtained each time when the object list is traversed.

In addition to four variables, the Logic Loop diagram element provides two default branches: inLoop and outLoop. The inLoop branch executes the logic when a loop is entered, that is, some actions during object list traversal. The outLoop branch executes the actions after object list traversal.

Using the Diagram Element

The Logic Loop diagram element is used when an operation needs to be performed repeatedly until a certain condition is met.

Click the diagram element or drag it to the canvas, and set loop conditions and objects.

Typical Application Scenario

The following describes how to use the Logic Loop diagram element to combine strings using a loop.

  1. Sign in to the AICC and choose Configuration Center > Flow Configuration > Intelligent IVR.
  2. Configure an intelligent IVR flow.

    1. Choose Flow Management > Flow Orchestration and click Add to add a simple flow.
    2. Click + in the Flow Variable area. In the dialog box that is displayed, set the variable name and data type.
      Figure 1 Flow variables to be added
      Figure 2 Flow orchestration example (Logic Loop diagram element)
      • The Business Interface Invocation diagram element of the inLoop condition branch combines strings and assigns the value to FLOW.sum.
      • Use the response variable FLOW.sum for the Response diagram element of the outLoop condition branch to send the combined string after the loop is complete to the customer.
      Figure 3 Flow orchestration example (Business Interface Invocation diagram element)
    3. Save and release the flow.

  3. Choose Chatbot Management and bind the flow to a chatbot.
  4. Choose Chatbot Management. In the last column corresponding to the chatbot, click Test Call.

    In the test dialog box that is displayed, click Start Call to test the chatbot. If the chatbot outputs the combined string after the strings in the list are combined, the configuration is successful.
    Figure 4 Testing the chatbot