Skip to main content

Journeys Results

Some responses captured while users interact with journeys can be stored for analysis with the write_result() function.

This function follows the Flow Results Specification. See the Flow Results API for more details on how to retrieve these user responses and their related metadata.

Example

The following example creates a journey that ask the user for their name, then store that result for later analysis and thank the user for their response.

card AskName, then: StoreName do
name = ask("What is your name?")
end

card StoreName do
write_result("name", name, label: "User's name")
text("Thanks, @name - Your response has been stored.")
end

Note that an optional label parameter can be used. If no label is provided, the reference (the string "name" in this case) would become the label. This label must be a fixed string, it cannot be evaluated as an expression because these labels are only stored at the time of saving the journey.