Send windows

Learn how to control when notifications are delivered using send windows.

You can use send windows to specify when a channel step should send a message. For example, if you want to ensure your customers don’t receive a given transactional email from your product outside of working hours, you can set send windows for Monday - Friday, between 9:00 a.m. and 6:00 p.m. local user time.

Messages generated outside of this window will be queued until the next open window, at which time Knock will resume delivery to the downstream provider.

Send windows are evaluated using the recipient's local time, specified by the user timezone property. If the user's timezone is not set, the account default timezone will be used.

Modeling send windows

Knock models send windows as a list of send window objects. Each day must have 1 send window specified.

The send window object has the following properties:

dayDay of the week. One of: ”monday”, ”tuesday”, ”wednesday”, ”thursday”, ”friday”, ”saturday”, ”sunday”.
typeWhether notifications should be sent or not sent for this send window. One of: ”send”, ”do_not_send”.
fromAn optional ISO-8601 time-only format string specifying the start of the window (defaults to 00:00:00). Only supported if type is set to ”send”.
untilAn optional ISO-8601 time-only format string specifying the end of the window (defaults to end of day). Only supported if type is set to ”send”.

In our JSON representation this will look something like:

The send windows editor

When creating or modifying a channel step, you can use the send window editor to configure send windows. If notifications are enabled for a given day of the week, you can also specify the time range during which messages will be sent on that day.

Send windows editor

Send windows editor