Terms of Service (TOS) Flow

This flow allows a user to review and accept the latest version of the Tilia Terms of Service. In addition to being a prerequisite for other flows, it is also available as a standalone flow. If the user has already accepted the latest TOS, the flow will complete without displaying the UI. If the TOS has changed since the user last visited, they will be presented with a UI so they can review and accept the updated version.

tos flow redirect

Widget flow

Copy
Copied
window.Tilia.execute({
    rootId: < your.element.id > ,
    flow: tos,
    redirect: < redirect > ,
    onComplete: handleComplete,
	onError: handleError,
});

The handleComplete callback is invoked by the widget with the result of the flow.

If the user cancels anywhere in the flow:

Copy
Copied
{
	source: “tilia”,
	event: “tilia.tos.complete”,
	state: “cancel”,
}

If the user completes the flow:

Copy
Copied
{
	source: “tilia”,
	event: “tilia.tos.complete”,
	state: “complete”,
}