Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy - July 16, 2024 #7695

Merged
merged 49 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1dca903
fix ja table of content nav
zzhaobraze Jul 11, 2024
34073ea
Update template_catalog_item_liquid.md
lydia-xie Jul 11, 2024
4087490
fix layout redirect url
zzhaobraze Jul 12, 2024
849b946
Merge pull request #7674 from braze-inc/i18n_fix_redirect_layout
josh-mccrowell-braze Jul 12, 2024
3088a51
rename appboy to braze in sdk_authentication.md `Register a callback …
btoo Jul 12, 2024
c3813ff
update price drop docs to look like back in stock
mkigikm Jul 12, 2024
b12297b
Update cross_referencing.md
internetisaiah Jul 12, 2024
cf7d565
Update images.md
internetisaiah Jul 12, 2024
eb6936a
Update cross_referencing.md
internetisaiah Jul 12, 2024
2c537a9
Update _docs/_contributing/content_management/cross_referencing.md
rachel-feinberg Jul 12, 2024
0bd70a2
Merge pull request #7678 from braze-inc/internetisaiah-patch-3
rachel-feinberg Jul 12, 2024
b13b9ee
Update _docs/_user_guide/personalization_and_dynamic_content/catalogs…
mkigikm Jul 15, 2024
67adeee
Merge pull request #7670 from braze-inc/i18n_ja-toc-nav-fix
josh-mccrowell-braze Jul 15, 2024
e0b6499
Apply suggestions from code review
lydia-xie Jul 15, 2024
9c2d6f7
Apply suggestions from code review
lydia-xie Jul 15, 2024
98d091b
Merge pull request #7676 from braze-inc/price-drop-back-in-stock-parity
lydia-xie Jul 15, 2024
83f918d
BD-3255: Remove note about Canvas Flow names coming soon
lydia-xie Jul 15, 2024
52aeaf5
Merge pull request #7679 from braze-inc/BD-3255
rachel-feinberg Jul 15, 2024
2d45944
Update overview.md
tonypitkinbraze Jul 15, 2024
acf99c4
BD-3260 Snowflake Data Retention
rachel-feinberg Jul 15, 2024
29cb7b8
Merge pull request #7680 from braze-inc/tonypitkinbraze-patch-3
josh-mccrowell-braze Jul 15, 2024
e382d6d
Merge pull request #7675 from btoo/patch-1
josh-mccrowell-braze Jul 15, 2024
f8fa315
Edits
rachel-feinberg Jul 15, 2024
ce3aad4
Fix tab
rachel-feinberg Jul 15, 2024
99e9224
BD-3252 Add FAQ to Link aliasing
rachel-feinberg Jul 15, 2024
c850e2a
BD-3250 Add treatment sample group to User Archival
rachel-feinberg Jul 15, 2024
4cf4fb4
Merge pull request #7671 from braze-inc/lydia-xie-patch-3
rachel-feinberg Jul 16, 2024
66bd075
Reverting SDK-5061 doc updates
internetisaiah Jul 16, 2024
e050841
Merge pull request #7686 from braze-inc/revert-SDK-5061
lydia-xie Jul 16, 2024
a660a98
Update _docs/_user_guide/message_building_by_channel/email/templates/…
rachel-feinberg Jul 16, 2024
841d223
Merge pull request #7684 from braze-inc/bd-3250
internetisaiah Jul 16, 2024
b0de7e4
Merge pull request #7683 from braze-inc/bd-3252
rachel-feinberg Jul 16, 2024
ea4bb19
Apply suggestions from code review
rachel-feinberg Jul 16, 2024
f5388e7
fix missing content after a period.
zzhaobraze Jul 16, 2024
eb6851f
Merge pull request #7688 from braze-inc/fix-missing-content-202407
internetisaiah Jul 16, 2024
44705d3
BD-3263 Add the icon for generating a nested event property schema.
davehensley Jul 16, 2024
5afccbf
Merge branch 'develop' into bd-3260
rachel-feinberg Jul 16, 2024
70f8dff
Apply suggestions from code review
lydia-xie Jul 16, 2024
2abd583
Fix warning
rachel-feinberg Jul 16, 2024
dbe1376
BD-3261: Add redirect for email
lydia-xie Jul 16, 2024
a6165b2
Merge pull request #7689 from braze-inc/BD-3263_add_the_icon_for_gene…
lydia-xie Jul 16, 2024
9dbbb62
Merge pull request #7681 from braze-inc/bd-3260
rachel-feinberg Jul 16, 2024
f0fa018
fix old redirects
lydia-xie Jul 16, 2024
9108335
Merge pull request #7691 from braze-inc/BD-3261
rachel-feinberg Jul 16, 2024
51ea3b1
Minor edits
lydia-xie Jul 16, 2024
4339f6a
Apply suggestions from code review
lydia-xie Jul 16, 2024
dbff7ab
Apply suggestions from code review
lydia-xie Jul 16, 2024
c497e2b
Change click to select
rachel-feinberg Jul 16, 2024
859a4d5
Merge pull request #7694 from braze-inc/lydia-xie-patch-3
lydia-xie Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 7 additions & 57 deletions _docs/_contributing/content_management/cross_referencing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ noindex: true

## Create a cross-reference

When creating a cross-reference, you can either use the in-line method or reference-style method. The in-line method prioritizes clarity, while the reference-style method prioritizes readability.
{% alert important %}
Because Liquid's {% raw %}`{% tab %}`{% endraw %} tag does not support reference-style links, only in-line links are documented below. Existing reference links will continue to work, but are no longer recommended.
{% endalert %}

{% tabs %}
{% tab in-line %}
{% tab Markdown %}
Open the relevant Markdown file, then create your in-line link.

{% subtabs %}
{% subtab Markdown %}

{% raw %}
```markdown
[LINK_TEXT]({{site.baseurl}}/SHORT_URL)
Expand All @@ -44,9 +43,10 @@ Your in-line link should be similar to the following:
Before continuing, [create your SSH token]({{site.baseurl}}/docs/developer_guide/platform_wide/sdk_authentication).
```
{% endraw %}
{% endsubtab %}
{% endtab %}

{% subtab HTML %}
{% tab HTML %}
Open the relevant Markdown file, then create your in-line link.

{% raw %}
```markdown
Expand All @@ -69,55 +69,5 @@ Your in-line link should be similar to the following:
To learn about the different custom attribute data types you can use to segment users, view <a href="/docs/user_guide/data_and_analytics/custom_data/custom_attributes/#custom-attribute-data-types">Custom attribute data types</a>.
```
{% endraw %}
{% endsubtab %}
{% endsubtabs %}

{% endtab %}

{% tab reference-style %}
Open the relevant Markdown file, then create your reference-style link.

```markdown
[LINK_TEXT][REFERENCE_NUMBER]
```

Replace the following:

| Placeholder | Description |
|--------------------|--------------------------------------------------------------------------|
| `LINK_TEXT` | The page title or related action. |
| `REFERENCE_NUMBER` | Assign any positive integer that's not already assigned to another reference-style link on this page. |
{: .reset-td-br-1 .reset-td-br-2}

Your references should be similar to the following:

```markdown
Before continuing, [create your SSH token][2]. When you're finished, see [Step 2: Uploading your token][5].
```

At the bottom of the page, you'll add the related links.

{% raw %}
```markdown
[REFERENCE_NUMBER]: {{site.baseurl}}SHORT_URL
```
{% endraw %}

Replace the following:

| Placeholder | Description |
|--------------------|---------------------------------------------------------|
| `REFERENCE_NUMBER` | The number of the reference you'd like to link to. |
| `SHORT_URL` | The page URL with `https://www.braze.com/docs` removed. |
{: .reset-td-br-1 .reset-td-br-2}

