Workflow Components: Decision Nodes

This chapter discusses the following:

Introduction to Decision Nodes

A decision node is a node which has one or more entry points and exactly two exit points: true and false. A decision node always has to have a script which has to return either true or false.

The ticket enters the decision node, then the script is executed and - depending on the result (true or false) - the ticket leaves the node via the respective exit point.

Figure 51: ConSol CM Process Designer - Decision node

Properties of a Decision Node

A decision node has the following properties:

Figure 52: ConSol CM Process Designer - Decision node: Properties

Example for a Decision Node

In the following example, the system should automatically check if the customer (main contact of the ticket) is a VIP customer. If yes, the ticket should be marked with the VIP overlay (in the example a yellow star).

  1. A Data Object Group Field of type boolean has to be defined in the customer data model (FlexCDM) to mark a customer as VIP (yes/no). Please refer to the ConSol CM Administrator Manual, section Setting Up the Customer Data Model.

    Figure 53: ConSol CM Admin Tool - Data Object Group Field "vip" in customer data

    Figure 54: ConSol CM Web Client - Data Object Group Field "VIP" for customer/contact data

  2. In the script of the decision node, it has to be checked if the customer is a VIP (return value: true) or not (return value: false).
  3. // Get the main contact of the ticket. The unit object (can be a customer or a company) is provided;

    // here it has to be a customer, i.e. a contact:

     

    Unit mycontact = ticket.mainContact

     

    // Check the Custom Field "vip" of the main contact. (see next image)

    // If it is set to true, return true, i.e. the condition is TRUE.

    // Else return false, i.e. the condition is FALSE:

     

    if (mycontact.get("vip")) {

    return true

    } else {

    return false

    }

    Code example 6: Working with customer data - Example: Using a Data Object Group Field of type boolean

  4. When a ticket has passed automatically through the decision node and the following automatic activity where the VIP overlay is added, the ticket icon in the Web Client is marked with the overlay, see following figure.

    Figure 55: ConSol CM Web Client - Ticket icon with VIP overlay