ο»Ώ

The Braze integration is available on the [Pro](πŸ”—ο»Ώ) plan.

Braze can be a helpful integration tool in understanding what stage a customer is in and reacting accordingly. Using Braze can help you to create content that understands the context of your customers and their actions.

With our Braze integration, you can:

  • Send an onboarding campaign to a user towards the end of their free trial.

  • Allow customer support to grant a promotional subscription to a loyal user that experience issues.

  • Send campaigns to users who canceled their subscription or didn’t pursue after their free trial.

With accurate and up-to-date subscription data in Braze, you'll be set to turbocharge your campaigns ⚑️

# Events

The Braze integration tracks the following events:

EventDefault Event NameDescriptionApp StorePlay StoreAmazonStripePromo
Initial Purchaserc_initial_purchase_eventA new subscription has been purchased.βœ…βœ…βœ…βœ…βŒ
Trial Startedrc_trial_started_eventThe start of an auto-renewing subscription product free trialβœ…βœ…βœ…βœ…βŒ
Trial Convertedrc_trial_converted_eventWhen an auto-renewing subscription product converts from a free trial to normal paid period.βœ…βœ…βœ…βœ…βŒ
Trial Cancelledrc_trial_cancelled_eventWhen a user turns off renewals for an auto-renewing subscription product during a free trial period.βœ…βœ…βœ…βœ…βŒ
Renewalrc_renewal_eventAn existing subscription has been renewed or a lapsed user has resubscribed.βœ…βœ…βœ…βœ…βŒ
Cancellationrc_cancellation_eventA subscription or non-renewing purchase has been cancelled. See [cancellation reasons](πŸ”—ο»Ώ) for more details.βœ…βœ…βœ…βœ…βœ…
Uncancellationrc_uncancellation_eventA non-expired cancelled subscription has been re-enabled.βœ…βœ…βœ…βŒβŒ
Non Subscription Purchaserc_non_subscription_purchase_eventA customer has made a purchase that will not auto-renew.βœ…βœ…βœ…βœ…βœ…
Expirationrc_expiration_eventA subscription has expired and access should be removed. If you have [Platform Server Notifications](πŸ”—ο»Ώ) configured, this event will occur as soon as we are notified (within seconds to minutes) of the expiration. If you do not have notifications configured, delays may be approximately 1 hour.βœ…βœ…βœ…βœ…βœ…
Billing Issuesrc_billing_issue_eventThere has been a problem trying to charge the subscriber. This does not mean the subscription has expired. Can be safely ignored if listening to CANCELLATION event + cancel_reason=BILLING_ERROR.βœ…βœ…βœ…βœ…βŒ
Product Changerc_product_change_eventA subscriber has changed the product of their subscription. This does not mean the new subscription is in effect immediately. See [Managing Subscriptions](πŸ”—ο»Ώ) for more details on updates, downgrades, and crossgrades.βœ…βœ…βŒβœ…βŒ

For events that have revenue, such as trial conversions and renewals, RevenueCat will automatically record this amount along with the event in Braze.

RevenueCat subscriber attributes will be dispatched to Braze with the events detailed above and will populate in Braze's [custom attributes](πŸ”—ο»Ώ) for a customer as `rc_customer_attribute_*` (where `*` is replaced by the attribute name) and the value is set to that key (e.g: `rc_customer_attribute_naps_logged: "123”`). If you are setting the optional Braze User Alias Object fields in RevenueCat, these subscriber attributes will be filtered out from the collection before we dispatch the custom attributes to Braze.

RevenueCat will also send your customer's active entitlement ID(s) as an array of `rc_active_entitlement_ids`.

# Setup

## 1. Set Braze User Identity

If you're using the Braze SDK, you can set the User Id to match the RevenueCat App User Id. This way, events sent from the Braze SDK and events sent from RevenueCat can be synced to the same user.

Configure the Braze SDK with the same App User Id as RevenueCat or use the `.changeUser()` method on the Braze SDK.

ο»Ώ

## (Optional) Send User Alias Object fields to RevenueCat

If you are looking to send an alternative unique user identifier that is different than your App User ID, update users with the below data as [Subscriber Attributes](πŸ”—ο»Ώ).

KeyDescription
`$brazeAliasName`The Braze 'alias_name' in [User Alias Object](πŸ”—ο»Ώ)ο»Ώ
`$brazeAliasLabel`The Braze 'alias_label' in [User Alias Object](πŸ”—ο»Ώ)ο»Ώ

Both attributes are required for the [User Alias Object](πŸ”—ο»Ώ) to be sent alongside your event data. These properties can be set and removed manually, like any other [Subscriber Attribute](πŸ”—ο»Ώ).

RevenueCat will always use the User Alias Object to identify events into Braze, if set, as opposed to the RevenueCat App User ID.

Remove any client-side purchase tracking

Make sure to remove all client-side tracking of revenue. Since RevenueCat will be sending events for all revenue actions, tracking purchases with the Braze SDK directly can lead to double counting of revenue in Braze.

## 2. Send RevenueCat Events to Braze

After you've set up the _Purchases SDK_ and Braze SDK to have the same user identity, you can "turn on" the integration and configure the event names from the RevenueCat dashboard.

  1. Navigate to your project in the RevenueCat dashboard and find the _Integrations_ card in the left menu. Select **+ New**

ο»Ώ

  1. Choose **Braze** from the Integrations menu

  2. Add your Braze instance and API key

  3. Enter the event names that RevenueCat will send or choose the default event names

  4. Select whether you want sales reported as gross revenue (before app store commission), or after store commission and/or estimated taxes.

Braze configuration page
ο»Ώ

Braze configuration page

# Sample events

Below are sample JSONs that are delivered to Braze for most events.

ο»Ώ
ο»Ώ