Node SDK

alias

Migrate events from one known ID to another known ID.

Ferno reassigns all previous events for previousId to userId. Use this only for known-ID migration or merging duplicate known accounts:

FieldRequiredTypeDescription
userIdtruestringThe new canonical user ID to associate with the previous ID.
previousIdtruestringThe prior user or anonymous ID whose events should be reassigned.
contextfalseobjectAdditional context about the identity migration.
timestampfalsestring | DateThe time the alias operation occurred.
integrationsfalseobjectPer-call destination controls that enable or disable specific integrations.
messageIdfalsestringAn application-provided identifier used to deduplicate the alias event.
callbackfalsefunctionRuns after dispatch processing.

Most applications do not need to call alias; identify is sufficient for anonymous users, sign-in, session restoration, and account switching.

  • Legacy ID to canonical ID migration.
  • Duplicate customer-record merge.
  • Account-model consolidation.
  • Database import or identity repair.

Do not call alias after ordinary authentication or when a user switches accounts. Call identify for the authenticated account instead. Alias would incorrectly merge separate users.

Optional fields are context, timestamp, integrations, and messageId. The callback is the second argument.