core-utils
    Preparing search index...
    interface IdempotencyKey {
        eventOccurredAt?: string;
        resourceId?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    eventOccurredAt?: string

    Prefer resourceId 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().

    resourceId?: string

    If a resource triggered your workflow, include its unique ID.

    Note: workflowKey, recipients, and workplaceId (if it exists in the trigger body) are included in the idempotency key automatically.

    1. For a "meeting starts in one hour" notification, set resourceId to the meeting ID.
    2. For a payout notification, set resourceId to the payment ID.