Starting the application
The application lifecycle or flow begins by creating and loading a new transaction via one or two API calls.
This can be achieved via calling the Form Load command for applications hosted on Manager.
If you are planning on hosting an application outside of manager you must call the Form New operation to create the new transaction followed by calling the Form Load command to load the prefill data.
Both of these commands can also be used to retrieve previously saved application, please view the formLoad API for more information.
The data returned by the Form Load command should be merged into your client side state.
After the state has been initialized, call the Form Init command to record initialization performance in Manager. This is done automatically in the Core library after Form Load.
During the application flow
As soon as the user starts interacting with the form (when data changes or when user changes page / route) call the Form Start command. This will record the time in which the user has first started using the application.
When the user changes page or route, call the Form Update command with the current client side state as the form data. This will perform a background save in Manager as well as allow you to run a server side form function, for example this could run business logic such as creating a customer or validating a current customer.
A Form Update command can also return form data if the form function is setup to return it, this could include further prefill or data for driving business logic and should merged into your current client side state. Furthermore, the Form Update request can also be used to add and / or remove attachments. Please view the formUpdate API for more information.
If the application requires additional data for a component and that data shouldn't be stored in the state. You can use a Form Function command to retrieve that data. A good example of this would be an address lookup list.
Finishing the application flow
The application flow could end in various different ways depending on the scenario, please see below.
User Initiated Save
A user initiated save operation is performed by calling the User Save command, this is usually done on a button click.
The application should display a save confirmation page after this operation.
User Initiated Submit
A user initiated submit operation is performed by calling the User Submit command.
Usually performed after clicking the submit button on the final page of the user journey.
The application should display an application completed confirmation page after this operation.
User Initiated Abandonment
A user initiated cancel abandonment operation is performed by calling the User Cancel command, this is usually done on a button click.
The application should display a cancel confirmation page after this operation.
Application Initiated Abandonment
An application initiated ineligible abandonment operation is performed by calling the Form Ineligible command.
The application should display a custom page after this operation preventing the user from performing further work.
There are two potential flows when creating an Open UX application:
- Application hosted on Manager
- Application not hosted on Manager
These flows are explained and illustrated below.
Hosted on Manager
This flow is for when Transact is rendering the Open UX application, providing platform features such as security and CDN support.
Not hosted on Manager
This flow is for when the Open UX application is not being rended by Transact, but is instead being rendered separately by another system such as a content management system (CMS) or other application.
Postman API Collection
This collection demonstrates how the APIs would work in an externally hosted application.
You can download and run the Open UX API collection here.
You can learn more about Postman here.