User Update
The User Update component allows you to update a user’s attributes, events, and purchases in a JSON composer, so there’s no need to include sensitive information like API keys.
With User Update, updates don’t count towards your users or track per minute rate limit. Instead, these updates are batched so Braze can process them more efficiently than a Braze-to-Braze webhook. Note that this component does consume data points.
Users will only advance to the next Canvas steps after the relevant user updates have been completed. If your subsequent messaging relies on the user updates that you’re making, you can ensure that these updates have been completed prior to when the messages send.
Create a User Update
Drag and drop the component from the sidebar, or click the plus button at the bottom of the variant or step and select User Update.
There are three options that allow you to update existing, add new, or remove user profile information. All combined, the User Update steps in an app group can update up to 200,000 user profiles per minute.
You can also test the changes made with this component by searching for a user and applying the change to them. This will update the user.
Update custom attribute
To add or update a custom attribute, select an attribute name from your list of attributes and enter the key value.
Remove custom attribute
To remove a custom attribute, select an attribute name using the dropdown. You can switch to the advanced JSON composer to further edit.
Advanced JSON composer
Add an attribute, event, or purchase JSON object up to 65,536 characters to the JSON composer. A user’s global subscription and subscription group state can also be set.
Using the advanced composer, you can also preview and test that the user profile is updated with the changes with the Preview and test tab. You can either select a random user or search for a specific user. Then, after sending a test to a user, view the user profile using the generated link.
Limitations
You don’t need to include sensitive data like your API key while using the JSON composer as this is automatically provided by the platform. As such, the following fields are unneeded and should not be used in the JSON composer:
- External user ID
- API key
- Braze cluster URL
- Fields related to push token imports
Log custom events
Using the JSON composer, you can also log custom events. Note that this requires timestamp in ISO format, so assigning a time and date with Liquid at the beginning is needed. Consider this example that logs an event with a time.
1
2
3
4
5
6
7
8
9
{% assign timestamp = 'now' | date: "%Y-%m-%dT%H:%M:%SZ" %}
{
"events": [
{
"name": "logged_user_event",
"time": "timestamp"
}
]
}
This next example links an event to a specific app using a custom event with optional properties and the app_id
.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{% assign timestamp = 'now' | date: "%Y-%m-%dT%H:%M:%SZ" %}
{
"events": [
{
"app_id": "insert_app_id",
"name": "rented_movie",
"time": "timestamp",
"properties": {
"release": {
"studio": "FilmStudio",
"year": "2022"
},
"cast": [
{
"name": "Actor1"
},
{
"name": "Actor2"
}
]
}
}
]
}
Update subscription groups
You can also update subscription groups using the user update step. The following example shows an update to subscription groups. You can perform one or multiple subscription group updates.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"attributes": [
{
"subscription_groups": [
{
"subscription_group_id": "subscription_group_identifier_1",
"subscription_state": "subscribed"
},
{
"subscription_group_id": "subscription_group_identifier_2",
"subscription_state": "subscribed"
},
{
"subscription_group_id": "subscription_group_identifier_3",
"subscription_state": "subscribed"
}
]
}
]
}
Use cases
Set Canvas entry property as an attribute
You can use the user update step to persist a canvas_entry_property
. Let’s say you have an event that triggers when an item is added to a cart. You can store the ID of the most recent item added to cart and use that for a remarketing campaign. Use the personalization feature to retrieve a Canvas entry property and store it in an attribute.
Personalization
To store the property of the trigger event for a Canvas as an attribute, use the personalization modal to extract and store the Canvas entry property. User Update also supports the following personalization features:
- Connected Content
- Content Blocks
- Entry properties
- Liquid logic (including aborting messages)
- Multiple attribute or event updates per object
Increment numbers
This component can also be used to track the number of times a user has performed an event in increment and decrement numbers. For example, you could track the number of classes that a user has taken in a week. Using this component, the class count can reset at the start of the week and begin tracking again.
Add to arrays
You can add or remove items from an array, and remove an item. For example, you could use this step to add to or remove items from a wishlist.