top of page

Don't Shoot the Messenger: Integrating Braze and Facebook Part 2

Jasper Hortillano

Introduction

Integrating Braze with Facebook allows you to enhance your audience targeting and to personalize ads by synchronizing customer data, creating lookalike audiences, and even engaging on a personal, one-to-one level.


In our first Braze and Facebook post, we discussed how to set up your Braze to Facebook connection to target lookalikes for prospecting campaigns. In this post, we’ll provide guidance on how to get Braze and Facebook Messenger working together to further enhance your marketing strategies.

Image of Facebook icon

Things to Know

Before you begin, you should always review the latest messaging policies for both Braze and Facebook - do not pass "go" until you complete this step! Once you've validated compliance, you can move onto the Braze to Facebook Messenger integration!


Below are the major infrastructure architecture pieces you will need to know in order to achieve success:


  • Your Organization’s Facebook Page – A definitive requirement since that’s where customers will visit and initiate the interaction with your organization’s Messenger App. This is also where your Messenger Bot will reside.


  • The Facebook Messenger App – This is the application that will manage the settings of your Messenger Bot and security information.


  • Facebook Approved Messenger Bot – This is key because it lets both communicating parties (Braze and Facebook) know that your Messenger Bot will abide by Braze and Facebook policies and will function appropriately before interacting with your customers.


  • Page-Scope IDs (PSIDs) – These are the unique IDs that accompany all interactions between you and your customers on Messenger. PSIDs are assigned to users when they start the interaction, so it is extremely important that respective PSIDs correspond to a Braze user profile to connect the dots.

    • Braze user’s must be identified Facebook Messenger users who have consented to interactions via Messenger. Once these Braze users start interactions via Messenger, the assigned PSID from the interaction are tracked in the Braze user profile and used as part of Messenger targeting within Braze.

    • A Messenger user’s PSID is NOT the same as the Facebook ID for a Facebook user.

    • A Messenger user’s PSID is NOT the same as the users Messenger ID for the Messenger user.


  • Page Access Token - These tokens provide permissions to APIs so they can work with the data on your organization's Facebook page.


Assembly

With all the necessary pieces laid out, it’s time to put this integration puzzle together.


The first thing you will need to do is to collect the PSID’s of those who have interacted with your Messenger App. This can be done through your operational Messenger Bot via the Messenger App or other entry points as defined by Facebook.


Take a look at the backend data surrounding those entry point interactions to identify the sender.id because those IDs are the PSIDs you are looking to find.


With the PSIDs in hand, you’ll reconcile them against their corresponding Braze user profiles. Remember, these PSIDs are from Messenger users who have consented to communications through Messenger. These users need to be created in your Braze instance so that they can be used for your Messenger-focused marketing strategies.


Keep things moving by creating a custom attribute in the user profile that will contain the assigned PSID to unify the Messenger user and the Braze user. If these users already exist, you've got a leg up, since all you must do is update the custom attribute with the captured PSID data. For this integration to work properly, the data cycle needs to always start and end with a PSID assigned to a Braze user profile.


Pro tip: Share the custom attribute information with the team that will assist in bringing Messenger data back to Braze ahead of time. This way, they can start capturing and sending the data to Braze right when you begin this journey.

Within the Braze front end, create a Braze Webhook Template for Facebook Messenger by navigating to Templates → Webhook Templates → choose Facebook Messenger Webhook Template.

Screenshot of Braze workspace navigating to Webhook Templates

Next is where you will setup the Webhook Template for Facebook within Braze so you can send your messages to the Messenger App.

  • Set up the plumbing between Braze and your Messenger App and Bot by defining the target Facebook account through the Facebook Page Access Token.

  • Assign the PSID of the person you want to message via Messenger.

  • Define the message that will be sent to the Messenger Bot for service.

Screenshot of Braze Webhook Template details

Now that you have your Messenger Webhook Template saved, you can define it in a Messenger-focused Braze Campaign or Canvas, per your marketing requirements.

Screenshot of composing a Braze campaign message
Screenshot of using a predesigned Facebook Messenger Webhook Template

The Result

To help illustrate how this all fits together, below is an example visual of how the integration works from the 30,000 foot level:


Diagram of the Braze and Facebook Messenger Intergration cycle

As we wrap-up our high level review of the Braze to Facebook Messenger integration, it’s clear that this collaboration offers a powerful avenue for enhancing customer engagement through advanced messaging capabilities. By harnessing the strengths of both platforms, organizations can deliver personalized, timely interactions that respect user consent and privacy.


The technical setup paves the way for creating a seamless communication experience that can significantly elevate your marketing strategies. If some of the steps outlined in this guide still make you nervous, feel free to contact us and we will be more than happy to help you make this happen.


If you’d like to know more, or want help implementing for your own marketing, you can reach us at: BrazeHelp@CovalentMarketing.com.


bottom of page