# The Create Timer Action

Elliot Fiske

## Overview

The Create Timer Action is used to schedule another Action to run at a specified time. This Action can be a Data Flow, a Chat Bot, or any other Action. To run a timer action, specify a Timer Key, the length of time to wait, and whether to use an Availability Schedule, referred to by the timer as a "calendar", to restrict the timing of the event.

## Use Cases

• Set up reminders for users to follow up on a journey
• Send user state of a journey on a regular interval
• Send a CSAT score prompt after a day
• End session at the end of a ChatBot Conversation
• Schedule a call for a future date

## Action Properties

### Timer Key

The timer key is a unique text string to identify the timer. If the timer must be canceled by the Stop Timer Action, this key will be used to identify the timer to remove.

### Execution Time

The amount of time that should pass before the associated event fires. If the timer should always take the same amount of time, specify a number and a unit of time (e.g. 3 Hours). Alternatively, the time can specified by any expression that returns a DateTime. For example:

ADD_TO_DATETIME(  NOW(),  5,  "minutes")

This will set the timer to run five minutes from now.

Sometimes Actions shouldn't happen within a certain time frame. For instance, Voice Bots should only be triggered within working hours to comply with TCPA. Specify an Availability Schedule from the dropdown under Which Calendar or enter an expression that returns an Availability Schedule. Then specify what should happen if the event fires during an excluded time on the calendar.

• "Don't Schedule and Cancel" - If the scheduled time is outside of the given availability window, don't run the Actions.
• "Use Next Available Time" - Run the Actions on the next available window.
• "Run in Previous Available Window" - If the target time is in an unavailable window, search for the closest previous available window to run the Actions.
• "Schedule Anyway" - Run the Actions even if it violates the time. This is the same as not selecting an Availability Schedule at all.

It is also possible to write an expression that returns the value based on factors for the event. The options are "SKIP", "NEXT", "PREVIOUS", and "NONE", corresponding to the actions listed above.

### Setting Up Actions

In the action tree in the inspector, timers have a + icon next to them. Clicking the icon opens the Add Action Dialog. This is used to select the actions that will run when and if the timer fires.