Articles in this section

Persistence in Solve Widget

Persistence is a feature that enables two key functionalities:

  1. "Remembering" of widget state after a page refresh or when closing and reopening the page.
  2. Synchronizing of widget state between browser tabs.

Definitions

1. Conversation: A recorded stream of interactions with the widget, including sending and receiving messages, clicking buttons, etc. Each conversation has a defined start and end.

    • Conversation Start: The first interaction with the widget, typically a click on an intent button or a text message from the user.
    • Conversation End: The last interaction with the widget before a period of inactivity lasting persistence duration (default is 3 hours).

2. Persistence Store: A separate and independent persistence instance. By default, there is one persistence store for each data-api-key.

Note: The domain of the page does not affect persistence; two different pages on different domains will use the same persistence store if they share the same data-api-key.

3. Persistence Duration (default is 3 hours): The duration of inactivity before a conversation is considered ended.

Embed Script Attributes (data-ft-* and Others)

If any embed script attribute changes when a page with the widget is opened, the widget state will be reset, and a new conversation will begin. This applies not only to data-ft-* parameters but to any script attribute as well. Additionally, the following script attributes—data-ft-workflow-tag, config-ft-persistence-id, and config-ft-ignore-persistence-parameters—can be used to enhance this logic to meet specific business requirements. More details about these script attributes are provided below.

It is important to note that if any script attributes change while using data-ft-workflow-tag, config-ft-persistence-id, and config-ft-ignore-persistence-parameters, the conversation's context will not be updated with those changed values.

Note: The src, config-ft-persistence-id, and data-ft-workflow-tag attributes are excluded from this logic, meaning they do not reset the widget.

data-ft-workflow-tag - Space-Delimited String

Each data-ft-workflow-tag filters workflows by this tag and has its own independent persistence store.

Example: data-ft-workflow-tag="workflow-tag1"

config-ft-persistence-id - String

This creates a separate persistence store for this specific config-ft-persistence-id. It functions similarly to data-ft-workflow-tag, but does not affect workflow tags.

Example: Use config-ft-persistence-id="my-persistence-id-1" in one snippet and config-ft-persistence-id="my-persistence-id-2" in another to create two separate persisted widgets.

Note: If you use config-ft-persistence-id, it disables the default behavior of data-ft-workflow-tag for persistence. To have separate persistence stores for different workflow tags, include your workflow tags in the config-ft-persistence-id value, e.g., config-ft-persistence-id="my-persistence-id-1 workflow-tag-1"

config-ft-ignore-persistence-parameters - Pipe-Delimited String

This parameter prevents resetting the widget when specified embed script attributes change.

Example: config-ft-ignore-persistence-parameters="data-ft-location|data-ft-auth"

Was this article helpful?
0 out of 0 found this helpful

Support

  • Need help?

    Click here to submit a support request. We are here to assist you.

  • Business hours

    Monday to Friday 8am - 5pm PST excluding US holidays

  • Contact us

    support@forethought.ai