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

Updates to docs from CSM solutions repository #4201

Merged
merged 26 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7e80c39
CSM Repository doc edits
KellieHawks Oct 7, 2022
72c405d
updates
KellieHawks Oct 7, 2022
267068c
updates
KellieHawks Oct 10, 2022
7cadebb
Updates
KellieHawks Oct 12, 2022
435d5a0
Updates
KellieHawks Oct 12, 2022
6aef225
Update braze_to_braze_webhooks.md
KellieHawks Oct 12, 2022
5bb483a
updates
KellieHawks Oct 13, 2022
56bc48a
Merge branch 'kh/csm' of github.com:braze-inc/braze-docs into kh/csm
KellieHawks Oct 13, 2022
5222e78
liquid
KellieHawks Oct 14, 2022
3cc68d8
liquid
KellieHawks Oct 14, 2022
313a7a6
API campaign clarifications
KellieHawks Oct 14, 2022
c9c87ea
sms
KellieHawks Oct 17, 2022
55a2247
note
KellieHawks Oct 18, 2022
132574c
Update _docs/_user_guide/data_and_analytics/braze_currents.md
KellieHawks Oct 21, 2022
0c43503
Update _docs/_user_guide/data_and_analytics/custom_data/custom_attrib…
KellieHawks Oct 21, 2022
cf8c2ea
Update _docs/_user_guide/personalization_and_dynamic_content/liquid/l…
KellieHawks Oct 21, 2022
d8e6c7e
Update _docs/_user_guide/personalization_and_dynamic_content/liquid/l…
KellieHawks Oct 21, 2022
eda2f9f
Update _docs/_user_guide/personalization_and_dynamic_content/liquid/l…
KellieHawks Oct 21, 2022
c29e8d9
Update _docs/_api/api_campaigns.md
KellieHawks Oct 21, 2022
2d73c9c
Update _docs/_user_guide/data_and_analytics/braze_currents.md
KellieHawks Oct 21, 2022
0953b25
Update _docs/_user_guide/data_and_analytics/custom_data/custom_events.md
KellieHawks Oct 21, 2022
7150ea5
Update _docs/_user_guide/personalization_and_dynamic_content/liquid/l…
KellieHawks Oct 21, 2022
da55fd9
Update _docs/_user_guide/data_and_analytics/custom_data/custom_events.md
KellieHawks Oct 21, 2022
3c71edb
Update _docs/_user_guide/data_and_analytics/custom_data/custom_events.md
KellieHawks Oct 21, 2022
2119773
Update _docs/_user_guide/data_and_analytics/custom_data/custom_events.md
KellieHawks Oct 21, 2022
487921b
Update _docs/_user_guide/data_and_analytics/user_data_collection/best…
KellieHawks Oct 21, 2022
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
9 changes: 7 additions & 2 deletions _docs/_api/api_campaigns.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Campaigns sent through the <a href="{{site.baseurl}}/api/endpoints/messaging/">

## Create a new campaign

Navigate to the **Campaigns** page in your company Braze account and click **Create Campaign**, then select **API Campaigns**. Now, you can move on to configuring your API campaign.
Navigate to the **Campaigns** page in your Braze account and click **Create Campaign**, then select **API Campaigns**. Now, you can move on to configuring your API campaign.

