Braze

Purchasely can send all your transactional events to Braze to enrich your users data. Use these events to trigger automatic campaigns, pushs...

Events

The following events will be sent. You can set the event name of your choice in the console.

You can find the full list of events here.

Associate users to events

There is nothing special to be done to associate Purchasely events to your logged in users in Braze. Just setup Braze SDK as you would normally, and use the changeUser method to set the user ID in Braze:

Appboy.sharedInstance()?.changeUser("YOUR_USER_ID")

Make sure the User ID you give to Braze matches the**vendor_id** you give to Purchasely, as our servers refer to this ID when sending events for the user. Read Braze documentation on Setting User IDs for more information.

Handle anonymous users

If you have anonymous users in your app, you will need to add their Purchasely anonymous_id as a user alias to Braze:

Appboy.sharedInstance()?.user.addAlias(
    Purchasely.anonymousUserId, 
    withLabel: "purchasely_anonymous_id"
)

The label MUST be set to "purchasely_anonymous_id", as our servers refer to this label when sending events while the user is anonymous.

When the anonymous user later becomes logged in, Purchasely will automatically send following events using the provided vendor_id

Configure the integration in the Purchasely Console

Go to the "External integrations" section, and open the edition form for Braze:

Getting Braze API key

Go to your Braze Developer Console, and click on "Create New API Key"

Give a relevant name to your API Key. In the "User Data" permission area, check users.track as our servers need this permission to report backend events to Braze.

Click "Save API Key" at the bottom of the page.

Finally, paste the API key Identifier value into Purchasely console.

Selecting the correct REST Server

Refer to Braze API Endpoints table. You can use your Braze Dashboard URL find the correct server. E.g. if your dashboard is accessible at https://dashboard-01.braze.eu, then you should select the EU-01 server.

Customising Server Event Names

If you want to, you can rename events sent to Braze:

Please refer to Braze documentation on Event Naming Conventions to choose appropriate event names.

Event properties

Each event sent to Braze carries a set of properties that you can use to further personalize your campaigns:

Read Braze documentation on Custom Event Properties for more details on how you can use the properties above.

Last updated

© Purchasely 2020-2023