Skip to main content

Scripts

The DataSapien Mobile SDK makes use of an embedded JavaScript Engine and the DataSapien Orchestrator features a capable Script Editor with code completion support. Using the web-based Script Editor, you can author scripts on the Orchestrator and deploy them to the Mobile SDK to be executed on-edge, seamlessly integrated with your UX.

Script Based MeData Definitions

One powerful feature of the DataSapien Platform is its ability to create your own MeData Definitions aligned with your business needs. Among others, Script Sourced MeData Definitions allow you to execute scripts to collect MeData.

With scripts, you can: connect, authenticate to and consume any external API. This is extremely powerful in its simplicity. It makes the entire digital infrastructure accessible to you in a secure and controlled manner. You can consume any public or private (including your own/proprietary) API, and process the fetched response in any manner, saving it as a MeData value.

Script Based MeData Definitions allow you to collect data from virtually any source: if it has an API and is accesible via a network, you can use it as a MeData source thanks to DataSapien Platform.

Executing Scripts as Rule Actions

MeData based Rules can trigger actions when they are evaluated and their condition is met. Among other action types, Script Actions can execute your authored logic.

Scripts in Journeys & Exchanges

Journeys & Exchanges allow you to design end-to-end flows within your application, complete with custom screens and logic. Using Script Steps in Journeys, you are able to access Journey scoped variables (say an answer collected with a custom screen), call an API or change the order of a flow. Scripts enable you to implement any business idea and end-user interaction since they let you implement the logic in which ever way your require.

Full SDK Services and AI Integration

The DataSapien Mobile SDK provides functionality via well defined services. All functionality offered by services can be invoked by your app directly or via Scripts that you author.

One notable service that scripts have access to, when executed on-edge by the SDK, is ML/AI Model service. The ML/AI Model Service provides a generic interface to invoke any deployed ML/AI model. This enables you to make an ML/AI function call at any place in a customer journey, adding script functionality as it suits the desired outcome.