Skip to main content

Configuring Events

Written by Denisa Arjoca
Updated over 3 weeks ago

An event is a specified change to a record, which results in an action such as alerting users when data changes. COINS uses the event to compare the data before and after the change to determine what action to take. An event can also be based on the type of change – Create, Update or Delete.

To Enable an Existing Event

It may be that a suitable event has already been configured. This could be a standard event provided by Coins, or one that has been configured on your environment. In this case, you just need to make it live.

  1. Go to Changed Data Capture.

  2. Click the link on the Trigger field.

  3. On the Events tab, open the event record.

  4. Check Live.

  5. Save the record.

The Events background process must also be running. If it is not running, the events will be queued, but alerts will not be sent until the process is switched on.

To Configure a Trigger Event

If the appropriate event does not already exist, you can configure one. If the field or fields you want to examine are listed in the Event Fields of an existing standard trigger, you can add an event to that trigger. If the fields are not listed, you need to configure a new trigger (or a copy of a standard one).

  1. Go to Changed Data Capture.

  2. If necessary, copy or create a trigger record for the database table you want to examine. In the Event Fields field, enter a comma-separated list of any fields for which you want to create events.

  3. Click the link on the Trigger field.

  4. On the Events tab, add a new event record and enter an event code and a description.

  5. In the Event column select the type of change (create, update or delete) the event will track.

  6. For an update event: in the Field(s) column, enter the field or fields that need to change for the event to occur.

  7. Specify the trigger conditions. These determine whether the event is deemed to have occurred.

    Field

    Description

    Complex

    Check this if the events is complex: a simple event checks the value of an individual field; a complex event applies a query, which could be based on multiple fields or the whole event data record.

    Company, Group

    The company, companies or company groups in which the event can occur. Events can be defined to trigger in one or more companies or company groups. If left blank the event will trigger in all companies.

    From, To

    Populate the From and To fields with the values that are to be checked against the Event Data.

    For a simple event, this may be a CAN-DO list, including * (all) option or maybe a specific text string.

    For a complex event this would be a query condition.

    ID Fields

    The ID Fields are those fields which will be written to the event log for reference.

    These would normally be the Unique Index for a record to allow linking the Event back to the original record.

    These fields are also the keys for Subscriptions.

  8. Specify the Actions. There are different actions that can be performed if the conditions for an event are met.

    Field

    Description

    Event Log

    If the Event Log Type is assigned, an entry will be created in the Event Log Viewer each time the Event is triggered. The Log Type is used as a Selector on the Event Log Viewer browse. Once an Event Log has been triggered, the Event Log Viewer appears on the System > Extracts menu (until this point this function is hidden).

    Closed

    Workflow

    Triggering an Event can also launch a COINS Workflow. Simply enter the COINS Workflow Template ID.

    The Workflow MUST exist in every Company (kco) that the Event may be triggered in.

    Actions

    An event can launch different types of action: email, SMS, notification and task (activity workbench action).

    • Email – If you check Email, when the event is triggered Coins ERP+ sends an email to each user defined in the Users field, using the Title as the email subject, and the body as defined in the frame at the bottom.

    • SMS – If you check SMS, when the event is triggered Coins ERP+ sends an SMS to the mobile telephone number as configured on the User record for each user defined in the Users field. The text of the SMS is taken from the Text field.

      SMS requires a suitable subscription.

    • Notification – If you check Notification, when the event is triggered Coins ERP+ sends notifications to each user defined in the Users field, if the user has opted to receive Trigger Event notifications. If the user has opted to receive notifications in alert format, the title of the popup alert is taken from the Title field, and the body of the alert is taken from the email body field. You also need to configure an email message, because users may choose to receive notifications as emails.

    • Task – If you check Task, when the event is triggered Coins ERP+ creates a task on the Activity Workbench of each user defined in the Users field. The text on the task is taken from the Text field.

    User(s)

    A list of the users to be alerted. These can be defined or taken from the Event Data (using { } replacements). If subscriptions have been configured for the event, other users can also subscribe to receive alerts.

  9. Set up the details of the alert. You can use replacement values in all these fields.

    Field

    Description

    Title

    The title is used, for example, as the Subject of the email or Activity Workbench action, or as the heading of the popup alert.

    Text

    The text is used for SMS messages, the Description of the Activity Workbench action, and in the Event Log.

    HTML Text

    The HTML text is used for the body of the email, and for the content of the popup alert.

  10. If you are ready for the event to be used, check Live.

  11. Save the event record.

Replacement Values

You can use { } replace values when configuring events; these will be replaced when the event occurs. For example, you can use them in the Text, Title and Email fields to show what data has changed.

You need to specify whether to use the value from before or after the change of the record (even if the individual field has not changed); for example:

{old/su-userid}

{new/su-userid}

Did this answer your question?