Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Resolve Profile widget


Studio widgets represent various parts of Twilio's functionality that you can combine in your Studio Flow to build out robust applications that don't require you to do any coding.

(information)

Info

New to Twilio Studio? Check out our Getting Started guide.

(information)

Legal information

The Studio Profiles widgets are not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.

These widgets are only available in the new Twilio Console. If your account hasn't been migrated, you'll be redirected to the legacy Console, where these widgets won't appear.

The Resolve Profile widget looks up a customer profile in Twilio Profiles using a channel identifier — such as a phone number or email address — or a Profile ID you already have from earlier in the flow. When a profile is found, the widget returns the profile's traits as flow variables, so the rest of your flow can route, personalize, or gate on them.

With this widget, you can:

  • Greet a returning caller by name and route based on stored preferences, such as a saved language.
  • Look up VIP status or loyalty tier to control queue priority.
  • Branch new and returning customers into different flows — send someone with no profile straight to account setup, and someone with one directly to self-service.
Resolve Profile widget configuration panel showing Profile Store, Find Profile By, Identifier Type, Identifier Value, and Profile ID fields

Before you begin

before-you-begin page anchor

Before you configure the Resolve Profile widget, you need:

  • A Profile Store in Twilio Profiles, with the identifier types you plan to search by (for example, phone or email) already configured through Identity Resolution.
  • A channel identifier available in your flow to search by — such as {{trigger.call.From}} for an inbound call — or a Profile ID from an earlier widget in the flow.

Required configuration for Resolve Profile

required-configuration-for-resolve-profile page anchor

The Resolve Profile widget requires the following information:

FieldTypeRequiredDescription
Profile StoreDropdown (account stores)YesThe Profile Store to search.
Find Profile ByRadio selectionYesA selection between Identifier or Profile ID, determining whether Identifier Type and Identifier Value or Profile ID are required.
Identifier TypeDropdown (from store configuration)ConditionalHow to identify the customer, such as phone or email. Required unless you provide a Profile ID.
Identifier ValueExpression / variableConditionalThe identifier value to search for, such as {{trigger.call.From}}. Required unless you provide a Profile ID.
Profile IDExpression / variableNoA known profile ID, such as {{widgets.resolve_profile_1.profiles.profile_id}} from an earlier Resolve Profile widget. When you provide a Profile ID, the widget fetches that profile directly and skips the identifier lookup — Identifier Type and Identifier Value aren't required.
(information)

Info

Channel identifiers such as phone numbers can change ownership over time. If you use this widget to gate access to sensitive information, verify that the returned profile's traits actually match the caller before you act on them.


Resolve Profile transitions

resolve-profile-transitions page anchor
NameDescription
Profile foundExactly one matching profile was found.
Multiple profiles foundTwo or more profiles matched the identifier. See Resolve Profile variables for how to handle this.
Profile not foundNo profile matched the identifier.
FailedThe lookup couldn't complete, such as an API error, a timeout, or a rate limit.

Resolve Profile variables

resolve-profile-variables page anchor

When the Resolve Profile widget executes, it populates the following variables, where MY_WIDGET_NAME is the name of your widget:

NameDescription
{{widgets.MY_WIDGET_NAME.profiles.profile_id}}The resolved or fetched profile's ID.
{{widgets.MY_WIDGET_NAME.profiles.store_id}}The Profile Store ID used for the lookup.
{{widgets.MY_WIDGET_NAME.profiles.identifier_type}}The identifier type used for the lookup, such as phone or email.
{{widgets.MY_WIDGET_NAME.profiles.identifier_value}}The identifier value used for the lookup.
{{widgets.MY_WIDGET_NAME.profiles.profile}}The full profile, including all trait groups and traits. Populated on the Profile found transition.
{{widgets.MY_WIDGET_NAME.profiles.profiles}}An array of matching profile IDs. Populated on the Multiple profiles found transition.
(information)

Multiple profiles found

On the Multiple profiles found transition, profiles.profiles contains an array of profile IDs, not full profile data. To fetch each full profile, use a counter variable with a Split Based On (or Branch) widget loop:

  1. Set a counter variable to 0.
  2. Check whether the counter is less than profiles.profiles.length.
  3. Call Resolve Profile again, using {{widgets.MY_WIDGET_NAME.profiles.profiles[counter]}} as the Profile ID input.
  4. Increment the counter and repeat.

Each profile requires its own Resolve Profile call — there's no way to fetch all of them in a single request.


Example: Personalized greeting by phone number

example-personalized-greeting-by-phone-number page anchor

This example looks up a caller by phone number and branches based on whether a profile is found.

When a call comes in, a Resolve Profile widget searches by {{trigger.call.From}}. On the Profile found transition, the flow plays a greeting using the customer's stored Contact.firstName trait. On Profile not found, Multiple profiles found, or Failed, it falls back to a generic greeting.

Flow diagram: incoming call triggers Resolve Profile, which branches to a personalized greeting on Profile found, or a generic greeting on Profile not found, Multiple profiles found, or Failed