Using logic actions

A logic action is a type of action that allows you to test a message against a condition. If the condition is met, the action will be executed. To use a logic action, you need to add it to a node and complete the following settings.


Steps:

  1. Click the "Logic" action.
  2. Enter the Input value that you want to test (if empty, the input value will be a message).
  3. Select the "Condition" (CONTAIN, EQUAL, GTE, LTE, IS, REGEX).
  4. Enter the value that you want to test.
  5. Turn on the "Ignore case when doing comparison" toggle if you want to ignore the case.
  6. Select the "Action" (GO TO, CONTEXT).
  7. Enter the value that you want to use in the action.
  8. Click the "Save" button.

For example, you could use a logic action to test if a message contains a certain word. If the message does contain the word, you could then execute an action that sends the message to a different queue.


The table shows the different conditions and their descriptions, with examples:

Condition Description Example
CONTAIN Checks if a string contains a certain substring. CONTAIN (text, 'hello')
EQUAL Checks if two strings are equal. EQUAL (text1, text2)
GTE Tests if a number is greater than or equal to a certain value. GTE (1, 10)
LTE Checks if a number is less than or equal to a certain value. LTE (7, 10)
IS Tests if a value is true or false. IS (true)
REGEX Checks if a string matches a certain regular expression. REGEX (text, '\d+')

Action is a keyword that tells the system what to do after processing the message. There are two types of actions: GO TO and CONTEXT.

  • GO TO tells the system to go to another node in the conversation flow.
  • CONTEXT tells the system to show the value of a context variable.

Here is a table that shows the different actions and their corresponding values:

Action Value
GO TO Node name or command (/…)
CONTEXT Context variable name