Conditional logic is used to alter service parameters based on specific conditions. This feature can be used to define the value of any parameter by any defined condition. It supports multiple 'If' and 'Else If' conditions. In conditional logic, a statement is only true if and only if a certain condition is fulfilled.

Logic Block

A logic block is a block in which the condition logic is being defined. You can edit the block name by clicking on the Edit  icon with a maximum 64-character limit.

Within the block, you can only add one ‘IF’ condition and one ‘ELSE’ condition but there can be multiple ‘ELSE IF’ conditions.

The ‘IF’ condition will come by default in every logic block which you cannot edit.

To every ‘IF’, ‘ELSE IF’, and ‘ELSE’ statement, there will be a ‘THEN’ statement.

Also, there can be multiple logic blocks.

In the Logic Block, you have to provide the following information:

To set parameters, click on the Set Parameter  checkbox. To override service time, click on the Override Service Time   checkbox. To log a message, click on the Log Message  checkbox.

Set Parameter

In the set parameter, you can choose an existing service parameter or you can add a new scratch parameter with the following options:

Override Service Time

To delay the actual service time, you have to enable the Override Service Time checkbox. It has the highest precedence for execution. Service time can be overwritten by the following options which are listed below:

Log Message

In the log message, the message will be added in the Request Trace if Tracing is enabled. You can view these log messages in Request Trace UI under parameter and logs. In the log message, you have to provide the details for the following fields which are listed below:

Notes:

  1. For all the service parameters used if Occurrence Count = ALL, condition logic will consider the first occurring value.
  2. Once the user has provided the inputs for the ‘Then’ statement, the user can either click over the ‘Add Statement icon or can click on the 'Add Logic Block  ' icon. Users can add multiple logic blocks as well.
  3. If the user clicks over ‘Add Statement’ there will be only two options in the statement drop-down ‘Else if’ and ‘Else’. 
  4. Also there will be a ‘Delete Statement icon for the ‘else if’ and ‘else’ statements.
  5. Once the ‘ELSE’ statement is driven only ‘ELSE IF’ statements can be added in between IF and ELSE statements in a logical block.
{
  "allBlocks": [
    {
      "blockName": "LOGICBLOCK1",
      "logicBlock": [
        {
          "statement": "If",
          "conditions": [
            {
              "lhsParam": "parameter name",
              "paramType": 1,
              "relationalOperator": 2,
              "rhsType": 2,
              "rhsParam": "Hello",
              "logicalOperator": 1
          }
          ],
          "actions": [
            {
              “enabled”: true,
              "paramName": "parameter name", 
              "rhsType": 1,
              "rhsParam1": 4,
              "rhsParam2": 5 
            },
            {
              “enabled”: true,
              "logMessageName": "test",  
              "logMessageValue": "testingggg...." 
            },
            {
              “enabled”: true,
              "serviceTimeMode": 2,
              "serviceTimeValue1": 200,
              "serviceTimeValue2": 400
            }
          ]
        }, 
      ]
    }
  ]
}