Your links should be similar to the following:

{% raw %}
```markdown
[2]: {{site.baseurl}}/developer_guide/platform_wide/sdk_authentication/
[5]: {{site.baseurl}}/developer_guide/platform_wide/swift#step-2-uploading-your-token
```
{% endraw %}
{% endtab %}
{% endtabs %}
70 changes: 3 additions & 67 deletions _docs/_contributing/content_management/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ braze-docs

### Step 2: Link to the image

When linking to your new image, you can either use in-line or reference-style syntax. In-line syntax prioritizes clarity, while reference-style syntax prioritizes readability.
{% alert important %}
Since Liquid's {% raw %}`{% tab %}`{% endraw %} tag does not support reference-style links, only in-line links are documented below. Existing reference links will continue to work, but are no longer recommended.
{% endalert %}

{% tabs %}
{% tab in-line %}
In your Markdown file, link to your new image using the in-line syntax.

{% raw %}
Expand All @@ -73,58 +73,6 @@ Your in-line image should be similar to the following:
![The form for creating a new pull request on GitHub.]({% image_buster /assets/img/contributing/getting_started/github_pull_request.png %})
```
{% endraw %}
{% endtab %}

{% tab reference-style %}
In your Markdown file, link to your new image using the reference-style syntax.

{% raw %}
```markdown
![ALT_TEXT.][REFERENCE_NUMBER]
```
{% endraw %}

Replace the following:

| Placeholder | Description |
|--------------------|-------------------------------------------------------------------------------------------------------------------------|
| `ALT_TEXT` | The alt text for the image. This is required to make Braze Docs equally accessible for those using screen readers. |
| `REFERENCE_NUMBER` | Assign any positive integer that's not already assigned to another reference-style link on this page. |
{: .reset-td-br-1 .reset-td-br-2}

Your in-line image should be similar to the following:

{% raw %}
```markdown
![The form for creating a new pull request on GitHub.][10]
```
{% endraw %}

At the bottom of the page, add your reference.

{% raw %}
```markdown
[REFERENCE_NUMBER]: {% image_buster /assets/img/DIRECTORY/IMAGE.png %}
```
{% endraw %}

Replace the following:

| Placeholder | Description |
|--------------------|---------------------------------------------------------|
| `REFERENCE_NUMBER` | The number of the reference you'd like to link to. |
| `IMAGE` | The relative path to your image starting from the `img` directory. |
{: .reset-td-br-1 .reset-td-br-2}

Your links should be similar to the following:

{% raw %}
```markdown
[10]: {% image_buster /assets/img/contributing/getting_started/github_pull_request.png %}
```
{% endraw %}
{% endtab %}
{% endtabs %}

### Step 3: Set the image's maximum width (optional)

Expand All @@ -138,23 +86,11 @@ You can set the image's maximum width by appending the following Liquid code to

Replace `NUMBER` with the maximum width you'd like to set as a percentage. Your image link should be similar to the following:

{% tabs %}
{% tab in-line %}
{% raw %}
```markdown
![The form for creating a new pull request on GitHub.]({% image_buster /assets/img/contributing/getting_started/github_pull_request.png %}){: style="max-width:65%;"}
```
{% endraw %}
{% endtab %}

{% tab reference-style %}
{% raw %}
```markdown
![The form for creating a new pull request on GitHub.][10]{: style="max-width:65%;"}
```
{% endraw %}
{% endtab %}
{% endtabs %}

## Updating an image

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The Swift SDK provides a configuration-only approach to automate the processing
To enable the automatic push integration, set the `automation` property of the `push` configuration to `true`:

{% tabs %}
{% tab Swift %}
{% tab swift %}
```swift
let configuration = Braze.Configuration(apiKey: "{YOUR-BRAZE-API-KEY}", endpoint: "{YOUR-BRAZE-API-ENDPOINT}")
configuration.push.automation = true
Expand Down Expand Up @@ -85,7 +85,7 @@ The SDK must be initialized on the main thread to enable push notification autom
For more granular control, each automation step can be enabled or disabled individually:
{% tabs %}
{% tab Swift %}
{% tab swift %}
```swift
// Enable all automations and disable the automatic notification authorization request at launch.
Expand Down Expand Up @@ -130,7 +130,7 @@ The following code sample includes integration for provisional push authenticati
{% endalert %}
{% tabs %}
{% tab Swift %}
{% tab swift %}
```swift
application.registerForRemoteNotifications()
Expand Down Expand Up @@ -178,7 +178,7 @@ You must assign your delegate object using `center.delegate = self` synchronousl
Once APNs registration is complete, pass the resulting `deviceToken` to Braze to enable for push notifications for the user.
{% tabs %}
{% tab Swift %}
{% tab swift %}
Add the following code to your app's `application(_:didRegisterForRemoteNotificationsWithDeviceToken:)` method:
Expand Down Expand Up @@ -206,11 +206,10 @@ The `application:didRegisterForRemoteNotificationsWithDeviceToken:` delegate met
Next, pass the received push notifications along to Braze. This step is necessary for logging push analytics and link handling. Ensure that you call all push integration code in your application's main thread.
#### Default push handling
{% tabs %}
{% tab Swift %}
To enable Braze's default push handling, add the following code to your app's `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` method:
{% tab swift %}
Add the following code to your app's `application(_:didReceiveRemoteNotification:fetchCompletionHandler:)` method:
```swift
if let braze = AppDelegate.braze, braze.notifications.handleBackgroundNotification(
Expand All @@ -222,7 +221,7 @@ if let braze = AppDelegate.braze, braze.notifications.handleBackgroundNotificati
completionHandler(.noData)
```

