subscriberId
and an optional digestKey
that can be added to control the digest logic of the events.
Digest action step
After adding a digest step to a workflow, each node that will be below the digest node will be only triggered once in the specified digest interval. You can decide to send messages before adding a digest node and they will be triggered in real-time.
Digest configuration
Digest key
If specified, the digest engine will group the events based on thedigestKey
and subscriberId
, otherwise the digest engine will group the events based only on the subscriberId.
The digest key might come useful when you want a particular subscriber to get events grouped on a custom field. For example when an actor likes the user’s post, you might want to digest based on the post_id
key.
Time interval
The time interval determines how long the digest engine will wait before sending the message once created. You can specify the amount and the unit that best suits your needs. Here, in the image below,5
is the interval amount, and mins
is the interval unit. Interval units can be sec(s)
, min(s)
, hour(s)
, or day(s)
.
Digest strategy types
The strategy which Novu should use to handle the digest step. More details on available strategies below. Novu allows you to define different digest strategies depending on the actual use-case you are trying to achieve. At this point we allow you to select from 2 strategies:- Regular
- Look-back
- Scheduled
Regular strategy
In regular strategy, a digest will always be created for the specified window time. Which means that from the first event trigger, if no active digest exists for this subscriber, one will be created and the user will receive the message only when the digest window time is reached.Look-back strategy
In the Look-Back strategy, before creating a digest, Novu will check if a message was sent to the user in the Look-back period. If a message was sent, a digest will be created. Otherwise, a message will be sent directly to the user and the digest creation will be skipped. Look-back digest has two intervals,digest interval
and look-back window
. First, it checks if any event is triggered within the past look-back window, only then a digest is created for the digest interval. If not, the event is considered non-digest and workflow execution continues to the next step.
Example
Let’s set the digest interval as 20 minutes and the look-back interval as 15 minutes. If we trigger the first event. Since it is the first event and there was no event triggered in the past 15 minutes (look-back interval), this event will send a message immediately (without digest). Now, if we trigger a second event within 15 minutes range, then a new digest will be created with this second event. From now on, for the next 20 minutes (digest interval), all triggers will be digested, and after 20 minutes, the workflow will carry forward to the next step with digested events as a payload.Scheduled digest
All digest times are in UTC time
- Minutes
- Hours
- Daily
- Weekly
Frequently Asked Questions
If scheduled digest is set for 9:00 AM daily then will the digest be sent at 9:00 AM every day without any event triggered?
If scheduled digest is set for 9:00 AM daily then will the digest be sent at 9:00 AM every day without any event triggered?
If scheduled digest is sent for 9:00 daily, then novu will collect all events triggered between 9:00 AM today till 9:00 AM tomorrow and send the digest at 9:00 AM tomorrow. This process is repeated daily. If there is no any event triggered between 9:00 AM today and 9:00 AM tomorrow, then no digest will be sent.
What is the difference between Regular and Schedules Digest set to 1 Hour?
What is the difference between Regular and Schedules Digest set to 1 Hour?
Both digests are same in this case.