Skip to main content

BackupService

Script-engine API for creating and restoring full SDK backups. Available in Journey Script steps, Rule script actions, and Script-sourced MeData Definitions.

Functions

createBackup

BackupService.createBackup(): Promise<string | null>

Creates a full SDK backup as a serialized JSON string.

Parameters: None.

restore

BackupService.restore(
json: string
): Promise<void>

Restores SDK state from a previously created backup JSON string.

Parameters:

  • json: string — Backup JSON string produced by createBackup().

Notes

  • Backup JSON must be exactly what createBackup() produced.
  • Large backups are supported; processing happens entirely on-device.