core-utils
    Preparing search index...
    interface IdempotencyKeyParts {
        eventOccurredAt?: string;
        resource?: { id: string; type: string };
    }
    Index

    Properties

    eventOccurredAt?: string

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

    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.

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