Skip to content

Commit

Permalink
Merge pull request #7068 from braze-inc/BD-2921
Browse files Browse the repository at this point in the history
BD-2921: Edits for objects and filters section - Looker feedback
  • Loading branch information
rachel-feinberg authored Mar 20, 2024
2 parents d9b5d67 + cd93c83 commit f6457c2
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 52 deletions.
16 changes: 8 additions & 8 deletions _docs/_api/objects_filters/aliases_to_identify.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ description: "This article explains aliases to identify object specification."

# Aliases to identify object

An API request with any fields in the Attributes Object will create or update an attribute of that name with the given value on the specified user profile.
An API request with any fields in the attributes object will create or update an attribute of that name with the given value on the specified user profile.

Use Braze user profile field names (listed as follows or any listed in the section for [Braze user profile fields]({{site.baseurl}}/api/objects_filters/user_attributes_object/#braze-user-profile-fields)) to update those special values on the user profile in the dashboard or add your own custom attribute data to the user.

## Object body

```json
{
"aliases_to_identify" : (required, array of Aliases to Identify Object)
"aliases_to_identify" : (required, array of aliases to identify object)
[
{
"external_id" : (required, string) see External User ID,
"external_id" : (required, string) see External user ID,
// external_ids for users that do not exist will return a non-fatal error.
// See Server Responses for details.
// See server responses for details.
"user_alias" : {
"alias_name" : (required, string) see User Aliases,
"alias_label" : (required, string) see User Aliases
"alias_name" : (required, string) see User aliases,
"alias_label" : (required, string) see User aliases
}
}
]
}
```

- [External User ID]({{site.baseurl}}/api/objects_filters/user_attributes_object/#braze-user-profile-fields)
- [User Aliases]({{site.baseurl}}/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases)
- [External user ID]({{site.baseurl}}/api/objects_filters/user_attributes_object/#braze-user-profile-fields)
- [User aliases]({{site.baseurl}}/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: "This article explains the Braze Canvas entry properties object."

# Canvas entry properties object

When using one of the endpoints for triggering or scheduling a Canvas via the API, you may provide a map of keys and values to customize messages sent by the first steps of your Canvas, in the `canvas_entry_properties` namespace.
> When using one of the endpoints for triggering or scheduling a Canvas via the API, you may provide a map of keys and values to customize messages sent by the first steps of your Canvas, in the `canvas_entry_properties` namespace.
{% alert note %}
The Canvas entry properties object has a maximum size limit of 50 KB.
Expand Down
12 changes: 6 additions & 6 deletions _docs/_api/objects_filters/connected_audience.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ description: "This article explains the different components of the connected au

# Connected audience object

A connected audience object is a selector that identifies the audience to send the message to.
> A connected audience object is a selector that identifies the audience to send the message to.
It is composed of either a single Connected Audience Filter or several Connected Audience Filters in a logical expression using either `AND` or `OR` operators.
This object is composed of either a single connected audience filter or several connected audience filters in a logical expression using either `AND` or `OR` operators.

Multiple filter example:
**Multiple filter example:**

```json
{
Expand All @@ -34,7 +34,7 @@ Multiple filter example:

## Connected audience filters

Combining multiple custom attribute filters will create a Connected Audience Filter, which will create a Connected Audience Filter when combined with `AND` and `OR` operators.
Combining multiple custom attribute filters will create a connected audience filter, which will create a connected audience filter when combined with `AND` and `OR` operators.

### Custom attribute filter

Expand Down Expand Up @@ -68,8 +68,8 @@ The custom attribute's data type determines the comparisons that are valid for a

| Comparison | Additional considerations |
| --- | --- |
| `value` | The `value` is not required when using the `exists` or `does_not_exist` comparisons. `value` must be an ISO 8601 datetime string when using the `before` and `after` comparisons.
|`matches_regex` | When using the `matches_regex` comparison, the value passed must be a string. To read more about using regular expressions with Braze, check out our documentation on [regular expressions]({{site.baseurl}}/user_guide/engagement_tools/segments/regex/#regex-with-braze) and custom attribute [data types]({{site.baseurl}}/developer_guide/platform_wide/analytics_overview/#custom-attribute-data-types). |
| `value` | The `value` is not required when using the `exists` or `does_not_exist` comparisons. `value` must be an ISO 8601 datetime string when using the `before` and `after` comparisons. |
|`matches_regex` | When using the `matches_regex` comparison, the value passed must be a string. To read more about using regular expressions with Braze, refer to [Regular expressions]({{site.baseurl}}/user_guide/engagement_tools/segments/regex/#regex-with-braze) and [Custom attribute data types]({{site.baseurl}}/developer_guide/platform_wide/analytics_overview/#custom-attribute-data-types). |
{: .reset-td-br-1 .reset-td-br-2}

#### Custom attribute example
Expand Down
10 changes: 4 additions & 6 deletions _docs/_api/objects_filters/messaging/android_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: "This reference article lists and explains the different Android ob
## Android push object

You must include an Android Push Object in `messages` if you want users you have targeted to receive a push on their Android devices. The total number of bytes in your `alert` string and `extra` object should not exceed 4000. The Messaging API will return an error if you exceed the message size allowed by Google.
You must include an Android push object in `messages` if you want users you have targeted to receive a push on their Android devices. The total number of bytes in your `alert` string and `extra` object should not exceed 4,000. The Messaging API will return an error if you exceed the message size allowed by Google.

```json
{
Expand All @@ -40,21 +40,19 @@ You must include an Android Push Object in `messages` if you want users you have
}
```


You can send "Big Picture" notifications by specifying the key `appboy_image_url` in the `extra` object. The value for `appboy_image_url` should be a URL that links to where your image is hosted. Images need to be cropped to a 2:1 aspect ratio and should be at least 600x300. Images used for notifications will only display on devices running Jelly Bean (Android 4.1) or higher.
You can send "Big Picture" notifications by specifying the key `appboy_image_url` in the `extra` object. The value for `appboy_image_url` should be a URL that links to where your image is hosted. Images need to be cropped to a 2:1 aspect ratio and should be at least 600 x 300 px. Images used for notifications will only display on devices running Jelly Bean (Android 4.1) or higher.

#### Additional parameter details

| Parameter | Details |
| --------- | ------- |
| `priority` | This parameter will accept values from `-2` to `2`, where `-2` represents "MIN" priority and `2` represents "MAX". `0` is the "DEFAULT" value. <br> <br> Any values sent that outside of that integer range will default to 0. For more information on which priority level to use, see our section on [Android Notification Priority][29]. |
| `priority` | This parameter will accept values from `-2` to `2`, where `-2` represents "MIN" priority and `2` represents "MAX". `0` is the "DEFAULT" value. <br> <br> Any values sent that outside of that integer range will default to 0. For more information on which priority level to use, see our section on [Android notification priority][29]. |
| `collapse_key` | FCM can simultaneously store only up to four collapse keys per device. If you use more than four collapse keys, FCM does not make any guarantees as to which ones will be kept. Braze uses one of these by default for campaigns, so make sure to specify only up to three additional collapse keys for Android messages. |
| `push_icon_image_url` | The value for the large icon parameter should be a URL that links to where your image is hosted. <br> <br> Images need to be cropped to a 1:1 aspect ratio and should be at least 40x40. |
| `notification_channel` | If this is not specified, Braze will attempt to send the notification payload with the [dashboard fallback][45] channel ID. For more, see [Notification channels][44] and refer to the steps for [defining notification channels][43] during integration. |
| `send_to_sync` | For more information on `send_to_sync` messages, see [Silent Android Notifications][28]. |
| `send_to_sync` | For more information on `send_to_sync` messages, see [silent Android notifications][28]. |
{: .reset-td-br-1 .reset-td-br-2}


## Android push action button object

```json
Expand Down
4 changes: 2 additions & 2 deletions _docs/_api/objects_filters/messaging/apple_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ description: "This reference article lists and explains the different Apple obje
}
```

You must include an Apple Push Object in `messages` if you want users you have targeted to receive a push on their iOS Devices. The total number of bytes in your `alert` string, `extra` object and other optional parameters should not exceed 1912. The Messaging API will return an error if you exceed the message size allowed by Apple. Messages that include the keys `ab` or `aps` in the `extra` object will be rejected.
You must include an Apple push object in `messages` if you want users you have targeted to receive a push on their iOS devices. The total number of bytes in your `alert` string, `extra` object and other optional parameters should not exceed 1912. The Messaging API will return an error if you exceed the message size allowed by Apple. Messages that include the keys `ab` or `aps` in the `extra` object will be rejected.

### Apple push alert object

Expand All @@ -59,7 +59,7 @@ In most cases, `alert` can be specified as a string in an `apple_push` object.

## Apple push action button object

You must include the `category` field in the Apple Push Object to use iOS push action buttons. Including the `category` field will display any associated push action buttons; only include the `buttons` field if you want to additionally define the buttons' individual click actions. The Braze SDK provides a set of default push action buttons for you to use shown in the following table. You can also use your own buttons if they have been registered in your app.
You must include the `category` field in the Apple push object to use iOS push action buttons. Including the `category` field will display any associated push action buttons; only include the `buttons` field if you want to additionally define the buttons' individual click actions. The Braze SDK provides a set of default push action buttons for you to use shown in the following table. You can also use your own buttons if they have been registered in your app.

### Apple push action button object for Braze default buttons

Expand Down
2 changes: 1 addition & 1 deletion _docs/_api/objects_filters/messaging/web_objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: "This reference article lists and explains the different web object
---
# Web push object

> The `web_push` object allows you to define or request information related to Web Push and Web Push Alert content via our [messaging endpoints]({{site.baseurl}}/api/endpoints/messaging).
> The `web_push` object allows you to define or request information related to web push and web push alert content via our [messaging endpoints]({{site.baseurl}}/api/endpoints/messaging).
## Web push object

Expand Down
2 changes: 1 addition & 1 deletion _docs/_api/objects_filters/messaging/webhook_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ description: "This reference article outlines the Braze webhook object."
}
```

As a best practice, Braze recommends that you supply an explicit value for `Content-Type` in the `request_headers` field for consistent and predictable behavior, as senders and servers may change over time. If a value is not specified for the `Content-Type` header, one will be inferred from the request body.
As a best practice, Braze recommends providing an explicit value for `Content-Type` in the `request_headers` field for consistent and predictable behavior, as senders and servers may change over time. If a value is not specified for the `Content-Type` header, one will be inferred from the request body.
17 changes: 9 additions & 8 deletions _docs/_api/objects_filters/purchase_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ A purchase object is an object that gets passed through the API when a purchase
}
```

- [External User ID]({{site.baseurl}}/api/basics/#user-ids)
- [External user ID]({{site.baseurl}}/api/basics/#user-ids)
- [App identifier]({{site.baseurl}}/api/identifier_types/)
- [ISO 4217 Currency Code Wiki][20]
- [ISO 8601 Time Code Wiki][22]

## Purchase product_id

Within the purchase object, The `product_id` is an identifier for the purchase (e.g, `Product Name` or `Product Category`):
Within the purchase object, the `product_id` is an identifier for the purchase (such as `Product Name` or `Product Category`):

- Braze allows you to store a maximum of 5,000 `product_id`s in the dashboard.
- `product_id` maximum is 255 characters
- Braze allows you to store up to 5,000 `product_id`s in the dashboard.
- The `product_id` can be up to 255 characters.

### Product ID naming conventions

Expand All @@ -60,9 +60,10 @@ This helps make products easy to identify for segmentation and triggering.

### Log purchases at the order level

If you want to log purchases at the order level instead of the product level, you can use order name or order category as the `product_id` (for example, Online Order or Completed Order).
If you want to log purchases at the order level instead of the product level, you can use order name or order category as the `product_id` (such as `Online Order` or `Completed Order`).

For example, to log purchases at the order level in the Web SDK:

For example, to log purchases at the order level in the Web SDK:
```html
POST https://YOUR_REST_API_URL/users/track
Content-Type: application/json
Expand Down Expand Up @@ -110,9 +111,9 @@ Event property objects that contain array or object values can have an event pro

### Purchase property naming conventions

It is important to note that this feature is enabled **per product**, not per purchase. For example, if a customer has a high volume of distinct products, but each has the same properties, segmenting becomes rather meaningless,
It is important to note that this feature is enabled **per product**, not per purchase. For example, if a customer has a high volume of distinct products, but each has the same properties, segmenting becomes rather meaningless.

In this instance, this is why when setting the data structures, we recommend using product names at a "group-level" instead of something granular. For example, a train ticket company should have products for "single trip", "return trip", "multi-city", and not specific transactions such as "transaction 123", "transaction 046", etc. Or for example, with the purchase event 'food', properties would be best set as "cake" and "sandwich".
In this instance, this is why when setting the data structures, we recommend using product names at a "group-level" instead of something granular. For example, a train ticket company should have products for "single trip", "return trip", "multi-city", and not specific transactions such as "transaction 123" or "transaction 046". Or for example, with the purchase event "food", properties would be best set as "cake" and "sandwich".

### Example purchase object
```html
Expand Down
14 changes: 7 additions & 7 deletions _docs/_api/objects_filters/recipient_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ description: "This reference article explains the different components of the Br
Either `external_user_id` or `user_alias` is required in this object. **Requests must specify only one.**

The recipients object allows you to combine the [User Alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/), the [Trigger Properties object]({{site.baseurl}}/api/objects_filters/trigger_properties_object/), and the [Canvas Entry Properties object]({{site.baseurl}}/api/objects_filters/canvas_entry_properties_object/).
The recipients object allows you to combine the [user alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/), the [trigger properties object]({{site.baseurl}}/api/objects_filters/trigger_properties_object/), and the [Canvas entry properties object]({{site.baseurl}}/api/objects_filters/canvas_entry_properties_object/).

## Object body

```json
[{
"user_alias": (optional, User Alias Object) User Alias of user to receive message,
"external_user_id": (optional, string) see External User Id,
"user_alias": (optional, User Alias Object) User alias of user to receive message,
"external_user_id": (optional, string) see External user ID,
"trigger_properties": (optional, object) personalization key-value pairs for this user when sending a campaign or message; see Trigger Properties,
"canvas_entry_properties": (optional, object) personalization key-value pairs for this user when triggering a Canvas; see Canvas Entry Properties
}]
```

- [User Aliases]({{site.baseurl}}/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases)
- [External User ID]({{site.baseurl}}/api/objects_filters/user_attributes_object/#braze-user-profile-fields)
- [User aliases]({{site.baseurl}}/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases)
- [External user ID]({{site.baseurl}}/api/objects_filters/user_attributes_object/#braze-user-profile-fields)

## Recipient object deduping

When making an API call with the Recipient Object, **if there exists a duplicated recipient targeting the same address (that is, email, push), the user will be deduped**, meaning identical users will be removed, leaving one.
When making an API call with the recipient object, **if there exists a duplicated recipient targeting the same address (that is, email, push), the user will be deduped**, meaning identical users will be removed, leaving one.

For example, if the same `external_user_id` is used, then only 1 message will be received. Consider making multiple API calls if you need a work-around for this behavior.
For example, if the same `external_user_id` is used, then only one message will be received. Consider making multiple API calls if you need a workaround for this behavior.

```json
{"campaign_id":"#####","recipients":[
Expand Down
4 changes: 2 additions & 2 deletions _docs/_api/objects_filters/schedule_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Authorization: Bearer YOUR-REST-API-KEY
}
```

Customers using the API for server-to-server calls may need to allowlist the appropriate API URL if they're behind a firewall.
If you use the API for server-to-server calls, you may need to allowlist the appropriate API URL if they're behind a firewall.

Message scheduling endpoint responses will include the message's `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the id of the message dispatch (unique id for each 'transmission' sent from the Braze platform).
Message scheduling endpoint responses will include the message's `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch (unique ID for each 'transmission' sent from Braze).

[33]: {{site.baseurl}}/user_guide/sage_ai/intelligence/intelligent_timing/
4 changes: 1 addition & 3 deletions _docs/_api/objects_filters/user_alias_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ description: "This reference article explains the different components of the us

# User alias object

> An alias serves as an alternative unique user identifier. Use aliases to identify users along different dimensions than your core user ID
- Set a consistent identifier for analytics that will follow a given user both before and after they have logged in to a mobile app or website.
- Add the identifiers used by a third-party vendor to your Braze users to more easily reconcile your data externally.
> An alias serves as an alternative unique user identifier. By using a user alias object, you can set a consistent identifier for analytics that will follow a given user both before and after they have logged in to a mobile app or website. You can also use this object to add the identifiers used by a third-party vendor to your Braze users to more easily reconcile your data externally.
The user alias object consists of two parts: an `alias_name` for the identifier itself, and an `alias_label` indicating the type of alias. Users can have multiple aliases with different labels, but only one `alias_name` per `alias_label`.

Expand Down
Loading

0 comments on commit f6457c2

Please sign in to comment.