DataSapien
DataSapien is the SDK entry point exposed to scripts as a global. Only whole-SDK operations live here; everything else stays on the individual service globals.
The global is available in Journey Script steps, Rule script actions and Script-sourced MeData Definitions. It is not available in Journey conditional flow scripts, which only expose JourneyContext.
Functions
syncAll
DataSapien.syncAll(): Promise<void>
Re-synchronizes all backend-driven data: MeData definitions, natively collected MeData, journeys, rules, managed APIs, segment subscriptions, managed AI models, and audiences.
The promise rejects if the MeData definition sync or the native collection fails; every other sync logs its own error and does not abort the rest.
Parameters: None.
try {
await DataSapien.syncAll();
onSuccess(true);
} catch (e) {
onError(e);
}