{% alert note %}
An [API-triggered campaign]({{site.baseurl}}/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/api_triggered_delivery/) is different from an API campaign.
Expand All @@ -28,10 +28,15 @@ An [API-triggered campaign]({{site.baseurl}}/user_guide/engagement_tools/campaig
To configure your campaign, perform the following steps:

1. Add a descriptive title so you can find the results on our campaigns page after you've sent your messages.
2. Click **Add Message** and add the messages types which will be included in your API campaign. This will create a `Message Variation ID`, which will serve as your `campaign_id`. <br><br> After you save your API campaign, you must include the generated `campaign_id` fields with your API request where noted in the [Send Messages Endpoints][2].<br><br>
2. Click **Add Message** and add the messages types which will be included in your API campaign. This will allow you to generate a `campaign_id` and a message variation ID, which differs for each channel you include.
3. Optionally, You can add a conversion event to track user conversions on a specific action or campaign goal.
4. Click **Save Campaign** and you're set to begin your API campaign!

## API calls

After you save your API campaign include the following in your API request:
- Include the generated `campaign_id` fields with your API request where noted in the [Send Messages Endpoints][2].
- Include a [message object]({{site.baseurl}}/api/objects_filters/#messaging-objects) for each platform included in the campaign. In the message object, provide the message variation ID. This will specify that statistics shoud be collected and displayed under that variant. The following message objects are supported: Android, Content Cards, email, iOS, Kindle, SMS/MMS, web push, and webhook.
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved

[2]: {{site.baseurl}}/api/endpoints/messaging/#send-endpoints

4 changes: 2 additions & 2 deletions _docs/_user_guide/data_and_analytics/braze_currents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: "This landing page will tell you more about and guide you to articl
tool: currents

guide_top_header: "Braze Currents"
guide_top_text: "Understanding the impact of your engagement strategy is critical in informing your iteration and optimization of your communications with your users. To ensure that this valuable engagement data is tightly integrated with the rest of your operations and help amplify your investment in data science, the Braze platform tracks a wide array of event data from your integration for analysis, retargeting, and other use-cases elsewhere within your own systems. <br> <br>The Currents tool continuously streams data to one of our many <a href='https://www.braze.com/docs/user_guide/data_and_analytics/braze_currents/available_partners/'>data partners</a>, empowering you to use the unique and valuable data Braze creates to power your BI and analytics efforts in other best-in-class platforms."
guide_top_text: "Understanding the impact of your engagement strategy is critical in informing your iteration and optimization of your communications with your users. To ensure that this valuable engagement data is tightly integrated with the rest of your operations and help amplify your investment in data science, the Braze platform tracks a wide array of event data from your integration for analysis, retargeting, and other use-cases elsewhere within your own systems. <br> <br>The Currents tool is a real time data stream of your engagement events that is the most robust, yet most granular export out of the Braze platform. It provides you data in an Avro file type to one of our many <a href='https://www.braze.com/docs/user_guide/data_and_analytics/braze_currents/available_partners/'>data partners</a>, empowering you to use the unique and valuable data Braze creates to power your BI and analytics efforts in other best-in-class platforms."
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved

guide_featured_title: "Section Articles"
guide_featured_list:
Expand Down Expand Up @@ -52,6 +52,6 @@ There’s so much more you can do with event data, accessed by Currents. Trust u

## Access Currents

A Currents connector is already included in many of our pro- and enterprise-level packages. If you’re interested using Currents, reach out to your account manager. Your account manager and our data specialists can assist in your Currents [setup and integration]({{site.baseurl}}/user_guide/data_and_analytics/braze_currents/setting_up_currents/).
A Currents connector is already included in many of our pro and enterprise-level packages. If you’re interested using Currents, reach out to your account manager. Your account manager and our data specialists can assist in your Currents [setup and integration]({{site.baseurl}}/user_guide/data_and_analytics/braze_currents/setting_up_currents/).
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved

<br><br>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ When stored in Braze, these characteristics can be used to build out audience se

To create and manage custom attributes in the dashboard, go to **Manage Settings** > **Custom Attributes**. From this page, you can view, manage, or blocklist existing custom attributes, or create a new one. If you block a custom attribute, no data will be collected regarding that attribute, existing data will be unavailable unless reactivated, and blocklisted attributes will not show up in filters.

If you would like to remove custom attributes from user profiles, set the value to "null" in your API request to the [/users/track]({{site.baseurl}}/api/endpoints/user_data/post_user_track#user-track) endpoint.
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved

## Setting custom attributes

The following lists methods across various platforms that are used to set custom attributes.
Expand Down
12 changes: 12 additions & 0 deletions _docs/_user_guide/data_and_analytics/custom_data/custom_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ description: "This reference article describes custom events and properties, the

Custom events are actions taken by, or updates about, your users. They're best suited for tracking high-value user interactions within your application. Logging a custom event can trigger any number and type of follow-up campaigns, and enables the listed segmentation filters on the recency and frequency of that event.

## Use cases

Some common custom event use cases include:
- Trigger a campaign or Canvas using [action-based delivery]({{site.baseurl}}/user_guide/engagement_tools/campaigns/building_campaigns/delivery_types/triggered_delivery/) based on a custom event.
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
- Segment users by how many times they performed a custom event, when the last time the event occurred, etc.
- Use dashboard [custom event analytics]({{site.baseurl}}/user_guide/data_and_analytics/custom_data/custom_events#custom-event-analytics) to view an aggregate of how often each event occurred
- Find additional analytics using [funnel]({{site.baseurl}}/user_guide/data_and_analytics/your_reports/funnel_reports/#step-2-select-events-for-funnel-steps) and [retention]({{site.baseurl}}/user_guide/data_and_analytics/your_reports/retention_reports/) reports
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
- Leverage [persistent entry properties]({{site.baseurl}}/user_guide/engagement_tools/canvas/create_a_canvas/canvas_persistent_entry_properties/) to use metadata from your customer event for personalization in your Canvas steps.
- Generate more sophisticated analytics with [Currents]({{site.baseurl}}/user_guide/data_and_analytics/braze_currents)
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
- Set up Canvas [exception events]({{site.baseurl}}/user_guide/engagement_tools/canvas/create_a_canvas/exception_events#canvas-exception-events) to define when users should not advance to the next step of your Canvas
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
- And more!

## Managing custom events

To create and manage custom events in the dashboard, go to **Manage Settings** > **Custom Events**. From this page, you can view, manage, or blocklist existing custom events, or create a new one. If you block a custom event, no data will be collected regarding that event, existing data will be unavailable unless reactivated, and blocklisted events will not show up in filters or graphs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,39 @@ If an unknown user were to view your site and then, at a later date, create an a

## Capturing user data through a web form

### Step 1: Check if the user exists
### Step 1: Check if user exists

When a user enters content through a web form, check if a user with that email already exists within your database. This can be done in one of two ways:
- **Client checks internally (recommended)**<br>If you have an external record or database containing the provided user information that exists outside of Braze, reference this at the time of email submission to ensure the email has not already been captured.<br><br>
- **[/users/export/id]({{site.baseurl}}/api/endpoints/export/user_data/post_users_identifier/) endpoint**<br>Check to see if the returned users array is empty or contains a value. It is not recommended to heavily leverage this endpoint when querying a single user; we apply a rate limit of 2,500 requests per minute to this endpoint. For more information on endpoint rate limits, refer to [Rate limits by request type]({{site.baseurl}}/api/api_limits/#rate-limits-by-request-type).

- **Client checks internally (recommended)**<br>If you have an external record or database containing the provided user information that exists outside of Braze, reference this at the time of email submission or account creation to ensure the information has not already been captured.<br><br>
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
- **[/users/export/id]({{site.baseurl}}/api/endpoints/export/user_data/post_users_identifier/) endpoint**<br>Run the following call and check to see if the returned users array is empty or contains a value:
```json
--data-raw '{
"email_address": "example@braze.com",
"fields_to_export": ["external_id", "user_aliases"]
}'
```
It is not recommended to heavily leverage this endpoint when querying a single user; we apply a rate limit of 2,500 requests per minute to this endpoint. For more information on endpoint rate limits, refer to [Rate limits by request type]({{site.baseurl}}/api/api_limits/#rate-limits-by-request-type).

### Step 2: Log or update user

- **If a user exists:**
- Do not create a new profile.
- Log a custom attribute (e.g., `newsletter_subscribed: true`) on the user's profile to indicate that the user has submitted their email via newsletter subscription. If multiple user profiles in Braze exist with the same email address, all profiles will be exported.<br><br>
- **If a user does not exist:**
- Create an alias-only profile via Braze's [/users/track]({{site.baseurl}}/api/endpoints/user_data/post_user_track/) endpoint. This endpoint will accept a [user alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/) and create an alias-only profile when `update_existing_only` is set to `false`. Set the user's email as the user alias to reference that user in the future (as the user won't have an `external_id`).
- Create an alias-only profile via Braze's [`/users/track`]({{site.baseurl}}/api/endpoints/user_data/post_user_track/) endpoint. This endpoint will accept a [user alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/) and create an alias-only profile when `update_existing_only` is set to `false`. Set the user's email as the user alias to reference that user in the future (as the user won't have an `external_id`).

![Diagram showing the process to update an alias-only user profile. A user submits their email address and a custom attribute, their zip code, on a marketing landing page. An arrow pointing from the landing page collection to an alias-only user profile shows a Braze API request to the user track endpoint, with the request body containing the user's alias name, alias label, email, and zip code. The profile has the label "Alias Only user created in Braze" with the attributes from the request body to show the data being reflected on the newly-created profile.][3]{: style="max-width:90%;"}

## Identifying alias-only users

When identifying users upon account creation, alias-only users can be identified and assigned an external ID through the [`/users/identify`]({{site.baseurl}}/api/endpoints/user_data/post_user_identify/) endpoint by merging the alias-only user with the known profile.

To check if a user is alias-only, [check if the user exists](#step-1-check-if-user-exists) within your database.
- If an external record exists, you can call the `/users/identify/` endpoint.
- If the [`/users/export/id`]({{site.baseurl}}/api/endpoints/export/user_data/post_users_identifier/) endpoint returns an `external_id`, you can call the `/users/identify/` endpoint.
- If the endpoint returns nothing, a `/users/identify/` call should not be made.

## Capturing user data when alias-only user info is already present

When a user creates an account or identifies themselves via email sign-up, there are two options are merging the profiles depending on which data should be retained:
Expand Down
38 changes: 37 additions & 1 deletion _docs/_user_guide/engagement_tools/campaigns/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,40 @@ The number of users entering a campaign may differ from your expected number bec

### Can I search for a campaign by its API identifier?

Yes, use the filter `api_id:YOUR_API_ID` on the **Campaigns** page to search for a campaign by its API identifier. Refer to [searching for campaigns]({{site.baseurl}}/user_guide/engagement_tools/campaigns/managing_campaigns/search_campaigns/) to learn more.
Yes, use the filter `api_id:YOUR_API_ID` on the **Campaigns** page to search for a campaign by its API identifier. Refer to [searching for campaigns]({{site.baseurl}}/user_guide/engagement_tools/campaigns/managing_campaigns/search_campaigns/) to learn more.

### What is the difference between API campaigns, and API-triggered campaigns?

API-triggered campaigns allow you to manage campaign copy, multivariate testing and re-eligibility rules within the Braze dashboard while triggering the delivery of that content from your own servers and systems. These messages can also include additional data to be templated into the messages in real-time.

API campaigns are used to track the messages that you send using the API. Unlike most campaigns, you don't specify the message, recipients, or schedule, but instead pass the identifiers into your API calls.

### What is the difference between action-based and API-triggered campaigns?

<style>
table th:nth-child(1) {
width: 50%;
}
table th:nth-child(3) {
width: 50%;
}
</style>

#### Action-based

Action-based delivery campaigns or event-triggered campaigns are very effective for transactional or achievement-based messages and allow you to trigger them to send after a user completes a certain event.

| Pros | Cons |
| ---- | ---- |
| • Visibility of incoming JSON payloads into the platform (if event triggered by test user) via the **Message Activity Log**<br><br>• Personalization elements are included in the custom event properties<br><br>• Custom event can be used to create Segments of users eligible for the message | • Consumes data points |
{: .reset-td-br-1 .reset-td-br-2}

#### API-triggered

API-triggered or server-trigger campaigns are ideal for more advanced transactional use cases allowing you to trigger the delivery of campaign content from your own servers and systems. The API request to trigger the message can also include additional data to be templated into the message in real-time.

| Pros | Cons |
| ---- | ---- |
| • Does not consume data points<br><br>• Personalization elements are included in the JSON payload properties | • Does not allow you to create a segment of users eligible for the message in the JSON payload properties<br><br>• Not able to see incoming JSON payloads via the **Message Activity Log**|
{: .reset-td-br-1 .reset-td-br-2}

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
nav_title: API-Triggered and Action-Based Campaigns
article_title: Testing API-Triggered and Action-Based Campaigns
page_order: 2
page_type: reference
description: "This reference article explains how to test API-triggered and action-based campaigns."

---

# API-triggered and action-based campaigns

When setting up campaigns, it is always a good practice to test your messages before launching. This reference article covers creating a test user segment that will allow you to inspect API requests, payloads, and view deliverability logs.

## Step 1: Create a test user segment

The only way to test the triggering of a campaign with the API or custom event is to push the campaign live. As part of rolling out a new campaign, we strongly recommend adding a test user segment to campaigns when testing triggering deliverability. This will provide a safety net, ensuring that even if a campaign is accidentally sent, it will only go to internal users.

1. **Import test users**<br>Test users can be imported to Braze through a CSV or a one-off batched request through [Postman](https://www.braze.com/docs/api/postman_collection/). When importing these users, we recommend setting a custom attribute on their profiles (i.e., `internal_test_user: true`) that can be used to build a test group segment. <br><br>
2. **Add test users as Braze-recognized test users**<br>[Marking your test users as Braze-recognized test users](https://www.braze.com/docs/user_guide/administrative/app_settings/developer_console/internal_groups_tab/) in the dashboard gives you access to verbose logging for each user, allowing you to inspect API requests, their payloads, and view deliverability logs. These logs can help you determine if there were any issues delivering campaigns to end users. <br><br>
3. **Create segment**<br>To create a test user segment, create a segment of users with the `internal_test_user` custom attribute set to `true`. This segment can be removed when the campaign goes live.

## Step 2: Testing sends

Next, you can do a test send from the Braze dashboard or use Inbox Vision (email only) to see what the layout will look like while the campaign is still in draft mode. You can then send the campaign to your test user segment to verify it is behaving as expected. Regardless of whether the campaign is API-triggered or action-based, use Postman to send a one-off request to the Braze API, triggering the campaign.

## Step 3: Use Braze logging to inspect inbound results

Use Braze logging to troubleshoot triggering, sending, and event problems.
- The [event user log](https://www.braze.com/docs/user_guide/administrative/app_settings/developer_console/event_user_log_tab/) will show you the raw payload of the API-trigger request, the custom event triggering the campaign, and any associated trigger or event properties.
- The [message activity log](https://www.braze.com/docs/user_guide/administrative/app_settings/developer_console/message_activity_log_tab/) will log any errors and help you understand why a particular message may not have been delivered.

## Step 4: Remove the test segment and roll out the campaign

Once the message is triggering and rendering properly with all clicked links registered, you can remove the segment and update the campaign. If you prefer to start the campaign from scratch so that the few test user impressions are not included, you can duplicate the campaign and restart it without the test user segment.
Loading