Setting Up Business Rule Actions

– Administrator function –

A business rule action is a specific action that is configured to be performed when the business rule it is assigned to is triggered.

  1. To view the business rule actions, in the Administrator menu click Business Rule Actions. The list displays the code, description, rule type, entity, and active status.

  2. Click a code to open an existing action, or click Actions and choose the type of action to create:

To copy a business rule action, open it and choose Actions»Clone.
Business rule actions may be imported into Cority using the Import Utility (see Importing Text or XML Files into Cority Tables). An imported BRA will automatically be linked to its parent BR.

The Business Rule Action Queue displays upcoming or past time-driven business rule actions, as well as any business rules that were forced to run immediately for relevant records (see Monitoring the Business Rule Action Queue).

Message Action

The message actions allows you to specify a message that will be displayed to the user.

Enter a Code and Description, and enter the Message to display to the user.

Admin_bus_rule_action_message.gif

Change Action

The change action allows you to specify an action that will change the value of a property on an entity. You may change it to a static value, the value of another field, or you can assign the result of a subquery to a text or numeric field.

Enter a Code and Description, and select the Entity to apply the change to.

Field Reference scenarios:

If the Execution Type is “Scheduled”, you can set the action to recur: click the “Not Set” link next to Recurrence and define the frequency and conditions.

Method Action

The method action allows you to specify an action that will execute a method in the service for the specified entity. Method actions are used to execute more complex actions that are not part of generic functionality of business rule actions. In most cases you will not need to use method actions. Also, you cannot create new methods to be used with a method action.

Method actions should not be used unless you are familiar and comfortable with the associated functionality. If you are not sure of how to use a particular method action, contact Cority Customer Support for assistance.

Enter a Code and Description. Select the Entity to apply the method action. Select the Method to execute in the service.

If the Execution Type is “Scheduled”, you can set the action to recur: click the “Not Set” link next to Recurrence and define the frequency and conditions.

Admin_bus_rule_action_method.gif

Email Action

The email action allows you to configure an email to be sent out by Cority.

Enter a Code and Description.

If you want the email to be sent in the background by the system without any user interaction, select Send in Background. If this is not selected, the email will be displayed to the user so that he/she can make any desired modifications before the email is sent.

To turn on a toolbar with formatting options above the Body section, select Enable HTML Formatting.

Select the Entity to apply the email action. In Sender Email, enter a name to specify who the email is from.

Email Merge Fields allow you to select from employees, users or groups/teams. If you select a group or team field, the email will be sent to each active employee in that group or team.

Enter the Subject of the email, and define the Body of the email. To include merge fields in the subject line or the body which will be dynamically populated with data from the record, select the Merge Field and click Subject or Body as appropriate. If the Enable HTML Formatting check box is selected, use the toolbar options to format the body of the email as desired. If the check box is not selected, the email will be sent as plain text.

If Send in Background is selected:

If the attachment includes a subquery, the subquery data will display in the letter/form. The letter/form will only display the subquery data to which the user who triggered the BR has access; the recipient(s) will be able to view that subquery data regardless of their module security.

If the Execution Type is “Scheduled”, you can set the action to recur: click the “Not Set” link next to Recurrence and define the frequency and conditions. The email action will recur according to that pattern as long as the BR still applies to the record.

Admin_bus_rule_action_email.png

Language: For emails that are sent:
- to user email merge fields: the email will be sent in the language specified for the user (recipient) in system settings
- to employee email merge fields: the email will be sent in the language specified on the employee’s demographics record; if the record does not have a language specified, the email will be sent in English
- to an email address directly: the email will be sent in the language specified for the employee (on their demographics record) or user (in system settings) associated with that email address. If the email address exists for both an employee and a user, the email will be sent in the language specified for the employee. If the email address is not associated with an employee or user in Cority, the email will be sent in English.
If you modify a foreground email before sending it, the email will be sent in English, regardless of the recipient's language.
For email distribution lists, emails will be sent in each recipient's respective language as outlined above.

SMS Action

You can set up a business rule action that sends an SMS message. You must purchase a Twilio subscription and enter the account ID and authentication token in the “SMS Twilio Account SID” and “SMS Twilio Auth Token” system settings.

The Business Rule SMS layout is the same as for the Email action described above, with the addition of a Sender Phone Number field. All SMS messages must be sent from a sender phone number purchased from Twilio.

If the body of the message exceeds the character limit (e.g. 160 characters, but this number may vary depending on the alphabet used), you will be prompted to confirm that it may be broken into multiple messages. SMS messages sent by Cority can be viewed in the SMS Log (Viewing the SMS Log).

If you create a distribution list of phone numbers using a Report Writer query (see Working with Ad Hoc Reports), a phone number column must be included. If the first column is Employee Number or Employee Cell Phone Number, the employee's cell phone number will be used. If the first column is Login Name or User Phone Number, the user's phone number will be used.

In-App Notification Action

The in-app notification action allows you to specify a notification that will be displayed to myCority app users when an event occurs in Cority. The layout is similar to Email Action above. Notifications sent to myCority can be viewed in the In-App Notification Log (see Viewing the In-App Notification Log).

API Action

You can set up a business rule action that sends an API call to another system. The action will create or update records based on what you put in the Response Body; for example, if you expect “employee number” to be in the response, include a merge field in the Response Body that will map back to a created or updated employee record in Cority.

API actions should not be used unless you are familiar and comfortable with the associated functionality. The maximum number of daily Cority API requests is currently 1000, subject to change. Contact Cority Customer Support for assistance.

If the API Response Transaction Type is “Create Record”, the Merge Fields list provides the sublist fields for the selected entity. When you add one of these sublist fields to the Response Body, the system will create as many new records as are indicated by the API response.

The Body text must be formatted according to the selected Content Type.

To include a merge field in the Header, Body or Response Body section which will be dynamically populated with data from the record, select the Merge Field and click Header, Body or Response Body as appropriate.

You can encrypt the API URL, Header, and Body values using the <EncryptOnDisplay></EncryptOnDisplay> tags. For example, if you enter <EncryptOnDisplay>www.website.com</EncryptOnDisplay> in the API URL field, the URL text will become encrypted.

If the Execution Type is “Scheduled”, you can set the action to recur: click the “Not Set” link next to Recurrence and define the frequency and conditions.

Every API call that was made by Cority can be viewed in the API Log (see Viewing the API Log).

Monitoring the Business Rule Action Queue

The Business Rule Action Queue displays upcoming or past time-driven business rule actions, as well as any business rules that were forced to run immediately for relevant records.

In the Administrator menu click Business Rule Action Queue. Here you can: