# Update Profile Traits widget (public beta)

> \[!IMPORTANT]
>
> The Update Profile Traits widget is currently available as a Public Beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by a Twilio SLA.

> \[!WARNING]
>
> The Update Profile Traits widget is not a HIPAA Eligible Service or PCI compliant and should not be used in Flex or Segment workflows that are subject to HIPAA or PCI.

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.

> \[!NOTE]
>
> New to Twilio Studio? Check out our [Getting Started guide](/docs/studio/user-guide/get-started).

With the Update Profile Traits widget, you can set or update trait values for a customer profile from within a Studio Flow. Take information you learn about a caller during a flow execution and send it to Unified Profiles to update profile trait data. This allows you to enrich profiles to personalize future customer experiences based on their profile traits.

With the Update Profile Traits widget, you can:

* Overwrite existing traits on a customer profile, to ensure your customer data is up-to-date. For example, update a `preferred_name` trait from `Robert` to `Bob`. Then, when a customer calls in again, you can correctly refer to them by their preferred name without having to ask again.
* Write new trait data to an empty profile, to help you enrich profiles for more personalized future experiences. For example, collect a `zip_code` trait to help you authenticate a caller on future calls.

![Update Profile Traits widget with options: Profile Updated, Profile Not Found, Failed.](https://docs-resources.prod.twilio.com/d38ca4f95b4e63ba5b5b0e405d39e0d25ff35c7e21a04575ca2072000e9eaa9f.png)

## Before you begin

Before you configure and use the Update Profile Traits widget, you'll need:

* Access to [Unified Profiles in Flex](/docs/flex/admin-guide/setup/unified-profiles).
* A Profile ID, connected to the profile you wish to update, which you can find using the [Search for a Profile widget](/docs/studio/widget-library/search-for-a-profile).
* The trait name and value that you'll be setting or updating. [Traits](/docs/unified-profiles/traits) are attributes in Segment that you can use to search against.

## Required configuration

The Update Profile Traits widget requires the following information:

| Friendly name      | JSON Definition Key   | Description                                                                                                                                                                        | Default |
| ------------------ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| Unified Profile ID | profile\_connect\_sid | ID of the profile to write to <br /><br /> Here's an example of a value that you might want to use in this field: `{{widgets.search_for_profile_1.ProfileData.profileConnectSid}}` | None    |
| Traits             | traits                | List of key/value pairs of traits to write to the specified profile. If the trait doesn't exist, it will be created and populated with the value you send.                         | Empty   |

## Update Profile Traits transitions

These events trigger transitions from this widget to another widget in your Flow. For more information on working with Studio transitions, see Studio's [Getting Started](/docs/studio/user-guide/get-started#define-widget-transitions) guide.

| Transition friendly name | Key               | Description                              | When should Studio take this transition?                                                       |
| ------------------------ | ----------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Update profile           | `profileUpdated`  | Profile was updated with provided traits | If the profile update was successful, this should transition to a widget write succeeded state |
| Profile not found        | `profileNotFound` | Profile could not be found               | When the profile could not be found with the profile ID provided                               |
| Failed                   | `failed`          | Profile failed to update                 | If the profile update was unsuccessful                                                         |

## Example: Set the value of the trait `callback_number` for a customer

This example shows how to use the Update Profile Traits widget to set the value of the trait `callback_number` for a customer.

When the flow receives an incoming call, Studio checks to see if the profile has a value for the trait `callback_number`. If not, the flow asks the customer to provide a new one.

Once the caller provides a number, the Update Profile Traits widget updates the trait `callback_number` with the new number as the value. On future calls, you can retrieve this callback number so that customers won't have to enter it again.

![Flowchart of a callback process using widgets for profile search and input gathering.](https://docs-resources.prod.twilio.com/c679f49097f591561fc39f8ea1f753d23f7396b94d3e3f5e6852329dc6bee29d.png)