Next, add the following to your app's `userNotificationCenter(_:didReceive:withCompletionHandler:)` method:
Next, add the following code to your app's `userNotificationCenter(_:didReceive:withCompletionHandler:)` method:

```swift
if let braze = AppDelegate.braze, braze.notifications.handleUserNotification(
Expand All @@ -233,10 +232,29 @@ if let braze = AppDelegate.braze, braze.notifications.handleUserNotification(
}
completionHandler()
```
{% endtab %}

**Foreground push handling**

To display a push notification while the app is in the foreground, implement `userNotificationCenter(_:willPresent:withCompletionHandler:)`:

```swift
func userNotificationCenter(_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
if #available(iOS 14.0, *) {
completionHandler([.list, .banner])
} else {
completionHandler([.alert])
}
}
```

If the foreground notification is clicked, the push delegate `userNotificationCenter(_:didReceive:withCompletionHandler:)` will be called, and Braze will log a push click event.

{% endtab %}
{% tab OBJECTIVE-C %}
To enable Braze's default push handling, add the following code to your application's `application:didReceiveRemoteNotification:fetchCompletionHandler:` method:

Add the following code to your application's `application:didReceiveRemoteNotification:fetchCompletionHandler:` method:

```objc
BOOL processedByBraze = AppDelegate.braze != nil && [AppDelegate.braze.notifications handleBackgroundNotificationWithUserInfo:userInfo
Expand All @@ -259,54 +277,25 @@ if (processedByBraze) {
completionHandler();
```
{% endtab %}
{% endtabs %}

