Deep dive into Digest functionality
subscriberId
and an optional digestKey
that can be added to control the digestion of the events.
Digest Nodes
Email
and SMS
) after the digest node and one node (In-App
) before the digest node in the workflow.
For this workflow, if we trigger 10 events within the digest interval, the In-App
step will be executed 10 times, and Email
and SMS
will be executed only 1 time with digested events data.
digestKey
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.
Digest Key
5
is the interval amount, and mins
is the interval unit. Interval units can be sec(s)
, min(s)
, hour(s)
, or day(s)
.
Time interval
digest interval
and backoff interval
. Here, in the image below, the digest interval
is 20 minutes
, and the backoff interval
is 15 minutes
. In the case of a backoff digest, first, it checks if any event is triggered within the past backoff interval, 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.
Back-off Strategy
Scheduled Digest in Minutes
Scheduled Digest in Hours
Scheduled Digest Daily
Scheduled Digest Weekly
Scheduled Digest Monthly
Property | Description |
---|---|
step.events | An array of all the events aggregated under this digest. This will be the “payload” object passed to each trigger.event sent in the digest period |
step.total_count | The number of total events in this digest |
step.digest | A boolean flag to indicate if we are in a digest mode right now |
Property | Description |
---|---|
step.events | [ { "name" : "Hello" }, { "name": "World" } ] |
step.total_count | 2 |
step.digest | true |
Total events in digest: 2 This is Hello payload event This is World payload event
step.total_count
as 1. {{subscriber.firstName}}
, {{subscriber.email}}
etc are system reserved variables. These variables can be used in the same form if used outside of step.events
iteration. If you want to use subscriber variables inside step.events
iteration, you can use {{../subscriber.firstName}}
, {{../subscriber.email}}
. Reason of this change inside step.events
iteration is the context change. Subscriber variables are available in the parent context of step.events
iteration.
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?
What is the difference between Regular and Schedules Digest set to 1 Hour?