Settings for Alert Tasks

Depending on the Connection Type that you are defining for your alert task, you may also want to configure Settings. For a task with a webhook Connection Type, only e-mail reminders can be configured and no additional settings are required because the data is pushed from the third-party application to the Kore Bot. This topic describes how to configure Settings for a task.

The following illustration is an example of the Settings dialog for a task.

Defining the Trigger Interval

For an RSS or web service Connection Type, after you configure the response object, you must define the Trigger Interval Options in the Settings dialog, and then the Default Trigger Interval. The Default Trigger Interval is the elapsed time between last task request and the next automated task request.

For alert tasks, you must define how often Kore will reach out to a web service or RSS to check for any changes since the last update for message notifications. When the end-user defines the settings for the task, you can configure the options to display for selecting the trigger interval, as well as what the default trigger interval is set to.

To set the options, in the Trigger Interval Options section:

  • In the first field, select one or more of Daily, Weekday, Weekend, or Select All, and then click OK.
  • In the second field, select one or more of Daily, Weekday, Weekend, or Select All, and then click OK.
  • In the third field, select one or more of the available 30-minute intervals, or Select All, and then click OK.

Only the options selected are displayed to the end-user. In the following illustration, the end-user and Default Trigger Interval settings can only be set to Daily At < any 30-minute interval >.

Based on the Trigger Interval Options selected, define the three fields in the Default Trigger Interval section for the trigger Scheme, Frequency, and Time.

Setting Up Alert Reminders

For some alert tasks, for example, Google Calendar Event Updates task, you may want to add an alert reminder to the task. The alert reminder sends a reminder message notification to the end-user after receipt of the original alert task message. For example, the end-user may want to set up a 30-minute and 15-minute reminder before an event.

To enable and configure alert reminders, in the Enable Alert Reminder section, click the On/Off  button. The alert reminder configuration section is displayed as shown in the following illustration.

Defining the Trigger Interval

To configure an alert reminder, complete the following steps.

  1. In the Reminder Frequency section, click in the text box to display and select one or more intervals for the frequency of the reminder ranging from 5 mins to 7 days.
  2. In the Reminder Message text area, enter the message to display to the end-user for the event reminder. For example,

    print('Event starts in '+__frequency__);

  3. In the Identity Event Modification section, enter one or more keys in a comma-separated list used to identify new events. For example, Id,LastModifiedDateTime,Subject.
  4. In the Event Start Time section, enter the message to display to the end-user for the start date and time of the event using the alert payload field that contains the event start time. For example,

    print(new Date(Start.DateTime).toISOString());

  5. In the Format to Identify Recurrence section, select the type of recurrence pattern format used in the payload as one of RRule or Cron.
  6. In the Recurrence Pattern section, define the string displayed to the end-user to show the frequency of a repeating event, such as a recurring weekly meeting. For example,

    if(typeof(Recurrence) !== 'undefined' && Recurrence) {
    var map = new Object();
    map['Daily'] = "DAILY";
    map['Weekly'] = "WEEKLY";
    map['AbsoluteMonthly'] = "MONTHLY";
    map['RelativeMonthly'] = "MONTHLY";
    map['AbsoluteYearly'] = "YEARLY";
    map['AbsoluteYearly'] = "YEARLY";

    map['First']=1
    map['Second']=2
    map['Third']=3
    map['Fourth']=4
    map['Last']=-1

    map['Sunday']='SU'
    map['Monday']='MO'
    map['Tuesday']='TU'
    map['Wednesday']='WE'
    map['Thursday']='TH'
    map['Friday']='FR'
    map['Saturday']='SA'


    var rrule = '';
    if(typeof(Recurrence.Pattern.Type)!== 'undefined') {
    var freq = map[Recurrence.Pattern.Type];
    rrule = rrule +'FREQ='+freq+';';
    }
    if(typeof(Recurrence.Range.StartDate)!== 'undefined') {
    var stDate = new Date(Recurrence.Range.StartDate).toISOString();
    rrule = rrule +'DTSTART='+stDate+';';
    }
    if(typeof(Recurrence.Pattern.Interval)!== 'undefined') {
    var interval = Recurrence.Pattern.Interval
    rrule = rrule +'INTERVAL='+interval+';';
    }
    if(typeof(Recurrence.Range.EndDate)!== 'undefined' && Recurrence.Range.Type !== 'NoEnd') {
    var edDate = new Date(Recurrence.Range.EndDate).toISOString();
    rrule = rrule +'UNTIL='+edDate+';';
    }

    if(typeof(Recurrence.Pattern.Month)!== 'undefined' && Recurrence.Pattern.Month !== 0) {
    rrule = rrule +'BYMONTH='+Recurrence.Pattern.Month+';';

    }
    if(typeof(Recurrence.Pattern.DayOfMonth) !== 'undefined' && Recurrence.Pattern.DayOfMonth !==0) {
    rrule = rrule +'BYMONTHDAY='+Recurrence.Pattern.DayOfMonth+';';
    }

    if(typeof(Recurrence.Pattern.Index) !== 'undefined'){
    var wno = map[Recurrence.Pattern.Index];
    rrule = rrule +'BYSETPOS='+wno+';';
    }

    if( typeof(Recurrence.Pattern.DaysOfWeek) !== 'undefined') {
    var arr = [];
    for(var i = 0; i < Recurrence.Pattern.DaysOfWeek.length; i++) {
    arr.push(map[Recurrence.Pattern.DaysOfWeek[i]])
    }
    rrule = rrule +'BYDAY='+arr.join(',')+';';

    }
    print(rrule);
    }

  7. If the Format to Identify Recurrence field is set to Cron, then define the Event End section to define the string displayed to the end-user to show the date and time of the last recurring event.

Click Continue or Save to save the settings, and then click Finish to finish the review of the task configuration.

Next Steps

With the alert task configured, you may want to create or map related tasks that a user can take in response to a message notification, called a flow in Kore. For example, if a user gets a notification message from Zendesk that a new ticket was created, examples of a related task could be to add a comment to the ticket or assign the ticket to an agent. For more information, see Mapping Action Tasks to Alert Tasks.

Comments