#### Foreground push handling

{% tabs %}
{% tab Swift %}
To enable foreground push notifications and let Braze recognize them when they're received, implement `UNUserNotificationCenter.userNotificationCenter(_:willPresent:withCompletionHandler:)`. If a user taps your foreground notification, the `userNotificationCenter(_:didReceive:withCompletionHandler:)` push delegate will be called and Braze will log the push click event.

```swift
func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions
) -> Void) {
// Forward notification payload to Braze for processing.
AppDelegate.braze?.notifications.handleForegroundNotification(notification: notification)

// Configure application's foreground notification display options.
if #available(iOS 14.0, *) {
completionHandler([.list, .banner])
} else {
completionHandler([.alert])
}
}
```
{% endtab %}
**Foreground push handling**

{% tab OBJECTIVE-C %}
To enable foreground push notifications and let Braze recognize them when they're received, implement `userNotificationCenter:willPresentNotification:withCompletionHandler:`. If a user taps your foreground notification, the `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` push delegate will be called and Braze will log the push click event.
To display a push notification while the app is in the foreground, implement `userNotificationCenter:willPresentNotification:withCompletionHandler:`:

```objc
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler {
if (AppDelegate.braze != nil) {
// Forward notification payload to Braze for processing.
[AppDelegate.braze.notifications handleForegroundNotificationWithNotification:notification];
}

// Configure application's foreground notification display options.
if (@available(iOS 14.0, *)) {
completionHandler(UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner);
} else {
completionHandler(UNNotificationPresentationOptionAlert);
}
}
```

