Prefer resource over eventOccurredAt; it's harder to misuse.
If an event triggered your workflow and it doesn't have a unique ID, you may decide to use its
occurrence timestamp. For example, if you have a daily CRON job, use the date it ran.
Use .toISOString().
Optionalresource
resource?:{id:string;type:string}
Do not include workflowKey, recipients, or workplaceId; they are included
automatically.
If a resource triggered your workflow, include its unique ID.
Example
1.Fora"meeting starts in one hour"notification, setresource.idtothemeetingID. 2.Forapayoutnotification, setresource.idtothepaymentID.
Prefer
resourceovereventOccurredAt; it's harder to misuse.If an event triggered your workflow and it doesn't have a unique ID, you may decide to use its occurrence timestamp. For example, if you have a daily CRON job, use the date it ran.
Use
.toISOString().