Views:

Overview

This article will detail everything you need to know about Actions in North52 Decision Tables.

What is an Action?

The Action is what you want the Decision Table to do when the Conditions have been met. 
It could be anything from setting a value in a field, creating a new entity, hiding a section on a form to executing a workflow.

How to set a Simple Action

To set an action:

  1. Click on the green cell under Action on the Decision Table
  2. Click on the Source tab and click on the name of the field you want to update

For example to set an Action that updates the Preferred Method of Contact on an Account:

  • Click on the green cell (row 2) under the Action heading
  • Click on the Source tab on the configuration pane
  • Click on the Preferred Method of Contact field



Preferred Method of Contact will now appear in the green cell in the Action column.
This tells the Decision Table that if the Conditions are met then the Action to be taken will affect this field.

To make a specific update to the Preferred Method of Contact Action we click an empty cell in that column and then expand the Preferred Method of Contact node in the Source tab of the configuration pane to select the desired result. 

In the below screenshot Email has been selected and {Email} has appeared in the Cell B4.

Action Cell Values

You can type the following values into an Action cell:

  • If the value is in single quotes then it is treated as a String value
  • If the value is in curly brackets {} and the Column has a Name then it is treated as an OptionSet value 
  • If the value is a number then it is treated as a Number
  • If the value is in curly brackets {} and the Column has no Name then it is treated as a Complex Action

More details on Complex Actions can be found further down in this article.

Default Actions

If you want an Action to be completed anytime the Decision Table is triggered then you can set an Action with no Conditions associated to it.

In the example below we want to set the default priority on all Case entities to Normal when the Case is created, however:

  • If the Case was Received As a Public message with a Dissatisfied Satisfaction rating then the Case Priority should be High
  • If the Case was Received As a Public Message with a Very Dissatisfied  Satisfaction rating then the Case Priority should be Critical



Note: Exit this Decision Table on First Match is unchecked (found under Hit Policy on the right-click contextual menu) to set all cases to Normal Priority first, and then the additional conditions will be checked to determine if additional Actions should be carried out as well.

Complex Actions

Decision Table Actions can do much more than simply update fields.

At the bottom of the Decision Table you can change to the Global Actions Table by clicking the Global Action tab:


For this example we are going to extend the above functionality by adding an additional Action to create a Task for the owner of the case record if the Case Priority is set to Critical.

First enter the Action Name, this will be used by the Decision Table to identify the Action. Type in CreateCaseTask (you can call the action anything you like, choose something meaningful that makes it obvious what the Action will do)
Next click on the cell next to the Action Name (B2) in the Action Value column.

As we are entering a formula click the + icon at the right of the command bar to expand the formula editor.


Create the following formula in the formula editor.

Formula

CreateRecord('task', 
            SetAttributeLookup('owninguser', 'systemuser' ,[incident.ownerid]),
            SetAttribute('subject', 'Critical Priority Case Assigned to you!')

)

Click on the X icon to close the formula editor - this inserts the formula into the Action Value cell:


We have now finished defining the Action. Return to the Decision Table sheet and add a new Action column by right-clicking and selecting Insert > Insert Action from the contextual menu.

Note: We don't name the column this time as we are not updating a specific field


Click on the Source tab and expand the Actions node. The CreateCaseTask Action is now listed here.

Select cell D6 next to Priority and then click on CreateCaseTask from the Source tree to add it to the Decision Table editor.


The Decision Table will now create a Task for the Owner of the Case when it is setting the Priority of the Case to Critical.

You can set as many Complex Actions and Simple Actions against a Condition as you wish, simply add more Action columns.

Variables

Sometimes in Decision Tables you will need to sum up a value based on the Condtions.
This sort of Sum up functionality can only be used in Decision Tables with the Exit this Decision Table on First Match feature turned off.

To perform a Sum up Calculation like this:

  • Name your Action
  • Right-click on the Decision Table and select Toggle Advanced Mode from Operations
  • Row 3, which is hidden by default, will appear on the Decision Table
  • Under your Action Name enter +=
  • This will tell the Decision Table that the values in this row should be used in a Sum calculation within that Decision Table
  • The name of the Action column will then appear under the Decision Table Calculations node on the Source tabof the configuration pane 


In the below example we use this functionality to calculate an Auto Insurance Premium based on a variety of Conditions




We can then use that value by adding in an Action to update the Premium and referencing the value by clicking on AutoPrem from the Decision Table Calculations node.