If the foreground notification is clicked, the push delegate `userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:` will be called, and Braze will log a push click event.

{% endtab %}
{% endtabs %}

Expand All @@ -316,41 +305,32 @@ Deep linking from a push into the app is automatically handled via our standard

## Subscribing to push notifications updates

To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(_:)/) method.

{% tabs %}
{% tab Swift %}
To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(_:)/) method. You can use the `payloadTypes` parameter to specify whether you'd like to subscribe to notifications involving push open events, foreground push received events, or both.
{% tab swift %}

```swift
// This subscription is maintained through a Braze cancellable, which will observe for changes until the subscription is cancelled.
// You must keep a strong reference to the cancellable to keep the subscription active.
// The subscription is canceled either when the cancellable is deinitialized or when you call its `.cancel()` method.
let cancellable = AppDelegate.braze?.notifications.subscribeToUpdates(payloadTypes: [.open, .received]) { payload in
let cancellable = AppDelegate.braze?.notifications.subscribeToUpdates { payload in
print("Braze processed notification with title '\(payload.title)' and body '\(payload.body)'")
}
```
{% endtab %}

{% endtab %}
{% tab OBJECTIVE-C %}
To access the push notification payloads processed by Braze, use the [`Braze.Notifications.subscribeToUpdates(_:)`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/notifications-swift.class/subscribetoupdates(_:)/) method. You can use the `payloadTypes` parameter to specify whether you'd like to subscribe to notifications involving push open events, foreground push received events, or both.

```objc
BRZCancellable *cancellable = [notifications subscribeToUpdates:^(BRZNotificationsPayload * _Nonnull payload) {
BRZCancellable *cancellable = [notifications subscribeToUpdatesWithInternalNotifications:NO update:^(BRZNotificationsPayload * _Nonnull payload) {
NSLog(@"Braze processed notification with title '%@' and body '%@'", payload.title, payload.body);
}];
```
Or, to specify the types of push events you'd like to subscribe to:
```objc
NSInteger filtersValue = BRZNotificationsPayloadTypeFilter.opened.rawValue | BRZNotificationsPayloadTypeFilter.received.rawValue;
BRZNotificationsPayloadTypeFilter *filters = [[BRZNotificationsPayloadTypeFilter alloc] initWithRawValue: filtersValue];
BRZCancellable *cancellable = [notifications subscribeToUpdatesWithPayloadTypes:filters:^(BRZNotificationsPayload * _Nonnull payload) {
NSLog(@"Braze processed notification with title '%@' and body '%@'", payload.title, payload.body);
}];
```
{% endtab %}

{% endtabs %}
{% alert note %}
When using the automatic push integration, `subscribeToUpdates(_:)` is the only way to be notified of remote notifications processed by Braze. The `UIAppDelegate` and `UNUserNotificationCenterDelegate` system methods are not called when the notification is automatically processed by Braze.
{% endalert %}
Expand Down
2 changes: 1 addition & 1 deletion _docs/_developer_guide/platform_wide/sdk_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ braze.subscribeToSdkAuthenticationFailures((error) => {
// TODO: Optionally log to your error-reporting service
// TODO: Check if the `user_id` within the `error` matches the currently logged-in user
const updated_jwt = await getNewTokenSomehow(error);
appboy.setSdkAuthenticationSignature(updated_jwt);
braze.setSdkAuthenticationSignature(updated_jwt);
});
```
{% endtab %}
Expand Down
Loading