Braze Integration

With the combination of Braze’s leading mobile engagement platform and Bluedot Innovation’s best in class location technology, mobile engagement is taken to the next level. Combine the power of Braze with the precision and scalability of Bluedot’s location services to accelerate growth, drive loyalty engagement and revenue in your app and beyond.

Bluedot’s location marketing platform delivers a solution 20x more accurate, with negligible battery drain, unlimited locations and best in class privacy making it the only option that can deliver location-based 1:1 segmentation no matter how large your audience is.

Connectivity is at the heart of this new chapter for mobile. But it’s more than just the ability to engage. It’s also about connecting to mobile users with discernment and insight. That’s what mobile engagement is about, and it’s exciting what we can now do.

Integration architecture diagram

The is an SDK-to-SDK integration and you’ll need to install both the Bluedot Point SDK and Braze Appboy SDK. Location events generated by the Bluedot Point SDK will be passed to the AppBoy SDK as Custom Events (Android | iOS) and Braze will handle the User Segmentation based on you Braze Campaign configuration, and sending notifications to your users.

Integration Architecture

 

Bluedot setup

Creating a new Project

Creating a Project is your first step. All your Zones and all geofeatures exist within a Project. More information on adding and managing Bluedot Canvas project can be found here.

Adding a Zone

You’ll need to create a Zone before you can start adding in specific Geofeatures. Each Zone can have one or many Geofeatures – that’s up to you and your use-case. More information on adding and managing Zones can be found here.

Braze setup

Add an App

If you have just registered for a Braze account select the Add your app button. If you have an existing account then either choose the app you wish to use, or select the New app button in the upper right corner of the dashboard to create a new one. More information on setting up an App can be found here.

Set up push in your App

  • Add the Google Cloud Messaging (GCM) API key in the Quickstart Guide Android tab. It is located at the end of the screen. For further information refer to Braze Android Documentation
  • Add the Apple Push Notification Service (APNs) Certificate in the Quickstart Guide iOS tab. It is located at the end of the screen. For further information refer to Braze iOS Documentation
image

It is vital to set up the APNs certificate for iOS and GCM API Key for Android platforms, to utilize the push based automated messages in Braze engagement platform.

More information

More information on adding and updating your Braze App can be found here.

Integration setup in the app

The application needs to be configured to send custom events to Braze when a Bluedot entry or exit trigger occurs.

Android

The Android/Java implementation for passing up entry events is as follows, using the onCheckIntoFence callback:

/**
     * This callback happens when user is subscribed to Application Notification
     * and check into any fence under that Zone
     * @param fenceInfo      - Fence triggered
     * @param zoneInfo   - Zone information Fence belongs to
     * @param location   - geographical coordinate where trigger happened
     * @param customData - custom data associated with this Custom Action
     * @param isCheckOut - CheckOut will be tracked and delivered once device left the Fence
     */
    override fun onCheckIntoFence(
        fenceInfo: FenceInfo,
        zoneInfo: ZoneInfo,
        location: LocationInfo,
        customData: Map<String, String>,
        isCheckOut: Boolean
    ) {
        val eventProperties = AppboyProperties()
        eventProperties.addProperty("zone_id", zoneInfo.zoneId)
        eventProperties.addProperty("zone_name", zoneInfo.zoneName)
        eventProperties.addProperty("latitude", location.latitude)
        eventProperties.addProperty("longitude", location.longitude)
        eventProperties.addProperty("fence_id", fenceInfo.id)
        eventProperties.addProperty("fence_name", fenceInfo.name)

        for (data in customData) {
            eventProperties.addProperty(data.key, data.value)
        }

        Appboy.getInstance(this).logCustomEvent(customEventEntry, eventProperties)
    }

To pass up Bluedot exit triggers, similar code should be added for the onCheckedOutFromFence callback.

iOS

The Swift implementation for passing up entry events is as follows, using the didCheckIntoFence callback:

func didCheck(
    intoFence fence: BDFenceInfo!,
    inZone zoneInfo: BDZoneInfo!,
    atLocation location: BDLocationInfo!,
    willCheckOut: Bool,
    withCustomData customData: [AnyHashable : Any]!
){
    // Name the custom event 
    let customEventName = "bluedot_entry"

    // Map the Location and Bluedot Zone attributes into a properties dictionary
    var properties = [
        "zone_id": "\(zoneInfo.id!)",
        "zone_name": "\(zoneInfo.name!)",
        "latitude": "\(location.latitude)",
        "longitude": "\(location.longitude)",
        "speed": "\(location.speed)",
        "bearing": "\(location.bearing)",
        "timestamp": "\(location.timestamp!)",
    ]

    // Map the Custom Data attributes into properties
    if customData != nil && !customData.isEmpty {
        customData.forEach { data in properties["\(data.key)"] = "\(data.value)"}
    }

    // Log the Custom Event in Appboy
    Appboy.sharedInstance()?.logCustomEvent(customEventName, withProperties: properties );
}

To pass up Bluedot exit triggers, similar code should be added for the didCheckedOutFromFence callback.

Integration examples

Android – https://github.com/Bluedot-Innovation/PointSDK-BrazeIntegrationExample-Android

iOS – https://github.com/Bluedot-Innovation/PointSDK-BrazeSDK-IntegrationExample-iOS 

Created by Ram Akunuru on August 6, 2019

Start the discussion