How to Include the Onboarding script
To get started, add the following script to your application:Using the Script
Once the script is added, you can access the available methods viawindow.syntage.onboarding. To start the onboarding process, use the init() method. Specify which data you want to request from users.
Example of initialization with sat only:
buroDeCredito only:
Test Environment
To use the script in a test environment, add the following script to your application. It will include the sandbox script and display a warning indicating that onboarding is in test mode.Event Subscriptions
Thesyntage.onboarding provides a subscribe method to receive notifications of events from the Entity Onboarding.
To subscribe to the success event, use the following code:
step parameter will return sat or buroDeCredito.
To subscribe to error events, use the following code:
code and a message. Example of an error:
Error Descriptions
- Credential disabled:
credentialDisabled - Credential invalid:
credentialInvalid - Generic error:
error - Unknown error:
unknownError
Content Security Policies
Content Security Policies (CSP) are delivered as a header to your user’s browser by your web-server. They are used to declare which dynamic resources are allowed to load on your page If there is a Content Security Policy issue, you will see something similar to the below error:Tips
If the script is not yet loaded when executinginit(), you can listen for the entityOnboardingLoaded event to ensure proper initialization: