Sample apps
To help you integrate the Smart UI in your application, we’ve created a few code snippets using different Frameworks.
Before you start on any of these examples, please remember to install Smart UI first by including this script in your entry html file, as instructed in Getting started.
In the examples below, please change frankieBackendUrl
to your FrankieOne environment of choice and ffToken
to the token retrieved in Getting started.
Angular JS Example
Vue JS Example
Silent “Unknown custom element: <ff-onboarding-widget>
”
Our <ff-onboarding-widget>
is a non native html tag and for Vue 2 it will throw out warnings about it. To silence the warnings, we need to config Vue to ignore that html tag.
React Example
React Native Example
There’s no Smart UI component for React Native, or any other cross platform/native framework. Since the Smart UI is a web compliant widget, to get it to work into any native app we need to embed it into a Webview. For React Native, first you will need to install this package to use WebView.
Then you can either code the html into WebView by creating a string variable like in the snippet below, or you can host and serve an html file and load it via uri.
Obtaining the token (Postman)
Obtaining the token (example in Node + Express + Axios)
Using applicant Reference to update an entity
When initialising the Smart UI, If an entity is found for the given applicantReference, the entity data will be retrieved and preloaded into the smart UI so that the user can continue their onboarding journey.
The snippet below demonstrates where the applicant reference goes in relation to the rest of the config. For a complete and up to date details on the configuration, please refer to the Smart UI Configuration page.
Make sure applicantReference is unique
FrankieOne requires applicantReference to be a unique value across your different applicants, otherwise the retrieve process will have inconsistent results. Applicant references with whitespace characters aren’t supported by the Smart UI and will be rejected. Please let us know if this will prevent you from integrating.