Skip to main content

Custom

Custom block

Overview

Custom blocks are the swiss army knife of blocks. They are our most primitive component block, and consequently the most flexible and expressive.

Unlike other blocks accessible via the API, (e.g. tour block, checklist block, and modal block) they support arbitrary outgoing paths, and have no Dopt-provided UI component that they necessarily pair with.

As a result, they are an extremely flexible way to represent any state of a user in their journey.

Most commonly, this state would be used to control the visibility of some user experience, but could also represent a user action having performed some action. A more complex but very powerful usage might involve routing the user through a setup workflow based on custom block states and transitions.

Every custom block has a user-editable identifier and a uid. The identifier (along with the flow identifier) is the key that developers will use to access the block via SDK. Block identifiers must be unique to the flow and can only be changed while in the uncommitted version. The block uid is used when accessing blocks directly from the API or API clients.

info

You can get the uid of a block by clicking the more menu in the details panel for the block and then clicking the Copy UID menu item.

States

A custom block contains the following states:

StateTypeDefinition
ActivebooleanThe block has met all entry criteria so it can be shown to the user
EnteredbooleanA user has seen this block
ExitedbooleanA user has transitioned this block

Transitions

A transition is used to progress down a path to a subsequent block from a custom block. The transition used determines which path(s) to follow.

Transitions are named so you can encode whatever semantics you would like. For instance, if you are using a transition to progress to the next step in a tour, you might name it next.

A transition can map to a single path or many paths depending on what your experience requires. A single path may also map to many transitions which is to say that a path can have multiple names.

Custom blocks store which transition was used so it can be recalled later. This can be useful for crafting experiences that are predicated on a past transition.

Learn more about transitions →

Fields

Fields allow you to store and manage content as part of a custom block. You can then pull down this content via SDK to use in your product experience. Since content is stored and managed with Dopt, you can make changes without having to update or deploy code.

Learn more →