Skip to content
Help Center

Accessing Persona data in Workflows

View MarkdownContact support4 min read
On this page

Overview

Workflows enable builders to automate business logic that adapts to each user or verification in real time. For example, you might want to have different business behavior based on fields, such as running different checks depending on a user’s age, segment, or country. Persona supports this by allowing you to access relevant data and displaying descriptions and data types. This makes it easier to find and reference the right information within your workflow.

overview_accessing_persona_data_workflows

Accessing attributes

An attribute (or field) represents a single data point within an object, such as inquiry.age or inquiry.country. You can access attributes of different Persona objects by first selecting the object, then selecting the attribute. Note that the object that triggered the workflow is referenced by Trigger (i.e. for an Inquiry Completed workflow, the attributes of the inquiry are available under Trigger). System fields are available directly after selecting the object, whereas custom fields are available under Object > Fields.

accessing_attributes

While it’s most common to use attributes of Persona objects, it’s also possible in some steps to reference a hash in it’s entirety (i.e., in Update Object step).

Using functions

In addition to accessing Persona data, you can also run basic functions. Available functions appear in drop-downs, based on what data type you’ve just entered. For instance, if you’ve entered inquiry.name_first, the functions that are available for strings will appear, since inquiry.name_first is a string.

using_functions

The full list of functions can be found below, with examples of how these functions can help drive more powerful and efficient workflows in the section following.

Examples

Find below examples where using functions on top of Persona data can help reduce step count and natively support the logic you need.

  • A builder wants to condition separate paths for first time customers versus customers that have previously contacted support/ been reviewed. In this case, the .count function (account.cases.count) can be used in the conditional step to create a route for >=1 cases.

    example_count

  • A builder wants to sanitize customer entered inputs (i.e., first name) before using them in a Send Email step in a module. Here, the builder can use trigger.fields.first_name.trim when defining their module input, which means any workflow that calls this module will have the first name value trimmed for more professional and polished emails.

    example_santitize_inputs

  • A KYB customer creates a case for every business they onboard. Each case has one business account and multiple UBO accounts. Since UBO accounts can have their own inquiries, the builder wants to attach all UBO inquiries to the business case. Here, the builder can use the filter and collect from each functions (trigger(case).accounts.filter(‘type’, ’=’, ‘ubo’).collect_from_each(‘inquiries’)) in a loop step to fetch and attach all UBO inquiries.

    collectfromeach-filter-demo-workflows

Was this page helpful?If something is missing, let us know and we will take a look.
Thanks for the feedback. It helps us improve these docs.